• Glad you got it working.

    Jody Claggett-376930 (5/1/2009)


    In an Execute SQL task I have the following configuration:

    Result Set = Single Row

    SQLStatement = SELECT COUNT(ID) AS CheckData FROM Table_A

    Compare these in the execution plan.

    SELECT COUNT(ID) AS CheckData FROM Table_A

    SELECTTOP 1 CAST(ISNULL([Rows], 0) AS Int) CheckData

    FROMsys.Partitions P

    WHEREP.[Object_ID] = OBJECT_ID('Table_A')

    The bigger the table, the faster the second query will be in comparison.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort