Using the following SQL statement, I could export a select query into a dbf file at c: emp est.dbf
INSERT INTO test IN ‘C: emp’ ‘DBASE IV;’ SELECT * FROM Table1
How would I write a SQL statment to export the same select query to a CSV (comma separated) file?
Transact SQL does not support importing or exporting from a file. However, SQL Server provides you several ways to do so. The BCP command, which is run from the command prompt, not ISQL, allows you to both import and export data from a table. The online help has a complete description of all the options.