In a stored procedure how to run a query and conditionally do something
Posted
by Greg
on Stack Overflow
See other posts from Stack Overflow
or by Greg
Published on 2010-05-11T14:00:49Z
Indexed on
2010/05/11
14:04 UTC
Read the original article
Hit count: 288
How would I do this in a stored procedure (SQL 2005):
count = select count(*) from table1 where line like '%success%'
if count > 0:
delete from table1 where not line like '%success%'
Thanks for any help. My google skills are really failing me today :-(
© Stack Overflow or respective owner