Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Suppose I have 3 tables, all containing amongst others a company name (fieldname is Company). I want to limit my output to one company: ' ABC'.
What I do now is for each of the tables I insert WHERE(Company='ABC'). Is it possible to make 1 WHERE statement that goes for all tables?
appreciate your response
Hans
One option is to use the current where clause for the first table, and for the other two use WHERE EXISTS(Company).
For the other two tables, it will only load records where the company exists.
Frank
Hi
You can define the where-statement in a varible that you use in all your 3 load-statements:
LET whereStatement = 'WHERE(Company=' & chr(39) & 'ABC' & chr(39) & ')'; 'chr(39) is the single quote character
LOAD * FROM myFile $(whereStatement);
LOAD * FROM mySecondFile $(whereStatement);
LOAD * FROM myThirdFile $(whereStatement);
/Fredrik
Hi Frank,
t.u. for your answer. It helps unexperienced programmers like me to learn the tricks of the trade.
Hi Fredrik,
As replied to Frank, I am learning to program on the fly, and comments like yours help me a lot