-
SQL 2000; Delete Trigger
SQL 2000 Server
-------------------
I have three tables connected by a parent-child relationship :a,b &c
I have a trigger in table b with line:
SET @lng_clientid = (SELECT lng_clientid FROM deleted)
Through the Enterprises manager when I delete a record from table a, I get the following message:
"Subquery returned more than one value"
However, even though there are two records in b, it should delete one record at a time (in that way there is only one value for @lng_clientid ) and should not give that error; right?
Why is this happening so?
-
Its a table level trigger and not row level trigger. You should count the rows in deleted table (Select Count(*) from deleted) before process the table.
-
Can we make a row level trigger? What is the difference between a table level and row level trigger?
-
No, it is not possible in SQL Server 2000 or earlier. It is there with Oracle
Similar Threads
-
By rperez in forum Database
Replies: 5
Last Post: 01-02-2009, 04:14 PM
-
By lagyossarian in forum Database
Replies: 1
Last Post: 04-06-2006, 02:43 PM
-
By Maria in forum Database
Replies: 1
Last Post: 08-13-2002, 01:58 PM
-
Replies: 3
Last Post: 01-29-2002, 09:58 AM
-
Replies: 0
Last Post: 12-06-2000, 07:59 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks