Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help with deleting record

Author  Topic 

kurtgr
Starting Member

25 Posts

Posted - 2009-07-10 : 08:57:32
Hi All

Can someone tell me if this is correct

DELETE FROM Skill Where Skill =
(Select Skill
FROM OpenXML(@XMLHandler,'/VFPData/curskillup', 1)
WITH (Skill CHAR(20) '@skill',
Action CHAR(1) '@action'
) S
WHERE S.Action = 'D')

I think this is where i am getting an error from my application

its in a store procedure and i call the store procedure from from application

Thanks in advance

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-07-10 : 09:18:32
Try

DELETE FROM Skill Where Skill in
(Select Skill
FROM OpenXML(@XMLHandler,'/VFPData/curskillup', 1)
WITH (Skill CHAR(20) '@skill',
Action CHAR(1) '@action'
) S
WHERE S.Action = 'D')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

kurtgr
Starting Member

25 Posts

Posted - 2009-07-10 : 09:23:11
Thanks Madhivanan

But i just realized its the Trigger give me the error
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-10 : 11:14:46
what was error? did you solved it?
Go to Top of Page

kurtgr
Starting Member

25 Posts

Posted - 2009-07-10 : 19:53:47
Yes I was using a Instead of Delete Trigger in which i should have use FOR DELETE Trigger
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-12 : 03:50:07
oh..i see
Go to Top of Page
   

- Advertisement -