Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Posts
    2

    Unanswered: passing list to static sql

    Hi,

    How to pass a list to a static sql ?

    again is it possible ?

    if not, what is the solution ?

    thks. in adv.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Your question is rather ambiguous. Can you be more specific or supply some example of what you want to accomplish? Also supply the DB2 version and OS you are using.

    Andy

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    If you mean with "list" that you have multiple host variables and you may not know how many (very different meaning from the usual usage of that term), then the answer is "yes". You can set up an SQLDA with as many SQLVAR members as you need, set up each SQLVAR and then execute the static or dynamic embedded SQL statement with that SQLDA.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I think he means pass an array to a stored procedure, which you can do in Oracle, but not in DB2.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Great: three readers, three different ideas what may have been meant. ;-)
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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