Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have this script and give an error, did you know why?
LET vExecTime=UTC();
Set vLastExecTime=0;
if (not IsNull(QvdCreateTime('$(VStore)INVENTTRANS_INCREMENTAL.qvd'))
,
LoadTime:
Load Max(LastModifiedDate)as LastModifiedDate
From $(VStore)INVENTTRANS_INCREMENTAL.qvd(qvd);
Let vLastExecTime=peek('LastModifiedDate',0,'LoadTime');
Drop Table LoadTime;
);
Many thank's
yes the "if" and "then" have to be in the same line
use an if ... then instead of if ()
The if..then control statement is a script selection construct forcing the script execution to follow different paths depending on one or several logical conditions. The syntax is:
if condition then
[ statements ]
{ elseif condition then
[ statements ] }
[ else
[ statements ] ]
end if
Where:
condition is a logical expression which can be evaluated as true or false.
statements is any group of one or more QlikView script statements.
Since the if..then statement is a control statement and as such is ended with either a semicolon or end-of-line, each of its four possible clauses (if..then, elseif..then, else and end if) must not cross a line boundary.
Examples:
if a=1 then
load * from abc.csv;
sql select e, f, g from tab1;
end if
if a=1 then; drop table xyz; end if;
if x>0 then
load * from pos.csv;
elseif x<0 then
load * from neg.csv;
else
load * from zero.txt;
end if
Hi Ramon,
Many thank's but still with problems 😞
see the picture
Eduard
Hi Eduard, following Ramon instructions:
Since the if..then statement is a control statement and as such is ended with either a semicolon or end-of-line, each of its four possible clauses (if..then, elseif..then, else and end if) must not cross a line boundary.
yes the "if" and "then" have to be in the same line
Hi Ruben, But i did not understand 😞
Many many thank's Ramon!!!!