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 > DB2 Join question from a beginner.....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-06, 13:44
oca95 oca95 is offline
Registered User
 
Join Date: Jan 2006
Posts: 6
DB2 Join question from a beginner.....

Hi, I have 2 tables to extract data from.

Table 1
______
user_id
group_id
col3
col4

Table 2
_______
user_id
User_fullname
col3
col4
col5
etc...

As simple this may sound, I'm still new so please bare with me. Basically I want to know if a join would be good to use or any other ideas. The extract needs the user_ids from a certain group_id with their user_fullname attached. I guess I want to extract all the users with the specific group_id from table 1 and join the results to table 2 for their matching full name. Suggestions please....
Reply With Quote
  #2 (permalink)  
Old 01-06-06, 14:10
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Select a.user_id, b.user_fullname, (add other columns you need here)
from table1 a, table2 b
where a.user_id = b.user_id
and a.group_id = 'xxxxx'
__________________
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
  #3 (permalink)  
Old 01-06-06, 14:23
oca95 oca95 is offline
Registered User
 
Join Date: Jan 2006
Posts: 6
Wow, quick and from and IBM'er himself . Thanks alot worked like a charm. I guess I can come here from now and and ask questions eh, great place.
Reply With Quote
  #4 (permalink)  
Old 01-06-06, 14:26
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I don't work for IBM. I have obtained IBM certification as DB2 DBA. This involves taking and passing several exams.
__________________
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 01-06-06, 14:29
oca95 oca95 is offline
Registered User
 
Join Date: Jan 2006
Posts: 6
Oh sorry for the confusion. Do those certifications expire like others? I mean do you have to keep updating them?
Reply With Quote
  #6 (permalink)  
Old 01-06-06, 16:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
The certifications are for specific releases of 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
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