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
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

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

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