Embedding NLS parameters in the TO_CHAR function
To create a complex solution, the third parameter of TO_CHAR
comes onto the scene. The language defined at the system, client, or session level needs to be relevant for applications that use durable database connections – but not only for them. Changing the date language can negatively impact already existing modules. If the user is not aware of the potential consequences, such an approach can be risky. Therefore, changing the processed language for the particular statement is more useful and robust. The third parameter (nls_parameter
) of the TO_DATE
and TO_CHAR
conversion functions deals with the processed language:
TO_CHAR(<value> [, <format> [, <nls_parameter>]]
The main advantage of setting nls_parameter
for the particular statement is robustness. It does not impact any other statements and strategies and only operates inside the proposed IS_WORKDAY
function. Thus, correct results for whether a given...