How to know if interactive or not? [NC]

Cedric ROUVRAIS <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <OF6EDF90BF.99C9A081-ON85257607.007F4B7F-85257607.007F5258@us.world.socgen>
Never mind, I found it, stupid me :o)

__________________

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.
*************************************************************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.