DB collation

  • I have a database , where some of the tables have  different collation than the database collation , which creates some problem in the application , where the join is happening between two tables with different collation .

    I want a script that allow me to change the collation for all the database char fields.

    Regards

  • We had this problem, but didn't want the hassel of evaluating the impact of changing  the schema so decided just to cast when joining.

    e.g. If DatabaseA contains TableA, and DatabaseB contain TableB to join using (say) ColC, then assuming you are currently in DatabaseA, you would do:

    SELECT *

    FROM TableA as ta

    INNER JOIN DatabaseB..TableB  as tb ON ta.ColC = tb.ColC collate database_default

    Hope this helps.

     

    Jeet


    Thanks Jeet

  • Thanks  alot for this

    Regards

    zarifa

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply