Re: Saving Query output to a local file?
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Apr 15, 2010 at 07:01:13PM -0700, Vinh Nguyen wrote: > > I'm not exactly sure if freebcp can output the raw results with > heading or not, but I tried > freebcp temp.sql queryout hello.out -S myserver -U username -P mypassword -n > > but I get the following error: > Msg 102, Level 15, State 1 > Server 'SPINAL', Line 1 > Incorrect syntax near 'temp'. > Msg 102, Level 15 > General SQL Server error: Check messages from the SQL Server freebcp "$(cat temp.sql)" queryout hello.out -S myserver -U username -P mypassword -c is probably what you want. :-) See also bsqldb. Regards, --jkl