• Since you're not passing any parameters to the proc/view, it should be possible with a view.

    I don't have your tables, so here's a generic version:

    create view RowExists

    as

    select (cast 1 as bit) as RE

    from dbo.Table1

    where exists

    (select *

    from dbo.Table1)

    union

    select top 1 (cast 0 as bit)

    from sys.all_objects

    where not exists

    (select *

    from dbo.Table1)

    You might be able to use something like that to get the job done.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon