Skip to Content.
Sympa Menu

freetds - [freetds] How to know if interactive or not? [NC]

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Cedric ROUVRAIS <cedric.rouvrais AT sgcib.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] How to know if interactive or not? [NC]
  • Date: Mon, 3 Aug 2009 15:26:16 -0400

Hi,

I'm still trying to get bsqldb to mimic sybase ISQL command. Right now I'm
struggling to get the line count or not (depending on the context)

When you are interactive you get the following:

isql -U user -P password -S server -D server -b -w 1000
1>select * from table
2>go

But when I do the following in a script:

isql -U user -P password -S server -D server -b -w 1000 << EOF
select * from table
go
EOF

I do not get
1>
2>

I just get the data with Sybase. For example

bash-3.00$ sh test.sh
20080722

Where 20080722 is the result of my SQL statement which is in fact:

set nocount on
go
select convert(varchar,currentBusinessDate,112)
from businessDates
go
EOF

Any ideas ?

Thanks,

Cedric


*************************************************************************
This message and any attachments (the "message") are confidential, intended
solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible
to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or
affiliates shall be liable for the message if altered, changed or falsified.
*************************************************************************





Archive powered by MHonArc 2.6.24.

Top of Page