Susan Harkins
ssharkins at bellsouth.net
Mon Jul 11 08:23:53 CDT 2005
I get the same error on #insert -- just can't seem to get this to work Arthur. Is there perhaps some permission or something that I need to flag to let me view data from these two tables? Or, perhaps it's a question of timing? I have a simple insert/update trigger and at the end I put SELECT Count(*) from #insert And it returned an invalid object error on #insert. Susan H. Yes you're quite right, Michael. Should the update say "Update * FROM Customers SET City = 'Los Angeles' WHERE City = 'New York'", then there could be many rows in both #Inserted and #Deleted. A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Michael Maddison Sent: July 10, 2005 9:21 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] TRIGGER question Not sure about the # myseld but I'd like to add that 'inserted' and 'deleted' can in some instances contain multiple rows. If you think this affects you you could do something like... Select Count(*) from inserted or @@ROWCOUNT may work as well. cheers Michael M _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com