Re: PLEASE help...SQL problem URGENT
Posted in 1999
Graeme
I use something like this:
select "LOAD FROM " || trim(tabname) || ".dat INSERT INTO " || trim(tabname) ||
";"
from systables
where tabtype = "T"
and tabid > 99;
to generate the SQL and then run it. From 4GL you would probably use a cursor to
get the tablenames from systables and then PREPARE this LOAD FROM..INSERT INTO
statement. I seem to remember that in 4GL there is a trick to doing the PREPARE,
but I cant remember it offhand.
HTH
Sujit
Graeme Barnett <gbarnett@37gateshead.freeserve.co.uk> on 10/21/99 01:42:24 PM
Please respond to Graeme Barnett <gbarnett@37gateshead.freeserve.co.uk>
To: informix-list@iiug.org
cc: (bcc: Sujit Pal)
Subject: PLEASE help...SQL problem URGENT
I'm trying to load many files into a database using the "LOAD FROM filea
INSERT INTO tableb" command. However, Informix V4 4GL doesn't allow you touse a variable in place of either filea or tableb. How can I do this?
I thought about having a long string containing this information and somehow
directly sending it to the SQL engine. Please help...
Thank you,
Graeme