NLS_INITCAP() Function in Oracle

In Oracle, the NLS_INITCAP() function returns its argument with the first letter of each word in uppercase, and all other letters in lowercase.

However, the actual capitalisation will depend on the collation being used. For example, it could result in more than the first letter being capitalised.

It’s similar to the INITCAP() function, except that it accepts a second argument that allows you to specify the collation. The collation handles special linguistic requirements for case conversions. 

Continue reading

SET SQLBLANKLINES: How to Allow Blank Lines in SQLcl & SQL*Plus

If you’re trying to run a multi-line query in SQLcl or SQL*Plus, and you keep getting an error such as “Unknown Command”, but running it in SQL Developer causes no such error, maybe this post will help.

By default, SQLcl and SQL*Plus don’t allow blank lines in SQL statements. However, you can change this with the SET SQLBLANKLINES command.

Continue reading