In Oracle Database, we can concatenate strings and numbers with the CONCAT() function or the pipe concatenation operator (||).
Oracle
How to Format Numbers in Oracle
In Oracle Database, you can format numbers in many ways.
For example, you can format a number as a currency, with commas and decimal points in the right place. You can specify leading zeros, you can add a fractional part – or remove it, if that’s what’s required.
Return the Short Day Name from a Date in Oracle
In Oracle Database, we can use the TO_CHAR(datetime) function to return the various date parts from a datetime value, including the short day name.
The short day name is also referred to as the abbreviated day name. In any case, below are examples of returning the short day name from a date value in Oracle.
List of Territories Supported by Oracle Database
Below is a list of territories that are supported by Oracle Database. These can be used when setting the NLS_TERRITORY initialization parameter.
Capitalization of Day and Month Names When Formatting Dates in Oracle
When getting the day and/or month name from a date in Oracle, you may want to return it in uppercase, lowercase, or title case.
Fortunately, this is easy to do. The result reflects the capitalisation of your format model.
JSON_OBJECTAGG() Function in Oracle
In Oracle Database, the JSON_OBJECTAGG() function creates a JSON object from a key-value pair.
Typically, the property key, the property value, or both are columns of SQL expressions.
SQLcl Formatting Options (Oracle)
When using SQLcl to query Oracle Database, you can use the SET SQLFORMAT command to determine the format of the results.
You can also use inline comments to specify the format from directly within your query.
JSON_OBJECT() Function in Oracle
In Oracle Database, the JSON_OBJECT() function creates a JSON object from a sequence of key-value pairs or one object type instance.
Export Oracle Query Results to an HTML File when using SQLcl
When using SQLcl with Oracle Database, you can use the SPOOL command to export your query results to a file with an .html extension, and you can set SQLFORMAT to html in order to output the actual query results in HTML format.