Results 1 to 2 of 2

Thread: Dynamic SQL

  1. #1
    Join Date
    Jan 2005
    Posts
    10

    Unanswered: Dynamic SQL

    Is it possible to do some dynamic SQL in a stored procedure ?

    [Like the EXECUTE IMMEDIATE in Oracle]

    I want to create a string withan SQL statement and execute it :
    ie

    define Strsql varchar(100);

    LET Strsql = "insert int " || table_name || "values (" || val || ");";
    where table_name and val are parameters

    and then execute this statement (= execute the insert)

  2. #2
    Join Date
    Mar 2004
    Location
    Netherlands
    Posts
    183
    Sorry this is not possible in IDS with normal SPL commands. I beleive there is bladelet that can be used to achieve this in IDS 9. You coulld check the IBM website for this. I think I've seen it in developerswork corener of Informix in the datablade section. But it is not as easy as with Oracle.

    Hope this helps,


    Rob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •