Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am working on an application which was already developed by someone else. I came across one of the joins condition "Add Left Join", at first I thought it must be "Add Load', but it seems that it is "Add Left Join", I would like to know if it exists or not before going into a discussion with the concerned people. If that particular condition exists can anyone please explain it's working.
Thanks in advance.
Yes they are equivalent.
ADD, LEFT and JOIN(tablename) are all LOAD statement prefixes. The order in which you specify them is not important. As prefixes generally do, they should be placed before the LOAD keyword.
TableA :
load * from Sales
left join (TableA)
load * from orders
where condition ;
HTH
Vikas
Use left join simple.
Is it a comment like Add left join or its a script statement ??
could you please share the script ? so that we can try to identify how its used in the script ??
I feel they have written it for the Partial reload purpose ...
i.e if you click on the partial reload option from the file menu only the table with the Add left join will get loaded and the other statements will be ignored
Hope this helps you
Indeed. The ADD prefix doesn't do anything during a normal script run. However it kicks into action when performing a Partial Reload. ADD tries to load data without first removing the target table. Sort of a switchable CONCATENATE LOAD. Compare this to its counterpart REPLACE which will effectively drop the existing target table during a partial reload, before loading new rows.
Not sure whether this can be sensibly combined with a LEFT JOIN though... Does it work?
Hi pcammaert , yes its works fine with the left join . Just now I tested with same data it works fine
Hi Avinash,
Thanks for the quick response. So according to what you say
Add Left join
Load * from..............
and
Left Join
Add Load * from .................
are the same right?
If you go for normal reload then both are same ...both the statements will execute but if go for Partial reload then only the
Add Left join
Load * from..............
will get executed and rest of the statements will retain the old data
If we do a partial reload according to my knowledge, only the tables with Add or Replace prefixes will execute ignoring all the other tables. So here will the both Loads execute and return the same output?