Hi,
if event_code in (sag, sur) and phase is null then "puuttuu" else phase
why do I get error, What should change the filter?
You can't have an if...then...else statment in a filter. You're statement isn't very clear...what are you comparing to "puuttuu" or phase?
Quote from: perspolis09 on 25 Jul 2013 02:48:02 PM
Hi,
if event_code in (sag, sur) and phase is null then "puuttuu" else phase
why do I get error, What should change the filter?
This looks very much like the expression to return a value for a calculation. Is that your intent? Expressions for filters need to return a result which is true or false (so that each row is either included in or excluded from the query result set).
eg
if ([event_code] in ('sag', 'sur') and [phase] is null) then ([another column] = 'puuttuu') else ([another column] = [phase])
My expression will return one of two possible results to the filter - either
[another column] = 'puuttuu'
or
[another column] = [phase]
Both of these are expressions which will either evaluate to TRUE or FALSE when evaluated at runtime
Cheers!
MF.
thanks this help me a lot! :)