Blog Archives

chr(163) for £ pound character

Use chr(163) for the ‘£’ character, especially in stored SQL such as create procedure scripts, where you can’t be sure what client character settings might be used to re-create the procedure. SELECT m.description, chr(163)||TO_CHAR(m.weekly_rate, ‘999.99’) amount from my_table m; This

Posted in Character sets

chr(13) chr(10) carriage return line feed CR LF

chr(13) and chr(10) are the carriage return line feed CR LF characters, so to strip them out: select replace(replace(m.long_notes,chr(10),’ ‘),chr(13),’ ‘) from mytable m;

Posted in Character sets

Oracle Application Server sets NLS_LANG by default

If you don’t specify NLS_LANG in your shell when starting OAS, OAS goes and sets it for you. Fix is to specify NLS_LANG in any OAS startup scripts you use, or edit these files: $ grep -i NLS_LANG $ORACLE_HOME/Apache/Apache/bin/apachectl NLS_LANG=${NLS_LANG=”ENGLISH_UNITED

Posted in Character sets

Logon Trigger to Capture Session NLS_Territory

You can see your own sessions nls settings select * from nls_session_parameters ; But for other users’ sessions, that information is stored in their own UGA, not accessible outside their session. So if you need to know what their nls

Posted in Character sets

Howto remove carriage return line feed from SQL Server for displaying in Excel

Use this SQL to remove carriage return line feed from SQL server for displaying in excel: SELECT REPLACE ( column_name , CHAR(13) + CHAR(10) , ‘, ‘ ) FROM table_name GO Based on posts by Aaron Bertrand and David Seruyang.

Posted in Character sets, SQL server

And on the seventh day, God fiddled with His NLS settings

This would seem to be pretty authoritative: “And on the seventh day God ended his work which He had made; and he rested on the seventh day from all his work which He had made. And God blessed the seventh

Posted in Bugs, Character sets