Sorry if this seems basic but I'm having a brain cramp this morning. I want to update a table with data from another table but I really don't need to join the two. My query from the second table returns just one row. So it looks something like this
Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
Code:
UPDATE myTable SET
col1 = subquery.colA
, col2 = subquery.colB
WHERE myTable.col3 = 'some value'
[blue]subquery[/blue]
SELECT colA, colB
FROM anotherTable
WHERE colC = 'some other value'
Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook