Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
following Question:
I got a SQL-statement which provides the maximum of a database field.
For example: select max(field1) as result from table1
How can I assign this sql-result-value to a qlikview-variable?
let @vMAXIMUM = ?
Thanks for your help!
Daniel
Hi,
LOAD the sql into a table
use the peek() function to populate your variable
drop the table
Fabrice
Hi,
LOAD the sql into a table
use the peek() function to populate your variable
drop the table
Fabrice
It cannot be assigned directly
try like this
Table1:
SQL SELECT Max(field1) as Result FROM table1;
LET vMAXIMUM = Peek('Result', 'Table1');
DROP Table Table1;
Try like:
Load Max(field1) as MaxValue;
SQL Select field1 From <data source>;
Let vMax=Peek('MaxValue');
Thanks for your incredible fast help!
Hi, I am doing the same but getting a null value in the variable.
A:
SQL
select trunc(max(Event_Date)) as Result from Event;
LET vMaxDate = peek('Result','A');
Please help