If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > passing list to static sql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-15-07, 03:55
padikkathavan padikkathavan is offline
Registered User
 
Join Date: Aug 2007
Posts: 2
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.
Reply With Quote
  #2 (permalink)  
Old 08-15-07, 07:43
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #3 (permalink)  
Old 08-15-07, 11:25
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #4 (permalink)  
Old 08-15-07, 22:19
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 08-16-07, 04:47
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Great: three readers, three different ideas what may have been meant. ;-)
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On