I have 2 tables that I need to join. Both tables have the same primary key (ROLL_NUM). The first table (ROLL-CURRENT)has a complete list of all of the companies roll numbers. The second table has only the certain roll numbers which have a certain value (YES). I want to create a table that takes all of the data from the first table (ROLL_NUM) as well as the IMPROVEMENT records from the second table???? Hope that makes sense, here is the table structure:
ROLL_CURRENT table:
ROLL_NUM LOCATION NAME YEAR
10011 yyyyy xxxx 2001
10012 yyyyy xxxx 2001
10013 yyyyy xxxx 2001
10014 yyyyy xxxx 2001
IMPROVEMENTS table:
ROLL_NUM IMPROVEMENTS
10011 yes
10014 no
there are no entries for ROLL_NUM's 10012 or 10013.
RESULT:
NEW TABLE:
ROLL_NUM LOCATION NAME YEAR IMPROVEMENTS
10011 yyyyy xxxx 2001 yes
10012 yyyyy xxxx 2001 yes
ROLL_CURRENT table:
ROLL_NUM LOCATION NAME YEAR
10011 yyyyy xxxx 2001
10012 yyyyy xxxx 2001
10013 yyyyy xxxx 2001
10014 yyyyy xxxx 2001
IMPROVEMENTS table:
ROLL_NUM IMPROVEMENTS
10011 yes
10014 no
there are no entries for ROLL_NUM's 10012 or 10013.
RESULT:
NEW TABLE:
ROLL_NUM LOCATION NAME YEAR IMPROVEMENTS
10011 yyyyy xxxx 2001 yes
10012 yyyyy xxxx 2001 yes