me*****@yahoo.com wrote:
I'm new to adp w/ sql server but I have to use it on a project i'm
doing...
One of the MUSTS for this project is the ability to update a 00 - 09
text value with the appropriate text description from another table...
Easy as pie in .mdb. Of course In the stored procedure it barks at me
and tells me that an update query can only have one table.. ouch that
hurts...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use the FROM clause in SQL'r UPDATEs, or subqueries:
UPDATE table1
SET column = t2.column
FROM table2 as t2 INNER JOIN table1 as t1
ON t2.id = t1.id
WHERE < your criteria >
or
UPDATE table1
SET column = (SELECT column FROM table2 WHERE id = @id)
WHERE id = @id
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQjTwlYechKqOuFEgEQJsjgCfT9MDwYf4bAXKs0Dkmc8HqT TH2KcAoLev
pwNEviuiReVjgvY3s2g8H26T
=ZPxL
-----END PGP SIGNATURE-----