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 > couple of queries regarding stored procs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 04:03
Dipanjan Dipanjan is offline
Registered User
 
Join Date: Sep 2003
Posts: 84
couple of queries regarding stored procs

1) We are creating 2 separate stored procedures - one for inserting data into multiple tables (parent-child) and the other for update of record in multiple tables. For this reason we need to pass a large amount of data to this SP We were planning to send this data in an XML file and use the dxxshredXML function. However, we found that the DAD cannot properly handle multiple tables with identity columns. We are now planning to send the data as a single string with delimiters. Can someone suggest an alternate method ?

2) Can someone tell me if there is a string parsing function provided by DB2 based on delimiters ? I took a look at the SUBSTR function - however it works on the position of the character rather than a specified delimiter
Reply With Quote
  #2 (permalink)  
Old 12-10-03, 09:00
dmmac dmmac is offline
Registered User
 
Join Date: Aug 2003
Location: Massachusetts, USA
Posts: 106
Re: couple of queries regarding stored procs

For #2, POSSTR or LOCATE but you will have to build a function in combination with SUBSTR to do the parsing.


Quote:
Originally posted by Dipanjan
1) We are creating 2 separate stored procedures - one for inserting data into multiple tables (parent-child) and the other for update of record in multiple tables. For this reason we need to pass a large amount of data to this SP We were planning to send this data in an XML file and use the dxxshredXML function. However, we found that the DAD cannot properly handle multiple tables with identity columns. We are now planning to send the data as a single string with delimiters. Can someone suggest an alternate method ?

2) Can someone tell me if there is a string parsing function provided by DB2 based on delimiters ? I took a look at the SUBSTR function - however it works on the position of the character rather than a specified delimiter
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