IBM Support

Oracle SQL tips / tools : Using NLS_Date_Format, Decode in Queries

Troubleshooting


Problem

Oracle SQL tips / tools : Using NLS_Date_Format, Decode in Queries

Symptom

General / widely useable stuff

Cause

Resolving The Problem

To view all DATE type variables in detail format ( minute second level )
alter session set nls_date_format='YYMMDD:HH24MISS';
----------------------
Translate cryptic values into more sensible strings / Names.
Use Decode
select decode(
FLD_NAME,
, 'VAL_01','STRING_01'
, 'VAL_02','STRING_02'
,'DEFAULT_STRING') HEADING_OUTPUT
from < ... your Query here ... >
----------------------

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI48381

Product Synonym

[<p><b>]Fact[</b><p>]

Document Information

More support for:
IBM Sterling Order Management

Software version:
All

Document number:
181103

Modified date:
16 June 2018

UID

swg21541514

Manage My Notification Subscriptions