Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Decode function after SQL prefix

While loading data to my QlikView application I am trying to use advanced SQL features such as functions (e.g. decode()), joins etc. after the prefix SQL as shown below example:

XYZ:

Load

   [AAA] as ,

   [BBB] as ,

   [CCC] as ;

SQL select AAA, BBB, DECODE (warehouse_id, 1, 'Southlake',  2, 'San Francisco', 'Non domestic')) as CCC from TableName;

In the above situation, QlikView throws an error like 'Unknown Column Name - DECODE'

What's the workaround?

1 Reply
ThornOfCrowns
Specialist II
Specialist II

DECODE is an Oracle SQL version of CASE, which does not exist in Qlikview. You may have to either set a linked table or resort to nested IFs, I'm afraid.