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

Why isn't this where MATCH working? In load script

Hi Guys

Why isn't this where MATCH working? in load script

Many thanks in advance

sum(if(WHERE match  ([PRODUCT],'xxx','yyy','zzzz'),Value)) AS NEWTEST,

15 Replies
sunny_talwar

Try it without WHERE

Sum(If(Match(PRODUCT, 'xxx', 'yyy', 'zzzz'), Value)) as NEWTEST


UPDATE: You might need a Group By statement in case you have other fields in this particular load.

Anonymous
Not applicable
Author

Wow, where clause in IF condition....

Your syntax is wrong, try what Sunny suggested you

Anonymous
Not applicable
Author

It still doesn't work, it says Invalid expression

Anonymous
Not applicable
Author

It still doesn't work, it says Invalid expression

Anonymous
Not applicable
Author

I've got the GROUP BY

Thanks

sunny_talwar

Can you share your script for where you are trying this out?

Anonymous
Not applicable
Author

Sorry guys, i had one extra field that wasn't on the GROUP BY

Sorry for being a pain, ill award you guys points

Anonymous
Not applicable
Author

Where's the option to mark your request as correct?

Anonymous
Not applicable
Author

FYI....If you are using aggregate function at script level then you should Group by.....

Expression suggested by Sunny was right, the only issue was that you did not share the the full script code with Group By