Hi all, I have a custom segment "filtered by" subs...
# suiteql
p
Hi all, I have a custom segment "filtered by" subsidiary. I need to find out how to join the custom segment values with the subsidiary table. The column "cseg_xxxx_filterby_subsidiary" contains the subsidiary ids seen as [1,2,3] . So I would need to return as many rows as subsidiaries there are in the array. Something like "select * from customrecord_cseg_xxxx, subsidiary where subsidiary.id IN cseg_xxxx_filterby_subsidiary", this of course does not work, the question is how can I join the two tables? Any ideas most appreciated.
m
If this works the same way as multi-select fields there should be an intermediate mapping table. You can check in the records catalog, or trying creating the query in Anayltics and export the SQL query
p
thanks! I found also this article that explains how it works: https://blog.prolecto.com/2021/08/21/learn-how-to-sql-query-netsuite-multiple-select-fields/ That was really a big help!