× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>
> 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?
>
Yes you can do #3.  Here's an example that creates an index.

D SQLStmt         s           1024    varying
D
C                   eval      SQLStmt = 'CREATE INDEX ' + %trim(lN) +
C                             '/' + %trim(idxN) + ' ON ' +
C                             %trim(lN) + '/' + %trim(fN) +
C                             ' (' + %trim(idx) + ')'
C
C/exec sql
C+ PREPARE DYNSQLSTMT FROM :SQLstmt
C/end-exec
C
C/exec sql
C+ EXECUTE DYNSQLSTMT
C/end-exec


Phil


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.