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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add new column to data set when importing via ODBC or is there a better way?

I am new to Qlikview so sorry if this is a stupid question.

I think I need to add a column to a dataset when importing it into Qlikview via ODBC.

My First Data set is as follows..

Time Period – App type – Username – Hits – Visits

Day1                App1               User1       5          4

Day1                App3               User2       7          2

Day1                App2               User3       5          2

Day1                App1               User4       8          3

My second data set is ….

Time Period - Username - URLs – Page Titles – Hits – Page views – View time

The second data set has a filter applied to it so it only contains data from App3. I was thinking I need to add a column “App type” with a value of App3 for every entry to link it to the first data set. Is this correct or is their an easier way?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

With concatenate you can force loading data into an existing table. New fields will be created as needed. So I think this should work:

Table1:

select "Time Period", "App type", "Username", "Hits", "Visits"

from ...yourfirstdatasource...;

concatenate

select "Time Period", 'App3' as "App type", "Username", "URLs", "Page Titles", "Hits", "Page Views","View time"

from ....yourseconddatasource...;


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

With concatenate you can force loading data into an existing table. New fields will be created as needed. So I think this should work:

Table1:

select "Time Period", "App type", "Username", "Hits", "Visits"

from ...yourfirstdatasource...;

concatenate

select "Time Period", 'App3' as "App type", "Username", "URLs", "Page Titles", "Hits", "Page Views","View time"

from ....yourseconddatasource...;


talk is cheap, supply exceeds demand