Hello;
I have the following tables and columns:
Faci (Table); PNum (Column)
FaciGrp (Table); PNum, GrID (Columns)
Profile (Table): PNum, Criteria, Value (Columns)
The content in the tables is as follows:
Faci
PNum
101
102
103
104
FaciGrp
PNum GrID
101 2002
101 2003
102 2002
103 2004
I need to transfer all the PNum in Faci table to Profile table and also grid's (which are called criteria in Profile table) that have 2002 and put "Yes" or "No" in the values column. So my profile table would look like
Profile
PNum Criteria Value
101 2002 Yes
102 2002 Yes
103 2002 No
104 2002 No
I am having trouble getting the sql that can do this. Can anyone please help?
Thanks a lot.