Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a varible named v_year and a table like:
Year |
2008 |
2007 |
2001 |
I want to get a function which can return a ture-or-false value:
TURE : if $(v_year) exist in field [Year]
FALSE: if $(v_year) not exist in field [Year]
How can I write the expression? Any function can do that? I want to use the expression as a condition in if clause.
if you are trying in the script, you can create flag like this:
LOAD Year,
If(Year='$(v_year)',1,0) as MatchFlag From ....
otherwise there is a function called EXISTS().... you can have a look at it.
Regards, tresesco.
Here's one option:
=if(only({$<Year={$(vYear)}>} Year),'Exists','Does not Exist')
Regards.
Hi,
The condition is not work. May be NOT(ISNULL(ONLY(....))) is ok.