Tuesday, March 31, 2015

Select to Delete conversion

I have to convert the below select statement to Delete, can someone help me on this.



SELECT * FROM [Profile] TAB1
INNER JOIN
(SELECT [Col1] AS [ID],[Col2] AS [FileID]
FROM [SupData]
WHERE UPPER([DSet]) = N'TEST'
)TAB2
ON TAB1.[ID]=TAB2.[ID]
AND TAB1.[FileID] = TAB2.[FileID]



The Above select is giving me 2 records, I want write a script to delete them. the ID and FileID combination will always be unique




Neil



No comments:

Post a Comment