Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
there is one variable vMaxDate , which is created by taking first row from date field .
As the date field is blank so script is failing at Date > $(vMaxDate), but we want to ignore the TAB1 load on first TAb of script and move to second TAb and load Table2.
First TAb in script---
TAB1:
LOAD
RET,
Date,
Value
from Table1 where Date > $(vMaxDate);
Second TAb in script---
TAB2:
LOAD
RES,
Date,
Amt
from Table 2;
We can do it by SET ErrorMode = 0;
but is there any other way to do it or we want something like if $(vMaxDate) is null the SET ErrorMode = 0 else 1
but is there any other way to do it or we want something like if $(vMaxDate) is null the SET ErrorMode = 0 else 1
From here, What was the condition seems this, But what the vMaxDate here simple Max(Date) or what?
If($(vMaxDate) = Null(), 0, 1) as ErrorMode
You can try with the following WHERE clause for TAB1 (add quotes)
:
from Table1 where Date > '$(vMaxDate)';
:
First time around, this code will load all rows. If that's not what you want, set the default value for vMaxDate to some exceptionally high date value that none of the available Dates will match.
Best,
Peter
Hi,
What you can do is put your script in if statement like below.
If not isnull($(vMaxDate)) then
Load from table 1
Else
Load from.table 2
End if
Regards,
Kaushik Solanki
Hi,
May be even if values in vmaxDate there or not and you want to run table 2 then You can try like this:
Here not adding anything btn else and end if bcs we don't want it to do anything If vmax Date id null..Plss Try and let me know.Hope it helps
If not isnull($(vMaxDate)) then
Load from table 1
Else
end if
Load from.table 2
And really avoiding error mode helps I guess bcs wt if it throws error bcs of some othr issue
Sachin