Re: execute an sql script?
Posted in 1994
In article <dennisp.779400297@puma>, Dennis Pimple <dennisp@informix.com> wrote: >gary@lining.alt.ns.ca (Gary Langthorne) writes: > >> I have an old copy (rel2) of Informix/SQL that I wish to run a SQL >>file from my unix prompt without entering the Informix menu system. Can >>I do this? I found a file in the "lib" dir. called sqlexec but I try to add >>a sript file after the command and the computer hangs. > >I think this has always worked: > >isql database-name sqlfile > >Output will go to standard out, so the results will be on screen, or >you can redirect to a file: > >isql database-name sqlfile > sql.out > In version 4, (one we're using) I have to type 'isql database-name < sqlfile' only *IF* the sqlfile does *NOT* have a '.sql' suffix. Otherwise, the method above will work. I do this all the time 'linking' our sqlfiles and shell scripts. John