Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
riishabhz
Creator
Creator

incremental script problem

hi 

this is my script :-

max:
LOAD max (TransactionDate) as TransactionDate

FROM VWStockMovement_Qlik.qvd (qvd);

let vamxdater =Date(peek('TransactionDate',0,'max'));

drop table max;
final:
LOAD
NCode,
PartnerCode,
Channel,
ETPCode,
TransactionDate,
"Doc_Type",
TransactionNo,
Season,
Style,
Color,
Size,
TransactionQuantity,
ETPMRP;
SQL SELECT *
FROM ETPEASV55.dbo."VWStockMovement_Qlik" where TransactionDate>'$(vamxdater)';

Concatenate(final)
LOAD NCode,
PartnerCode,
Channel,
ETPCode,
TransactionDate,
Doc_Type,
TransactionNo,
Season,
Style,
Color,
Size,
TransactionQuantity,
ETPMRP
FROM
VWStockMovement_Qlik.qvd
(qvd);

i have used debugger also , please see my pics:-

i am getting this error , i have used double quotes also but its not working properly , any help?

 

1 Solution

Accepted Solutions
prma7799
Master III
Master III

Try with this

 

let vamxdater =Date(peek('TransactionDate',0,'max'),'Your Date Format');

View solution in original post

4 Replies
prma7799
Master III
Master III

Try with this

 

let vamxdater =Date(peek('TransactionDate',0,'max'),'Your Date Format');

riishabhz
Creator
Creator
Author

i changed to 

let vamxdater=Date(peek('SalesDate',0,'max'),'dd/mm/yyyy');

ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Divide by zero error encountered.
SQL SELECT *
FROM ETPEASV55.dbo."VWStockMovement_Qlik" where TransactionDate>04/00/2019

 

what should i do now?

prma7799
Master III
Master III

How 0 is there in month 

 

 where TransactionDate>'04/?/2019'

riishabhz
Creator
Creator
Author

i changed my dateformat and timestamp into this and now its working

SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YY h:mm:ss[.fff] TT';