none
How to find empty collection

    問題

  • How could find those collections which have 0 memebers,

    i lots of collection is SMS , and wanna delete those collcetions, and lots of collections have 0 members, so i want to find those collections,

    please let me know the sql query to find out


    Sharad Singh | My blogs: SharadTech | Twitter: @MrLucknowWale |

    2012年6月16日 下午 03:35

解答

  •  got it i can use this query

    select
        C.Collectionid,
        C.Name
    from
        dbo.v_Collection C
    Where
        C.Collectionid not in (Select Collectionid from dbo.v_FullCollectionMembership)


    Sharad Singh | My blogs: SharadTech | Twitter: @MrLucknowWale |

    • 已標示為解答 SinghSharad 2012年6月16日 下午 03:37
    2012年6月16日 下午 03:37