Re: LOAD statement in ESQL
Posted in 1996
Hi Kate,
In your article you wrote...
>Is there any special syntax for a LOAD statement in ESQL? I am using the
>exact ISQL LOAD statement from within an ESQL program and I get a syntax
>error.
I could be outdated on this, but last time I checked there was no LOAD
statement available in ESQL or I4GL. ISQL was the only place the LOAD
command was available. If you find out differently, please let me know.
>Also I need to know how to suppress output from an SQL statement if I
>have it in a UNIX script file running under SCO. I get an "ambiguous
>output indirect" if I use the normal UNIX syntax.
>
>What I have is this
>
>isql databasename loadfile.sql
>
>and in loadfile.sql is the ISQL
>
>load tablename input from filename
I think the syntax for the load is
load from file_name
insert into table_name
That's what it was in version 4.1 ISQL anyway. Might want to give it a
try.
About redirecting the output, it should go something like this:
isql database_name sql_name >/dev/null 2>&1
Most of the messages generated by Informix from ISQL go to the standard
error output (stderr) which is why you need the 2>&1. That says send the
standard error output to the same place you sent the standard output
(stdout). That should work. I haven't worked much on SCO machines but I
think I used that one time on a SCO box.
If you want to send the output to a log file in case something goes wrong,
you can just replace the /dev/null with the log file name.
If what I said didn't work, feel free to leave me some e-mail.
Have a great day!
---- Frank