• I didn't supply an explicit collation string, the string"COLLATE DATABASE_DEFAULT", tells the temp table to use the default collation of the database that was restored no matter what the collation of the SQL server.

    If the stored procedure had been written that way, I would never need to run your script at all. It would run naturally on any database server that is configured with any collation.

    The actual application is sold world wide so I can receive a backup from any where in the world any collation. I recently received a database from South America. Keeping their database in their collation was important when trouble shooting.

    I would rather diagnose the problem that the customer is experiencing as close to their native implementation as possible.

    Thanks for your post. I'm glad people actually read it.

    Actually a very recent post about scalar functions and their performance became the topic of a recent meeting here.

    All good stuff

    Tom Romeo
    Practical Compliance Solutions Corp.
    One Orient Way - Suite F156.
    Rutherford, NJ 07070-2524
    --------------------------------
    www.complianceabc.com
    email: tromeo@complianceabc.com
    Phone: 201-728-8809