Forum Discussion
mrperfectloser
Nov 30, 2021Copper Contributor
Syntax error with :OUT and C:/ - SQL Query to CSV File
Hi all, I'm trying to export an SQL query for several tables into individual CSV files. Im getting an error with the syntax with the colon in front of "OUT" and the backslash for the where ...
olafhelper
Dec 01, 2021Bronze Contributor
Looks like you try to run the query in a SSMS query window, right?
To run a SqlCmd script in SSMS you have to switch into SqlCmd mode first.
Menue "Query" => "SQLCMD-Mode"