Hi,
I have the query and only do something when one of the column is not null
BEGIN
IF Exists (select top 1 corp,price,custname from mytbl where newPrice <> 0) --CONDITION
BEGIN
PRINT 'message1'
END
IF custname from the above query is not null --I don't know the sysntax for this condidion, but basiclly, the message 3 is displayed when custname is null
BEGIN
PRINT 'message3'
END
ELSE
BEGIN
PRINT 'message2'
END
END