hi Eric
You can you sqlci -q "" to run a sql stastement.

发自我的 iPhone

在 2017年7月28日,23:21,Eric Owhadi 
<eric.owh...@esgyn.com<mailto:eric.owh...@esgyn.com>> 写道:

Thanks Selva and Roberta,
Eric

From: Selva Govindarajan [mailto:selva.govindara...@esgyn.com]
Sent: Friday, July 28, 2017 10:19 AM
To: 
user@trafodion.incubator.apache.org<mailto:user@trafodion.incubator.apache.org>
Subject: RE: is it possible to pass a sql statement to sqlci?

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:roberta.mar...@esgyn.com]
Sent: Friday, July 28, 2017 8:06 AM
To: 
user@trafodion.incubator.apache.org<mailto:user@trafodion.incubator.apache.org>
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:eric.owh...@esgyn.com]
Sent: Friday, July 28, 2017 7:59 AM
To: 
user@trafodion.incubator.apache.org<mailto:user@trafodion.incubator.apache.org>
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