stalbert
04/15/2021, 2:31 PMIN
clause. e.g.
sql
select id from transaction where type in ('CashSale', 'CustPymnt')
when I have only CashSale in there, it returns many rows. When I add 'CustPymnt' it returns only one row. I thought an IN clause worked like an OR, so I should only see more results not less when adding arguments to the IN clause?tdietrich
04/15/2021, 2:50 PMselect ID, type from transaction where type = 'CashSale' or type = 'CustPymnt'
stalbert
04/15/2021, 2:56 PMx IN ('a', 'b')
is supposed to be equivalent to x = 'a' or x = 'b'?stalbert
04/15/2021, 4:02 PMstalbert
04/15/2021, 4:04 PMIN
or should I be disturbed that SuiteQL seems to treat IN
differently than a series of `OR`s?stalbert
04/15/2021, 4:18 PMstalbert
04/15/2021, 4:19 PMselect * from transaction
returns []
tdietrich
04/15/2021, 6:56 PMtdietrich
04/15/2021, 6:57 PMmichoel
04/15/2021, 11:26 PMrecordtype
instead of type
? I've run across some other performance related weirdness with these columns. https://netsuiteprofessionals.slack.com/archives/C01FBBZ8PQC/p1607561410072200tdietrich
04/16/2021, 1:26 AMmichoel
04/16/2021, 1:28 AMtdietrich
04/16/2021, 1:28 AM-- 3.46 seconds
SELECT DISTINCT type FROM Transaction ORDER BY type
-- 3.44 seconds
SELECT DISTINCT recordtype FROM Transaction ORDER BY recordtype
michoel
04/16/2021, 1:28 AMtdietrich
04/16/2021, 1:29 AMtdietrich
04/16/2021, 1:33 AMSELECT DISTINCT abbrevtype FROM Transaction ORDER BY abbrevtype
stalbert
04/16/2021, 1:51 PM