Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i've this table:
Functional area | Application Name | Keywords |
FUN1 | Key1 | Key1; Key2 |
FUN1 | App | App; Actual; Flash |
FUN2 | Daily View | Key1; Analysis |
FUN2 | TLC Key1 Analysis | Key1; Telecom; MMS |
FUN3 | Order in Take | Ordered |
FUN3 | FUN2les Analysis | Backlog; Forward Orders |
The field Keywords contains words separate by ';' semicolon.
I need to split this words and duplicate the rows.
At the end, i want obtain this result:
Functional area | Application Name | Keywords |
FUN1 | Key1 | Key1 |
FUN1 | Key1 | Key2 |
FUN1 | App | App |
FUN1 | App | Actual |
FUN1 | App | Flash |
FUN2 | Daily View | Key1 |
FUN2 | Daily View | Analysis |
FUN2 | TLC Key1 Analysis | Key1 |
FUN2 | TLC Key1 Analysis | Telecom |
FUN2 | TLC Key1 Analysis | MMS |
FUN3 | Order in Take | Ordered |
FUN3 | FUN2les Analysis | Backlog |
FUN3 | FUN2les Analysis | Forward Orders |
I've to do this in ETL.
How can i do it with script?
thanks!!
Silvia
Try this:
LOAD [Functional area],
[Application Name],
SubField(Keywords, '; ') as Keywords
FROM
[db_split.xlsx]
(ooxml, embedded labels, table is Sheet1);
Hi Silvia,
in script use
SubField(Keywords,';') as Keywords
...
Regards,
Antonio
Try this:
LOAD [Functional area],
[Application Name],
SubField(Keywords, '; ') as Keywords
FROM
[db_split.xlsx]
(ooxml, embedded labels, table is Sheet1);
From QV help :
Nella versione a tre parametri, questa funzione di script restituisce una determinata sottostringa da una stringa più grande s con il delimitatore delimiter. index è un numero intero opzionale che indica quale sottostringa deve essere restituita. Se index è omesso quando subfield viene utilizzato in un'espressione di campo in un'istruzione load, la funzione subfield indurrà l'istruzione load a generare automaticamente un record di dati di input completo per ogni sottostringa trovata in s.
Thank you very much!
Silvia
thank you very much.
Silvia