Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
sujeetsingh
Master III
Master III

ONLY FOR EXPERTS

Hello,

I am struggling with an issue as :

Let

I am reloading the data as no of tables present in a database ;

Now tin further script i am joining one with another .

Now a situation might come as one of the table is not present but on all i have written it with join script how to avoid it.

Let me explain it with the demo .

It may be that five tables may be present in a database max .

Now i have to script as IF TABLE present then reload all as

Table1:

select * from Table1;

Table2:

Select * from Table2.;

..

....

.......

........

Now in next scripting i am joining all

as

Join(Table1)

Load * resident Table2;

Drop Table Table2l;

Now is table 2 is not present at database then table2 is not present in my script,But i have called it resident in my join statement.

Now i need to put some condition such that it should check if the table is present in my script and loaded ib qlikview.

HOw to do ??

All your ideas invited.

7 Replies
preminqlik
Specialist II
Specialist II

hey hi do like this

Table1:

noconcatenate

select * from Table1;

Table2:

noconcatenate

Select * from Table2.;

Join(Table1)

Load * resident Table2;

Drop Table Table2;

regards

Premhas

israrkhan
Specialist II
Specialist II

Your tables get concatenated automatically,

use NoConcate keyword, then load, and join, at the end drop table..

sujeetsingh
Master III
Master III
Author

It is not as easy as you guys are thinking first of all just i want that before joining we should check whether the table is there or not

Gysbert_Wassenaar

Set the error mode to 0 so the script keeps running:

set ErrorMode=0;


It doesn't then matter if table2 exists or not. If you need to check you can do a test: If NoOfRows('Table2') > 0 then...


talk is cheap, supply exceeds demand
Not applicable

why don't you handle it at sql level itself?

http://stackoverflow.com/questions/8829102/mysql-check-if-table-exists-without-using-select-from

go ahead only if the table exists.

sujeetsingh
Master III
Master III
Author

it is helpful but still i am working on other script steps.

thanks.

marcus_malinow
Specialist III
Specialist III

How about a check such as:

IF NoOfRows('Table2') > 0 THEN

Marcus