Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kasimyc
Contributor III
Contributor III

SQL pivot load script

hi,

 I was not able to run the following query on Qlik. I'm getting "the specifier too long error." Do you think there is another way around this?

thank you for your help

Select *
from
(select UNIQUE_ID, KEY, VALUE
from dwh.2fa_daily_log
)
PIVOT
(
Max(VALUE)
for KEY in
(

CUSTOMER_ID AS CUSTOMER,
GDPR AS GDPR_FLAG,
CALLSEGMENT_START_DATE AS CALL_START,
CALLSEGMENT_END_DATE AS CALL_END,
2FA_SUCCESS AS TWOFA_SUCCESS,
CALL_REASON AS CALL REASON,
LEVEL AS IDENTITY_LEVEL
)
);

 

1 Reply
ramasaisaksoft

Hi Kasi ,

 

As i know

Making a pivot table in the script is not possible. There is no such thing as a pivot table in your data model. All data will end up in "regular" tables. ... You will need to be on Qlik Sense 1.1 to use the pivot table

Still if you want to create a pivot table then you should follow like this

https://community.qlik.com/t5/App-Development/how-to-pivot-in-load-script/td-p/1513761

https://community.qlik.com/t5/QlikView-App-Dev/Pivot-Data-in-Qlik-Load-Script/td-p/34819

https://community.qlik.com/t5/New-to-Qlik-Sense/transposing-pivoting-in-the-data-load-editor/td-p/15...