Hi there
unfortunately I could not get helpful search results for my problem. Maybe one of you knows an answer:
I have 2 tables.
Table 1 AllMyData
Primary key consists of more than one column
e.g. column A and column B
Table 2 MySelection
a subset of keys from Table 1
column A, column B
I need to UPDATE a field of table 1 in all rows whose keys appear in Table 2
If there was only one primary key, I would do:
UPDATE AllMyData.X SET X=false
WHERE AllMyData.A IN (SELECT A FROM MySelection)
(basically I need this when A and B together are the primary key - but all I tried has failed so far)
unfortunately I could not get helpful search results for my problem. Maybe one of you knows an answer:
I have 2 tables.
Table 1 AllMyData
Primary key consists of more than one column
e.g. column A and column B
Table 2 MySelection
a subset of keys from Table 1
column A, column B
I need to UPDATE a field of table 1 in all rows whose keys appear in Table 2
If there was only one primary key, I would do:
UPDATE AllMyData.X SET X=false
WHERE AllMyData.A IN (SELECT A FROM MySelection)
(basically I need this when A and B together are the primary key - but all I tried has failed so far)