Re: SPL question (fwd)
Posted in 1996
Jack Parker (jparker@hpbs3645.boi.hp.com) wrote:
: >
: > Can you generate and execute an SQL statement on the fly inside of SPL?
: Any thoughts? I think not, but I seem to remember something being discussed
: along these lines in hte not too distant past.
You can't do this directly, but there's a way you could cobble it together.
Use "system" commands in the stored procedures to dynamically create a file,
called say....file.sql. Then have a system call run "isql database file" to
run the procedure.
It's not pretty, and it's slow, but you can do some pretty interesting
things this way. I once wrote a series of stored procs that wrote korn
shell scripts on the fly, copied them to other machines on the network,
executed the scripts (that called dbaccess) on the remote machines, and then
transmitted their success or failure by updating values in tables on the
original machine.
Joe
--
---------------------------------------------------------------------------
Joe Lumbley(jlumbley@netcom.com) Dallas, Texas
----------------------------------------------------------------------------