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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Select / Load - Column names transformed to column values

Hello,

I wonder if anybody could tell me if there is any way to solve the following problem. I have an SQL which looks like :

select Country, Month, Column1, Column2, ColumnN

from mytable;

I would like the result of this SQL to be "transformed" to fill a QlikView table which has the following format :

Country

Month

Column_Name

Value

For example if the SQL produced the following result :

Germany, Jan2014, 10, 20, 30

this would be placed in the QlikView table as :

Record 1:

Germany

Jan2014

Column1

10

Record 2:

Germany

Jan2014

Column2

20

Record 3:

Germany,

Jan2014

ColumnN

30

I would be very gratefully for any ideas / suggestions.

Thanks.

1 Reply
swuehl
MVP
MVP

Look into the CROSSTABLE LOAD prefix, something like

CROSSTABLE (Column, Value, 2 ) LOAD *;

select Country, Month, Column1, Column2, ColumnN

from mytable;