Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sivavasam
Contributor II
Contributor II

SQL select where clause

Hi 

While implementing incremental load source from Oracle database.

vMaxDate = Peek ('Maxdate ',0) and also tried ('MaxDate', 0,'Table name '

Table:

Load

Status_Date,

AAAA,

BBBB,

CCCC;

SELECT 

Status_Date,

AAAA,

BBBB,

CCCC

FROM Table

Where Status _Date >'20230131' ; and tried ( where Status_Date > '$(vMaxDate)' but no use...I need this date format 20230131 as variable which responds to select statement.

Instead of Date I need to store Max date from QVD which is stored in variable . But it's not working.

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can give that format to the vMaxDate variable using the Date() function:

vMaxDate = Date(Peek ('MaxDate',0),'YYYYMMDD')

You also need to confirm that the max date has been loaded on the table where MaxDate field is loaded.

View solution in original post

2 Replies
rubenmarin

Hi, you can give that format to the vMaxDate variable using the Date() function:

vMaxDate = Date(Peek ('MaxDate',0),'YYYYMMDD')

You also need to confirm that the max date has been loaded on the table where MaxDate field is loaded.

sivavasam
Contributor II
Contributor II
Author

Thank you so much I got it ....