I am looking for an SQL solution for a data update I need to do - I am out of my depth on this one and have been unable to find a solution anywhere that seems to fit my criteria.
I have a table which needs to have a 'bit' field set to 1 dependant on the result of the existance of a value of a field in another table.
Let me go into more detail
The table that needs updating looks like this:
WasteDetailId (PK, int)
The second (lookup) table looks like this:
ContractorId (PK, int)
I need to set the 'Active' field on the first table to '1' if there is a value in the 'ContractorTypeId' field in table 2 but only if the 'ContractorId' of table2 = 'ContractorId' of table1...
Any help with this would be greatly appreciated as I have reached an impass on this one.