I am using SQL2012, Using SSMS, I am trying to concatenate data from two columns into a columns that already has data. The Class_id and Qual_id are in the Statute table, BUT, I need to write a select statement to pull the Class _Code referencing the Class_id from the Class table and the same with the Qual_code and the Qual_id from the Qual table.
Sample of Statute table:
Statute Class_id Qual_id
28-701A 1000001 1000003
I need the data to appear in the Statute columns like this:
Statute
28-701a (M1) (DV)
I want to pull in the Class Code for the specific Class_id from the Class table
Class_Id Class_code
1000001 M1
I want to pull in Qual Code for the specific Qual_ID from the Qual table
Qual_Id Qual_code
1000003 DV
Sample of Statute table:
Statute Class_id Qual_id
28-701A 1000001 1000003
I need the data to appear in the Statute columns like this:
Statute
28-701a (M1) (DV)
I want to pull in the Class Code for the specific Class_id from the Class table
Class_Id Class_code
1000001 M1
I want to pull in Qual Code for the specific Qual_ID from the Qual table
Qual_Id Qual_code
1000003 DV