if only SQL Server 2005 would bring this feature...
DELETE FROM temp1
WHERE name, description IN
(SELECT name,description
FROM temp2
WHERE name LIKE '%computers%')
The solution is a not so pretty concatenation, if fields are strings
DELETE FROM temp1
WHERE name + description IN
(SELECT name + description
FROM temp2
WHERE name LIKE '%computers%')
But you are forced to use joins if the field is numerical.
I've been receiving a training from INETA as part of SQL 2005 launch this November, I'm planning to ask if they have included any extra features in the new T-SQL, that one would be pretty handy.
0 Comments:
Post a Comment
<< Home