Skip to main content

Reporting Service

This forum is for discussions around reporting from Qlik Cloud.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
ritumishra01
Contributor
Contributor

Error while running script

LET WHERE_PART_TEMP ='AND TRUNC(EBT_CARD_DETL.STAT_DATE) BETWEEN TO_DATE(' & chr(39) &$(FromDateKey)& chr(39) &chr(44) &chr(39)&'MM/DD/YYYY'&chr(39)&') AND TO_DATE(' & chr(39)&$(ToDateKey)& chr(39) &chr(44) &chr(39)&'MM/DD/YYYY'&chr(39)&')';
while runnig this i am getting below error message:


Unexpected token: '&', expected one of: '(', 'Yellow', 'ZTestw_z', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'not', 'bitnot', ..

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

It could be the $(FromDateKey) and/or  $(ToDateKey) that is giving you trouble (if the content is empty or a string), try this adjusted expression. 

LET WHERE_PART_TEMP ='AND TRUNC(EBT_CARD_DETL.STAT_DATE) BETWEEN TO_DATE(' & chr(39) &'$(FromDateKey)'& chr(39) &chr(44) &chr(39)&'MM/DD/YYYY'&chr(39)&') AND TO_DATE(' & chr(39)&'$(ToDateKey)'& chr(39) &chr(44) &chr(39)&'MM/DD/YYYY'&chr(39)&')';

View solution in original post

1 Reply
Vegar
MVP
MVP

It could be the $(FromDateKey) and/or  $(ToDateKey) that is giving you trouble (if the content is empty or a string), try this adjusted expression. 

LET WHERE_PART_TEMP ='AND TRUNC(EBT_CARD_DETL.STAT_DATE) BETWEEN TO_DATE(' & chr(39) &'$(FromDateKey)'& chr(39) &chr(44) &chr(39)&'MM/DD/YYYY'&chr(39)&') AND TO_DATE(' & chr(39)&'$(ToDateKey)'& chr(39) &chr(44) &chr(39)&'MM/DD/YYYY'&chr(39)&')';