Alternatively, you can do this too  like any other command that supports stdin 
and stdout redirection

echo "select * from \"_MD_\".objects;" | sqlci

Selva
From: Roberta Marton [mailto:[email protected]]
Sent: Friday, July 28, 2017 8:06 AM
To: [email protected]
Subject: RE: is it possible to pass a sql statement to sqlci?

I know you can run commands like this:

sqlci << eof
env;
values (current_user);
eof


   Roberta


From: Eric Owhadi [mailto:[email protected]]
Sent: Friday, July 28, 2017 7:59 AM
To: 
[email protected]<mailto:[email protected]>
Subject: is it possible to pass a sql statement to sqlci?

Hi Trafodioneers,
I know we can use sqlci -i filename
And this will trigger an OBEY filename.

But I was wondering if there is an option to directly pass the sql statement, 
without writing it to a file

Sqlci -??? "select count(*) from tbl"

Eric

Reply via email to