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;

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

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

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