V_ADHOCQUERY_DISPLAYORDERUNIQUE

Used to ensure that set ad-hoc query display order values are unique.

Fields

Field Field Type Null Description
FOLDERID uniqueidentifier yes
DISPLAYORDER int

Definition

Copy

     CREATE view dbo.V_ADHOCQUERY_DISPLAYORDERUNIQUE with schemabinding
    as
        select
            FOLDERID,
            DISPLAYORDER
        from (select FOLDERID, DISPLAYORDER from dbo.ADHOCQUERY 
                union 
              select FOLDERID, DISPLAYORDER from dbo.SMARTQUERYINSTANCE) QUERY
        where DISPLAYORDER <> 0