Viewing 15 posts - 106 through 120 (of 122 total)
Can be done using temp table
SELECT EmpID,EmpName INTO #temp
FROM Employees
GROUP BY EmpID,EmpName
HAVING COUNT(*)>1
DELETE Employees FROM Employees a INNER JOIN #temp b ON
a.EmpID=b.EmpID
INSERT INTO Employees(EmpID,EmpName)
SELECT EmpID,EmpName FROM #temp
March 24, 2011 at 11:06 pm
Could you please send sample data set. It works fine with merge join.
March 24, 2011 at 9:25 am
Thanks a lot as simple as that. really appreciate
February 25, 2011 at 12:33 pm
#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
OnPostValidate,PRAVEEN,PRAVEEN\HomeComputer,File System Task,{F8E35F86-6F14-4FBC-B43E-0DC84E644849},{53E5E464-3383-47F5-97B7-014D12224E8F},2/22/2011 8:20:40 PM,2/22/2011 8:20:40 PM,0,0x,(null)
OnPostValidate,PRAVEEN,PRAVEEN\HomeComputer,Package1,{12F1584C-3E98-4398-9964-764F8DF3439A},{53E5E464-3383-47F5-97B7-014D12224E8F},2/22/2011 8:20:40 PM,2/22/2011 8:20:40 PM,0,0x,(null)
OnPostValidate,PRAVEEN,PRAVEEN\HomeComputer,File System Task,{F8E35F86-6F14-4FBC-B43E-0DC84E644849},{2D502555-864C-41B2-94D1-FE2729CA092E},2/22/2011 8:20:40 PM,2/22/2011 8:20:40 PM,0,0x,(null)
OnPostValidate,PRAVEEN,PRAVEEN\HomeComputer,Package1,{12F1584C-3E98-4398-9964-764F8DF3439A},{2D502555-864C-41B2-94D1-FE2729CA092E},2/22/2011 8:20:40 PM,2/22/2011 8:20:40 PM,0,0x,(null)
PackageStart,PRAVEEN,PRAVEEN\HomeComputer,Package1,{12F1584C-3E98-4398-9964-764F8DF3439A},{2D502555-864C-41B2-94D1-FE2729CA092E},2/22/2011 8:20:40 PM,2/22/2011 8:20:40 PM,0,0x,Beginning of package execution.
OnPreExecute,PRAVEEN,PRAVEEN\HomeComputer,Package1,{12F1584C-3E98-4398-9964-764F8DF3439A},{2D502555-864C-41B2-94D1-FE2729CA092E},2/22/2011 8:20:40...
February 22, 2011 at 7:53 am
as simple as that
it worked
thanks
praveen
February 15, 2011 at 11:38 am
Hi
i am not able solve this problem. can any body guide how to solve this. send me sample script.
thanks
February 15, 2011 at 12:04 am
sure going forward will make sure that
thanks
February 13, 2011 at 5:55 am
thanks for the inputs
February 13, 2011 at 5:53 am
IF you could send me sample script would appreciate that.(cascade delete)
February 13, 2011 at 4:59 am
the script
DECLARE @DeleteOutput3 TABLE (CONID INT PRIMARY KEY CLUSTERED)
DELETE Contact
OUTPUT
deleted.CONTACTID
INTO @DeleteOutput3
WHERE CONTACTID = 10;
DELETE SALESHEADER FROM SalesHeader INNER JOIN
@DeleteOutput3 d ON SalesHeader.CONTACTID=d.CONID
February 13, 2011 at 4:45 am
Hey i just checked with this query given by you
still i am getting error message. Could you please help me to resolve this issue
Msg 547, Level 16, State 0,...
February 13, 2011 at 4:44 am
YES I WANT TO DELETE OR UPDATE ROWS FROM TABLE 2 ALSO
THANKS
February 11, 2011 at 3:35 am
🙂
February 10, 2011 at 4:42 am
HEY
COULD YOU PLEASE SHARE SAMPLE SAMPLE CODE.
THANKS
February 10, 2011 at 4:32 am
Viewing 15 posts - 106 through 120 (of 122 total)