SQL newby in deep water thats way over my head. Any help appreciated.
I am trying to retrieve data from field in one table and append it to on field in a second table. Each the fields had a Field ID that is different for each. The rows also have no way to relate to each other without linking through a third table. And just for fun I need to restrict the update to only a subset of the rows in TableB
So it looks like this:
TableA TableB TableC
Field1 (ID=20) Field2 (ID=22) TempID
TempID IssueID IssueID
And I tried to do this
Update TA
Set TA.F1=TA.F1 + TB.F2
Where (TA.ID=20) AND (TB.ID=22) AND (TB.IssueID=TC. IssueID) AND (TC.TempID=TA.T empID) AND (TB.IssueID>220 0)
I am trying to retrieve data from field in one table and append it to on field in a second table. Each the fields had a Field ID that is different for each. The rows also have no way to relate to each other without linking through a third table. And just for fun I need to restrict the update to only a subset of the rows in TableB
So it looks like this:
TableA TableB TableC
Field1 (ID=20) Field2 (ID=22) TempID
TempID IssueID IssueID
And I tried to do this
Update TA
Set TA.F1=TA.F1 + TB.F2
Where (TA.ID=20) AND (TB.ID=22) AND (TB.IssueID=TC. IssueID) AND (TC.TempID=TA.T empID) AND (TB.IssueID>220 0)
Comment