Skip to Content.
Sympa Menu

freetds - Re: [freetds] Saving Query output to a local file?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jklowden AT schemamania.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Saving Query output to a local file?
  • Date: Fri, 16 Apr 2010 08:00:47 -0400

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




Archive powered by MHonArc 2.6.24.

Top of Page