case statement

  • Hi

    In below line i want if when > 0 instead of 0 then what should i change

    (Select Case (select count(*) from tbl1 T where T.num = T0.num ) when 0 then

    Thanks

  • DECLARE @x INT = 5;

    SELECT Result = CASE
    WHEN @x > 0 THEN
    'GT0'
    ELSE
    'NOT GT0'
    END;

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply