|
You can use the PREPARE statement, e.g.: c/Exec Sql c+ declare s statement c/End-Exec . . . c/Exec SQL c+ declare C1 cursor for s c/End-Exec . . . c eval sqlStm = '<whatever>' . . . c/Exec Sql c+ prepare s from :sqlStm c/End-Exec . . . c/Exec SQL c+ open C1 c/End-Exec . . . <etc> I think there was a discussion a while ago on the performance implications of "prepare" -- because the SQL precompiler has no idea what statement will be executed, it can't to any optimization, as it normally (?) might. I don't think the hit is necessarily very big, though, and for your application this could be just what you're looking for. hth rpg400-l@midrange.com writes: >3. ask if there is a way to put the SQL statements in a string and then >pass that string to the SQL engine (like MySQL or postgres does). Maybe >like: > >C eval string = 'EXEC SQL DECLARE C1 CURSOR FOR blah ...' >C<somehow tell the SQL machine to run the contents of string <string> > > >So how about it? Is there a way to do option 3? > >James Rich Mike Naughton Senior Programmer/Analyst Judd Wire, Inc. 124 Turnpike Road Turners Falls, MA 01376 413-863-4357 x444 mnaughton@juddwire.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.