http://www.perlmonks.org?node_id=1076490


in reply to Accessing Microsoft SQL Server from Linux using DBD::Sybase

Hi .... U have mentioned connecting to MSSQL by using FreeTDS as /usr/local/freetds/bin/tsql -S sql1 -U sqluser. I need to pass more arguments to it, i.e. Query & and redirect the same to an output file in the same commandline. so can this be possible ? /usr/local/freetds/bin/tsql -S sql1 -U sqluser -I Query -o Outputfile. Please Help.
  • Comment on Re: Accessing Microsoft SQL Server from Linux using DBD::Sybase

Replies are listed 'Best First'.
Re^2: Accessing Microsoft SQL Server from Linux using DBD::Sybase
by Anonymous Monk on Feb 28, 2014 at 09:13 UTC
      Hi, I have tried passing arguments as a Query & an Output file. But that's not working. Please take a look below. see below syntax, (This works !!!!!) /usr/local/freetds/bin/tsql -S sql1 -U sqluser -P sqlpassword. But the below command doesnt work. /usr/local/freetds/bin/tsql -S sql1 -U sqluser -P sqlpassword -I Query -o Outputfile.

        Hi, I have tried passing arguments as a Query & an Output file. But that's not working.

        um, ok, but that is not perl code ...

        https://wiki.apache.org/tajo/tsql doesn't show any -I or -o options

        so check the documentation for whatever tsql program you have