• thava (8/23/2013)


    The result is

    PNameManagerDeveloper

    Testdbodbo

    TestdboINFORMATION_SCHEMA

    Testdbosys

    Testguestdbo

    TestguestINFORMATION_SCHEMA

    Testguestsys

    but expected is

    PNameManagerDeveloper

    Testdbodbo

    guestINFORMATION_SCHEMA

    sys

    with a minimal scan count and read count

    If you want the result as expected I think you need to build a SSRS report. In a report you can define if you want to aggregate duplicate values in a row. A resultset in SQL cannot be aggregated like that and will show all values for each row.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **