Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
samvile18
Creator III
Creator III

Setting a simple variable

Afternoon everyone,

I'd like to set a variable in my script called vMaxExtractDate...I basically need the value to be the maximum date with the field Extract Date, this is what I have so far and the value is always blank:

SET vMaxExtractDate = Max(Date([Extract Date]))

Can anyone help me please?

1 Solution

Accepted Solutions
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Please do like:

Table1:

Load Distinct

Max([Extract Date]) as MaxDate

From/Resident Table;

Let vMaxExtractDate=Date(Peek('MaxDate',0,'Table1'));

Hope this will help

View solution in original post

2 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Please do like:

Table1:

Load Distinct

Max([Extract Date]) as MaxDate

From/Resident Table;

Let vMaxExtractDate=Date(Peek('MaxDate',0,'Table1'));

Hope this will help

samvile18
Creator III
Creator III
Author

Thanks for the help Vijay, this was my next test and it works brilliantly.