• if you need the actual count, instead of just checking for orders, try this way:

    declare @TheCount int

    select @TheCount = count(*) FROM [ReorderS] where Item is not null

    if @TheCount> 0

    BEGIN

    --do stuff

    END

    ELSE

    BEGIN

    --do other stuff

    END

    alternatively, you can use EXISTS:

    if EXISTS(SELECT * FROM [ReorderS] where Item is not null)

    BEGIN

    --do stuff

    END

    ELSE

    BEGIN

    --do other stuff

    END

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!