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

Loading tables from another Qlikview Document

Hi

I want to load some tables from another Qlikview document. I am aware you could do a binary load for this, but I only want to load say 2 out of 20 tables, and therefore would have to write 18 drop table statements.

Is the best way to do this to generate QVD's of the data I want to extract from the 'other' Qlikview document? Or can in my script write something like

'Load [Tablex] from filename.qvw'

Thanks

Doug

1 Solution

Accepted Solutions
Not applicable
Author

Doug Thorp wrote:

Is the best way to do this to generate QVD's of the data I want to extract from the 'other' Qlikview document? Or can in my script write something like

'Load [Tablex] from filename.qvw'

Hi Doug,

You cannot load individual tables from another QVW. The best approach is to generate QVDs.

Alternatively you could loop through the loaded tables automatically and drop them that way, e.g.

Binary [test.qvw];

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='£#,##0.00;-£#,##0.00';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

let n = NoOfTables();

for x = 1 to $(n)

  let t = TableName(0);

  drop table [$(t)];

next

You could wrap the drop table command in an IF statement to exclude the tables you want to keep.

View solution in original post

2 Replies
Josh_Good
Employee
Employee

You can use the attached QVW to generate QVDs of all the tables.  This is the fastest way to get at a few tables.

Your other alternative would be to do a binary load and then drop the tables you don't want.  This would only make sense if you want almost all the tables from the source QVW.

Not applicable
Author

Doug Thorp wrote:

Is the best way to do this to generate QVD's of the data I want to extract from the 'other' Qlikview document? Or can in my script write something like

'Load [Tablex] from filename.qvw'

Hi Doug,

You cannot load individual tables from another QVW. The best approach is to generate QVDs.

Alternatively you could loop through the loaded tables automatically and drop them that way, e.g.

Binary [test.qvw];

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='£#,##0.00;-£#,##0.00';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

let n = NoOfTables();

for x = 1 to $(n)

  let t = TableName(0);

  drop table [$(t)];

next

You could wrap the drop table command in an IF statement to exclude the tables you want to keep.