• Hello,

    database_name is a nvarchar, how can you pass it to SUM?

    alter the query.

    Regards
    Durai Nagarajan