Collections:
Casting Strings to Wrong Code Pages in SQL Server Transact-SQL
What Happens If Strings Are Casted into Wrong Code Pages in SQL Server Transact-SQL?
✍: FYIcenter.com
In SQL Server, different collations may use different code pages. For example:
If you are casting a string of characters from one code page to a different code page, some characters will be converted to similar characters. For example
PRINT 'Français: eéèê-aà-oô'; -- The default code page PRINT 'Français: eéèê-aà-oô' COLLATE French_CI_AI; -- Code page 1252 PRINT 'Français: eéèê-aà-oô' COLLATE Polish_CI_AS; -- Code page 1250 PRINT 'Français: eéèê-aà-oô' COLLATE Cyrillic_General_CI_AS; -- Code page 1256 Français: eéèê-aà-oô Français: eéèê-aà-oô Français: eéee-aa-oô Francais: eeee-aa-oo
2017-05-13, 976👍, 0💬
Popular Posts:
Where to find answers to frequently asked questions on Transaction Management: Commit or Rollback in...
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-S...
How To Create a Stored Function in Oracle? A stored function is a function with a specified name and...
How To Round a Numeric Value To a Specific Precision in SQL Server Transact-SQL? Sometimes you need ...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...