Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Let Statement

Hi,

I am trying to define a variable as follows:

Let vStartDate = '01-JAN-16';

Let vLimit = 'TO_DATE('$(StartDate)', 'DD-MON-YY')';

When I am trying to load the variables I am getting the following error :

Can someone help me with the correct syntax ?

Regards,

H

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

did you try my prev post?

Let vStartDate = '01-JAN-16';

Set vLimit = TO_DATE('$(vStartDate)', 'DD-MON-YY');

trace $(vLimit);    

SQL Select ......

From ......

Where Transaction_Date >= $(vLimit)

or with quote

'$(vLimit)'

View solution in original post

4 Replies
Highlighted
MVP
MVP

TO_DATE is not a Qlik script function, and your statement itself does not evaluate to a valid statemten because of the quoting.

Try

Let vLimit = Date#('$(vStartDate)','DD-MMM-YY');

Highlighted
MVP
MVP

do you need a vLimit var for an Oracle where clause or something similar?

Let vStartDate = '01-JAN-16';

Set vLimit = TO_DATE('$(vStartDate)', 'DD-MON-YY');

1.png

Highlighted
Creator III
Creator III

Yes Maxgro.

SQL Select ......

From ......

Where Transaction_Date >= $(vLimit)

Highlighted
MVP
MVP

did you try my prev post?

Let vStartDate = '01-JAN-16';

Set vLimit = TO_DATE('$(vStartDate)', 'DD-MON-YY');

trace $(vLimit);    

SQL Select ......

From ......

Where Transaction_Date >= $(vLimit)

or with quote

'$(vLimit)'

View solution in original post