M
Mary
I am kinda rusty with my SQL skills. I was wondering if someone out there
could help me out. I have two tables TradeMedications and GenericMedications
with the following fields.
TradeMedications Table
ID (Primary Key) TradeName Strength Unit
1 Norco Tablet 10 MG
2 Suprax Tablet 5 MG
3 Vicodin Tablet 5 MG
4 Hycamtin 5 MG
GenericMedications Table
TradeName GenericName
Norco Tablet Hyrdrocodone
Hycamtin Topetecan Hydrochloride
I want to create a query that will list all of the rows in TradeMedications
and where a TradeName exists in both TradeMedications and GenericMedications,
I would like to append the GenericName to the end. I would like it blank if
it does not exist. So the result would look something like this.
Query Result
ID TradeName Strength Unit GenericName
1 Norco Tablet 10 MG Hyrdrocodone
2 Suprax Tablet 5 MG
3 Vicodin Tablet 5 MG
4 Hycamtin 5 MG Topetecan
Hydrochloride
could help me out. I have two tables TradeMedications and GenericMedications
with the following fields.
TradeMedications Table
ID (Primary Key) TradeName Strength Unit
1 Norco Tablet 10 MG
2 Suprax Tablet 5 MG
3 Vicodin Tablet 5 MG
4 Hycamtin 5 MG
GenericMedications Table
TradeName GenericName
Norco Tablet Hyrdrocodone
Hycamtin Topetecan Hydrochloride
I want to create a query that will list all of the rows in TradeMedications
and where a TradeName exists in both TradeMedications and GenericMedications,
I would like to append the GenericName to the end. I would like it blank if
it does not exist. So the result would look something like this.
Query Result
ID TradeName Strength Unit GenericName
1 Norco Tablet 10 MG Hyrdrocodone
2 Suprax Tablet 5 MG
3 Vicodin Tablet 5 MG
4 Hycamtin 5 MG Topetecan
Hydrochloride