4493RE: UPDATE question
- Apr 5, 2010SQL Server 2005 Express
I need to UPDATE 3 fields in a table let's call it Master.
The data is gotten from a SELECT which fetches all 3 of the needed fields
and quite a few rows.
Can I do something like
SET field1, field2, field3
(SELECT field1, field2, field3
FROM tables, join ....
WHERE prime key table1 = table2 etc) SEL
WHERE primeKey Master = PrimeKey SEL
Am I being clear here because the syntax is obviously not right but I hope
shows what I'm after.
The rows in Master will exist and the key will exist, I just need to put
data in three fields in Master gathered from a nested query.
Also the nested query has nested queries, each field is pulled from a
different table and the data is pivoted so the above nest does not really
reflect what is happening. If desired I can post just trying to save a bit
Thanks for the lesson I hope I'm about to receive!
- << Previous post in topic Next post in topic >>