We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
Self-Inflicted SQL
|
| Subject: |
|
update on self joins |
| Date: |
|
2006-02-10 10:32:01 |
| From: |
|
msprotools
|
|
|
|
when i do a select on self join its really doing wonders, however, when i do an update, is says ambiguous table name.
UPDATE NODE_DEFN
Set [Master Account] = ndf2.[Master Account],
[Account]= n1.NDF_NUMBER
FROM NODE_DEFN as n1
left outer join NODE_DEFN ndf2
on n1.NDF_PARENT_RID = ndf2.NDF_RID
WHERE n1.ndf_ABSLEVEL = 1
|