K
Kim K
I have two tables, one table with one primary key and one table with several
keys:
Table 1
NDC GPI
57866660701 1
Table 2
NDC APPL_NO APPL_TYPE_CD
57866660701 074105 2
57866660701 074140 2
57866660701 074207 2
57866660701 074410 2
57866660701 075927 2
57866660701 076494 2
There are a two things I need to do after joining these two tables. One is
to find out if there are any records in the second table with different
values in the "APPL_TYPE_CD" field for one NDC number. The other is to only
return the first record from the second table, not all of them.
Help?
Thanks!
keys:
Table 1
NDC GPI
57866660701 1
Table 2
NDC APPL_NO APPL_TYPE_CD
57866660701 074105 2
57866660701 074140 2
57866660701 074207 2
57866660701 074410 2
57866660701 075927 2
57866660701 076494 2
There are a two things I need to do after joining these two tables. One is
to find out if there are any records in the second table with different
values in the "APPL_TYPE_CD" field for one NDC number. The other is to only
return the first record from the second table, not all of them.
Help?
Thanks!