
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to solve "Error in expression: ')' expected"?
I have the following statement that works in my load script:
if(match([Reason For Error], 'In Inventory but Company Code not eligible for GL', 'In inventory but invalid Cost Center/Company Code'), 'Yes', 'No') as [Invalid Coding]
I am trying to do the following instead:
SET invCod1='In Inventory but Company Code not eligible for GL';
SET invCod2='In inventory but invalid Cost Center/Company Code';
if(match([Reason For Error], $(invCod1), $(invCod2)), 'Yes', 'No') as [Invalid Coding]
However when I do this I get the error "Error in expression: ')' expected". I think this has to do with the parentheses interfering with each other. Is there a way to fix this?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi noah,
Can you try?:
if(match([Reason For Error], '$(invCod1)', '$(invCod2)'), 'Yes', 'No') as [Invalid Coding]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi noah,
Can you try?:
if(match([Reason For Error], '$(invCod1)', '$(invCod2)'), 'Yes', 'No') as [Invalid Coding]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That works! Thanks!
