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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Between function in where clause+load csv file

Hi,

I have a load statement and my problem is that when I load a csv file, the Between And statement in my where clause are treated as garbage..

is there any other way so that I can use date range in my script..

Here's the script:

LOAD [User ID],

[First Name],

[Last Name],

Department,

date(date#(Date,'YYYY/M/D')) as LogDate,

Time,

Event,

Terminal,

Remark

FROM

\\Phoenix\Qlik\report.csv

(txt, utf8, embedded labels, delimiter is ',')

Where Date Between $(vFromDate) AND Date <= $(vToDate);



1 Solution

Accepted Solutions
maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

You cannot use the between function in load statement, it is belongs to SQL.

instead of it u can use AND statements.

View solution in original post

5 Replies
maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

You cannot use the between function in load statement, it is belongs to SQL.

instead of it u can use AND statements.

Not applicable
Author

Hi

as manesh said true...

u can use the where clause to load the data as like

Where Date >= $(vFromDate) AND Date <= $(vToDate);

or

Where Date >= '$(vFromDate)' AND Date <= '(vToDate)'

Not applicable
Author

I tried that. but throwing error about Date and Varchar conversion issue.

Not applicable
Author

I tried that. but throwing error about Date and Varchar conversion issue.

Not applicable
Author

Atlast I have resolved my issue . The script goes like this:

Where (modifiedTimeStamp >= {d '$(StartDate)'} AND modifiedTimeStamp < {d '$(EndDate)'});
The Script works.