I have a temporary table #SearchTbl in my procedure that is filled with data. I have a SELECT statement that selects some of the data from #SearchTbl. Instead of putting the selected data into a new table, how can I simply delete the rows that do not meet the select statement criteria?
Current method:
INSERT INTO #LoopTbl SELECT * FROM #SearchTbl WHERE Var1 = X AND Var2 > Y AND Var3 < ZI'd rather end up with the selected data in the #SearchTbl (deleting the rest that was in the #SearchTbl), without having to use the #LoopTbl. Is there a simple way to do this?
Gina