```SELECT t.status FROM transaction t WHERE t.stat...
# suiteql
c
Copy code
SELECT t.status
FROM transaction t
WHERE t.status = 'G'
This returns zero results. It should return many. What gives?
Well, looks like you gotta use this list for status codes, even though the returned values don't match. https://gist.github.com/W3BGUY/af08ddd92b87641e28df9c26d545d387
Copy code
SELECT t.status
FROM transaction t
WHERE t.status = 'SalesOrd:G'
This works. I guess I just had to think through it on the screen. 🤔
p
use BUILTIN.CF(t.status) as a safer way to get the values you want
👍🏽 1
👍🏻 1
c
Thanks, @Pablo Schneiter
k
bumping this
Copy code
[
  {
    "tranid": "PO#MC0000000051",
    "status": "B",
    "expr1": "PurchOrd:B"
  }
]
Copy code
select tranid, t.status, <http://BUILTIN.CF|BUILTIN.CF>(T.STATUS) from transaction t where 
tranid = 'PO#MC0000000051' 
AND <http://BUILTIN.CF|BUILTIN.CF>(T.STATUS) = ' PurchOrd:B'
This is giving me zero results too
can't understand as the criteria is exactly the same
am i doing something wrong or is there a bug?
ah
i got it
c
@Kushington There is a space in your final criteria, maybe that's throwing it off?
' PurchOrd: B'
instead of
'PurchOrd:B'
🎯 1
k
spaces!