Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
COMPLEX CASE STATEMENT in Query
Could someone help me. This is based on fields on an item. Thanks!
I keep getting an error message--- ERROR: Invalid Expression
CASE WHEN {costestimatetype} = 'Purchase Price' THEN {cost}
ELSE
CASE WHEN TO_NUMBER({averagecost})= 0 THEN 0
ELSE {averagecost}/
CASE WHEN
TO_NUMBER({custitem_bbts_sales_conversion_rate}) = 0 THEN 0
ELSE
{custitem_nswms_casepack} / TO_NUMBER({custitem_bbts_sales_conversion_rate})
END
END
END
0