collation

  • hello experts,

    i want to insert data in table in different language like Czech ,Polish ,Hungarian...

    i defice column data type an nvarchar, but i dont want to put N as prefix at the time of insertion because my all SP are created already and i dont want to make any code level changes...

    collation can help me out in any way.????

    please let me know as soon as possible its urgent and thanks in advance

    regards

    zeal dba

  • i dont want to put N as prefix at the time of insertion because my all SP are created already

    And that is why it's recommended to prefix 'N' in all string value assignments (whether you use multi-lingual DB or not). You may observe this best practice in most of MSDN code samples.

    INSERT npub_info VALUES('0736', N'üThis is sample text data for New Moon Books, publisher 0736 in the pubs database')

    ,('0877', N'üThis is sample text data for Binnet & Hardley, publisher 0877 in the pubs databa')

    ,('1389', N'üThis is sample text data for Algodata Infosystems, publisher 1389 in the pubs da')

    ,('9952', N'üThis is sample text data for Scootney Books, publisher 9952 in the pubs database')

    ,('1622', N'üThis is sample text data for Five Lakes Publishing, publisher 1622 in the pubs d')

    ,('1756', N'üThis is sample text data for Ramona Publishers, publisher 1756 in the pubs datab')

    ,('9901', N'üThis is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G i')

    ,('9999', N'üThis is sample text data for Lucerne Publishing, publisher 9999 in the pubs data')

    GO

    -- Join between npub_info and pub_info on pub_id.

    SELECT pr.pub_id, SUBSTRING(pr.pr_info, 1, 35) AS pr_info,

    SUBSTRING(npr.pr_info, 1, 35) AS npr_info

    FROM pub_info pr INNER JOIN npub_info npr

    ON pr.pub_id = npr.pub_id

    ORDER BY pr.pub_id ASC;

  • Changing the collation will cause more problems than they fix. Besides its not even a real short cut to support unicode char set.

    The right but painful way would be to use N'' where required.

    Also if your switching to unicode you want to be fully aware of the utf encoding being used. it think its UTF 8 in sql.

    and there will be cases when it will still not be able to differentiate between chars.

    Jayanth Kurup[/url]

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

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