• To avoid problems with temp tables caused by server collation i always script them like this:

    CREATE TABLE #tbl(

    col1 varchar(10) COLLATE DATABASE_DEFAULT

    );

    _____________
    Code for TallyGenerator