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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Louveduval
Creator
Creator

source name in concat

Hello,

 

I'm sorry to bother you , I have concatenated 10 tables but I would like to have a column with the name of the source.

 

LOAD Id_kpi_article_depot,
Cle_article_depot,
Code_article,
Code_depot,
Libelle_depot;

[CO002_KPI_ARTICLES_DEPOTS]:
SELECT "Id_kpi_article_depot",
"Cle_article_depot",
"Code_article",
"Code_depot",
"Libelle_depot",

sources name 

FROM "Data_Coops".dbo."CO002_KPI_ARTICLES_DEPOTS";

Concatenate

[CO004_KPI_ARTICLES_DEPOTS]:
SELECT "Id_kpi_article_depot",
"Cle_article_depot",
"Code_article",
"Code_depot",
"Libelle_depot"


FROM "Data_Coops".dbo."CO004_KPI_ARTICLES_DEPOTS";

 

 

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

If the tables contain an appropriate information you could just add it to the load (by loading from flat-file you could use something like filebasename() but I'm not sure if your data-base has a similar function) - otherwise you could simply add it manually, like:

'CO0002' as "Source"
respectively 
'CO0004' as "Source" 

View solution in original post

1 Reply
marcus_sommer

If the tables contain an appropriate information you could just add it to the load (by loading from flat-file you could use something like filebasename() but I'm not sure if your data-base has a similar function) - otherwise you could simply add it manually, like:

'CO0002' as "Source"
respectively 
'CO0004' as "Source"