Can we not use NVL as part of a SuiteQL Condition?...
# suiteql
x
Can we not use NVL as part of a SuiteQL Condition?
SELECT id FROM customrecord_abc WHERE custrecord_id = 5521 AND NVL(custrecord_field_that_holds_numbers_but_is_sometimes_null, 0) <> 0
c
I don't know for sure, but you could drop the NVL and use WHERE field IS NOT NULL
Oh I suppose you also want to rule out actual 0 values too huh?
j
WHERE (custrecord_field_that_holds_numbers_but_is_sometimes_null IS NOT NULL AND custrecord_field_that_holds_numbers_but_is_sometimes_null <> 0) ?
๐Ÿ‘ 1
It feels like your NVL should work
what happens if you use the NVL in a SELECT, do you get an error?
c
It feels like it should too, but you know - Netsuite?
j
whatโ€™s the error you are getting @XochisSketches ?
x
Yup. I think I found the problem @Clay Roper @jen. It would help if I passed the query as the right variable ๐Ÿ˜›
j
well yes
but then again, it is Friday
c
๐Ÿป
x
๐Ÿป
j
๐Ÿป