Re: executing sql script from within another sql script?
Posted in 1998
If you run dbaccess on the command line you can pipe the results to another
dbaccess.
ex:
dbaccess DATABASE SQLScript | dbaccess DATABASE
or
echo 'select "grant select on ", tabname, "to USER;" from systables where
tabid >99 and tabtype = "T"' | dbaccess DATABASE | dbaccess DATABASE
Scott Kolaya
Nick Leporacci, Jr. <nicklepo@concentric.net> wrote in article
<6ggbde$jjt@examiner.concentric.net>...
> The only way that I've found to do this is to BANG (!) out to the
operating
> system and run the second SQL script from there. You can, however, do
this
> in a chain.
>
> EX:
>
> select * from junk;>
> !dbaccess DATABASE SQL_SCRIPT;
>
> select * from junk2;>
> When the second SQL script finishes, it will return you to the
originating
> script.
>
> Nick Leporacci
>
>
> EA wrote in message <6gfhrg$hhu$1@ubnnews.unisource.ch>...
> >To all those Informix wizards out there:
> >
> >Is it possible in Informix dbaccess to call another sql script from
within
> a
> >sql script?
> >In Oracle the @ sign is used for that like in
> >@scriptname.sql
> >
> >Any help would be greatly appreciated. Thanks and
> >Cheers
> >E.
> >
> >
> >
>
>
>