Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

assign database value to variable in script

Hi,

              I want to fetch maximum value from the column and assign it to a variable in qlikview while scripting. Can anybody tell me how is it possible?

              Thanks in advance.

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Temp:

     Load Max(ColumnName) as MaxValue Resident TableName;

     Let vVariable=FieldValue('MaxValue',1);

     Drop Table Temp;

    

Hope it helps

Celambarasan

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Temp:

     Load Max(ColumnName) as MaxValue Resident TableName;

     Let vVariable=FieldValue('MaxValue',1);

     Drop Table Temp;

    

Hope it helps

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check the script below

TempMax:

Select

     Max(Sales) AS Sales

FROM Sales;

Let vMaxValue = FieldValue('Sales',1);

Drop Table TempMax;

Hope it helps you.

Regards,

Jagan.

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi

Use This Script

TempMax:

Select

     Max(Sales) AS Sales

FROM Sales;

 

Let vMaxValue = Peek('Sales',1,TempMax);

  Drop Table TempMax;

Regards

Perumal A