Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
Your tables get concatenated automatically,
use NoConcate keyword, then load, and join, at the end drop table..
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
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...
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.
it is helpful but still i am working on other script steps.
thanks.
How about a check such as:
IF NoOfRows('Table2') > 0 THEN
Marcus