[dba-SQLServer] another nudge on that DELETE, OUTER JOIN quirk

Susan Harkins harkinsss at bellsouth.net
Tue May 16 07:50:15 CDT 2006


That's true Arthur, but unless I'm enabling features that limit my ability
to create orphans, I should be able to do so if I wish -- although I
wouldn't. 

I couldn't delete records on either side was the problem. The documentation
says you couldn't delete records on the nullable table, and I just didn't
think that shouldn't right. The explanation was incomplete. 

Susan H. 

I'm not sure about what is technically possible in this case, but if you
meant your query explicitly then I'd say you hit a feature, not a problem.
Otherwise you'd be orphaning Orders rows.

Susan Harkins <harkinsss at bellsouth.net> wrote: I tried yours -- the only
difference seems to be that you specified the non-nullable table. Using the
following statement, I still got an error:

DELETE Customers.*
FROM Customers LEFT JOIN Orders
ON Customers.CustID = Orders.CustID

I'm using Express -- prehaps the two versions aren't compatiable on this
issue?

Susan H. 


 Are you specifying which table to delete from

DELETE DISTINCTROW Original_Table.* FROM  Original_Table LEFT JOIN ...
or
DELETE  Original_Table.* FROM  Original_Table LEFT JOIN ...


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 5/14/2006
 




More information about the dba-SQLServer mailing list