If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Redirect Output in Embedded ESql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-30-10, 04:17
nsinha nsinha is offline
Registered User
 
Join Date: Jul 2004
Posts: 12
Redirect Output in Embedded ESql

Hi

I have a embedded sql (.ec) file and want to redirect the output of a select statement to a simple txt file.

For standalone select statement it should be like this -

output to /tmp/out
select * from emp where empno=123;

But how I can achieve the same in the .ec file? If I write the following -

exec sql output to /tmp/out.txt select * from emp where empno=123;

I am getting the error - esqlc: Syntax error on identifier or symbol '/'.
I tried to escape those "/" in different ways without any success.

So the question is - is it at all possible to write the program in this way? I know that through eSql utility we can select the values in the host variables - so is there any restriction to redirect the output in the above manner? If we have 100's of columns can't we redirect the output for our ease? Also in the same way "unload" is also not working.

I spent so much time in searching for this answer, but couldn't get any help - hence bothering you guys.

Thanks in advance for your time and considerations.....

Regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On