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 > stored proc on typed tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-08-07, 10:59
wishlister wishlister is offline
Registered User
 
Join Date: Feb 2007
Posts: 42
stored proc on typed tables

db ESE
i have typed tables. i will create a stored procedure where i will store all the data from the 2 subtype tables in one table. for example, if i have supertype person with subtypes employee and student. in the new table that i will create, all the data will be included regardless of their type and having nulls to those fields that are not appropriate for each.
sample
personID name type studentID empNo
1 abc S 123 <blank>
2 def E <blank> 456
Reply With Quote
  #2 (permalink)  
Old 03-08-07, 12:03
wishlister wishlister is offline
Registered User
 
Join Date: Feb 2007
Posts: 42
how can i perform union of those two tables?
Reply With Quote
  #3 (permalink)  
Old 03-09-07, 04:05
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Typed tables already provide that functionality. So what exactly are you asking here?
__________________
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