Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am new to qlikview. I am trying to add a column to all records I am loading that identifies the source data wharehouse. In a CSV load I would just right at the end of the colmns - 'Table xxx' as SOURCE - and I would be able to query SOURCE in my visualizations. I can load the data correctly but I don't know how to add this extra column to each record.
OLEDB CONNECT TO [Source ID Properties (all this stuff works)] (XPassword is (all this stuff works));
SQL
SELECT
"Dimension_1",
"Dimension_2",
"Dimension_3",FROM "Data Source"
where Dimension_3 = 20120101;
Hello,
I guess in the case of a simple sql query, such changes can be added directly in the statement.
But usually a preceding load in QV will help you in any needed data transformation, for example:
Table1:
Load field1,
field2,
field1 & ' | ' & field2 as keyfield,
'custom data' as customfield;
SQL SELECT field1, field2 FROM database;
Whenever you connect to your sql db to extract the tables, in the "script" tab, check the "Preceding Load" option so the "load" part comes automatically.
Hope this helps.
Hello,
I guess in the case of a simple sql query, such changes can be added directly in the statement.
But usually a preceding load in QV will help you in any needed data transformation, for example:
Table1:
Load field1,
field2,
field1 & ' | ' & field2 as keyfield,
'custom data' as customfield;
SQL SELECT field1, field2 FROM database;
Whenever you connect to your sql db to extract the tables, in the "script" tab, check the "Preceding Load" option so the "load" part comes automatically.
Hope this helps.
You were right I did not clearly understand the role of the preceding load. I researched your answer a bit more and found this link helpful
http://qlikviewnotes.blogspot.com/2009/12/simplify-with-preceeding-load.html
Thanks JP for your quick help!!!