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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sql data in variable

Hi everyone !

I need to bring one value (date) from sql server to  a variable in qlikview and after make a tratative this of data  , the problem is that variable always stay null.

follow part of the code

LET MinDate = floor(date(VStartAno, 'DD/MM/YYYY'));

cld_temp:

SQL

  SELECT MAX(Data) as Dstx FROM time_dimension;

xtemp:

LOAD  floor(date(Dstx ,'DD/MM/YYYY'))

Resident  cld_temp;

LET MaxDate = Dstx;

DROP TABLE cld_temp;

DROP TABLE xtemp;

the maxdate stay null, and would should to stay like 41630.

someboy have some idea ?

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try using the peek function:

LET MinDate = floor(date(VStartAno, 'DD/MM/YYYY'));

cld_temp:

SQL SELECT MAX(Data) as Dstx FROM time_dimension;

LET MaxDate = peek('Dstx');

drop table cld_temp;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try using the peek function:

LET MinDate = floor(date(VStartAno, 'DD/MM/YYYY'));

cld_temp:

SQL SELECT MAX(Data) as Dstx FROM time_dimension;

LET MaxDate = peek('Dstx');

drop table cld_temp;


talk is cheap, supply exceeds demand
Not applicable
Author

worked, thanks!!