Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Current data format is below and Ende_date_Seiten_Data column wise is a combination of Ende_Data and Seiten_Data column.
We are getting data in the column format.
Stage_Type | Stage | Type | Ende_Data | Seiten_Data | Ende_date_Seiten_Data |
Re-Import 1 Ende | Re-Import 1 | Ende | 9/13/2017 | 9/13/2017 | |
Re-Import 1 Seiten | Re-Import 1 | Seiten | 16 | 16 | |
Übermittlung Bild-PDF Ende | Übermittlung Bild-PDF | Ende | 9/21/2017 | 9/21/2017 | |
Übermittlung Bild-PDF Seiten | Übermittlung Bild-PDF | Seiten | 18 | 18 | |
Upload auf OMN Ende | Upload auf OMN | Ende | 9/8/2017 | 9/8/2017 | |
Upload auf OMN Seiten | Upload auf OMN | Seiten | 30 | 30 |
We need to transpose to Row.,IWe need output in single row for each stage instead of 2 columns
Stage | Ende | Seiten |
Re-Import 1 | 9/13/2017 | 16 |
Übermittlung Bild-PDF | 9/21/2017 | 18 |
Upload auf OMN | 9/8/2017 | 30 |
Could you please help us to transpose from the above last column to row
Check here:
You can use the below code in script level to create separate tables if you have limited number of types in the db.
tabe1:
LOAD
Stage,
if(Type = 'Ende',Ende_date_Seiten_Data) as 'ende'
FROM
D:\Users\knataru\Downloads\Book1.xlsx
(ooxml, embedded labels, table is Sheet1) where Type = 'Ende';
tabe2:
LOAD
Stage,
if(Type = 'Seiten',Ende_date_Seiten_Data) as 'seit'
FROM
D:\Users\knataru\Downloads\Book1.xlsx
(ooxml, embedded labels, table is Sheet1) where Type = 'Seiten';