Hi all! Anyone know how to properly query multiple...
# suiteql
d
Hi all! Anyone know how to properly query multiple select fields? For example, this query: select id, custentity_so_id from contact where id = 5199 returns me "190866, 203353" But when I try select id, custentity_so_id from contact where id = 5199 and custentity_so_id = '190866, 203353' it doesn't return anything
s
maybe try an
IN (190866, 203353)
clause?
d
Nope, not working
s
😞 - I haven't had a need to query multiselect myself - will be curious what the final solution is
d
Thanks anyway. It's not a big deal, since I've already solved it with a saved search.
j
It’ll be something like this
Copy code
SELECT id, custentity_so_id

FROM contact
JOIN map_contact_custentity_so_id ON contact.id = map_contact_custentity_so_id.mapone

WHERE map_contact_custentity_so_id.maptwo IN (190866, 203353)
d
It's working, thank you very much @jen! Not obvious at all. :)
j
The Records Catalog is super helpful for this sort of thing