Watz
03/05/2024, 8:18 PMeblackey
03/05/2024, 8:22 PMWatz
03/05/2024, 8:22 PMWatz
03/05/2024, 8:27 PMFROM table1, table2 WHERE table1.id = table2.t2val
instead of
FROM
table1
JOIN table2 ON table1.id = table2.t2val
And it might solve it.eblackey
03/05/2024, 8:27 PMWatz
03/05/2024, 8:28 PMAnthony OConnor
03/05/2024, 8:36 PMWatz
03/05/2024, 8:48 PMSELECT
M.id AS id
--,M.custrecord_eqtmt_matched_line_lineuniq AS uniquekey --This is not a foreign key field and does not work
,M.custrecord_eqtmt_matched_line_group AS group_id --This is a foreign key field and works
,M.custrecord_eqtmt_matched_line_transac AS transaction_id --This is a foreign key field and works
--,M.custrecord_eqtmt_matched_line_desc AS line_description --This is not a foreign key field
,G.custrecord_eqtmt_match_gr_des AS group_description
,G.custrecord_eqtmt_match_gr_deb_cre_diff AS gr_deb_cre_diff
,G.custrecord_eqtmt_match_gr_status AS line_status
,MAX(T.trandate) OVER (PARTITION BY M.custrecord_eqtmt_matched_line_group) AS maxTranDate
,MIN(T.trandate) OVER (PARTITION BY M.custrecord_eqtmt_matched_line_group) AS minTranDate
FROM
TRANSACTION T
JOIN transactionLine TL ON T.id = TL.transaction
JOIN customrecord_eqtmt_matched_line M ON M.custrecord_eqtmt_matched_line_id = TL.id AND M.custrecord_eqtmt_matched_line_transac = T.id
JOIN customrecord_eqtmt_matched_group G ON M.custrecord_eqtmt_matched_line_group = G.id
WHERE
TL.subsidiary = 359
AND G.custrecord_eqtmt_match_gr_status = 3
But this doesn't
SELECT
M.id AS id
--,M.custrecord_eqtmt_matched_line_lineuniq AS uniquekey --This is not a foreign key field and does not work
,M.custrecord_eqtmt_matched_line_group AS group_id --I have to have this comment
,M.custrecord_eqtmt_matched_line_transac AS transaction_id --I have to have this comment
--,M.custrecord_eqtmt_matched_line_desc AS line_description --This is not a foreign key field
,G.custrecord_eqtmt_match_gr_des AS group_description
,G.custrecord_eqtmt_match_gr_deb_cre_diff AS gr_deb_cre_diff
,G.custrecord_eqtmt_match_gr_status AS line_status
,MAX(T.trandate) OVER (PARTITION BY M.custrecord_eqtmt_matched_line_group) AS maxTranDate
,MIN(T.trandate) OVER (PARTITION BY M.custrecord_eqtmt_matched_line_group) AS minTranDate
FROM
TRANSACTION T
JOIN transactionLine TL ON T.id = TL.transaction
JOIN customrecord_eqtmt_matched_line M ON M.custrecord_eqtmt_matched_line_id = TL.id AND M.custrecord_eqtmt_matched_line_transac = T.id
JOIN customrecord_eqtmt_matched_group G ON M.custrecord_eqtmt_matched_line_group = G.id
WHERE
TL.subsidiary = 359
AND G.custrecord_eqtmt_match_gr_status = 3
eblackey
03/05/2024, 10:03 PMWatz
03/05/2024, 10:06 PMeblackey
03/05/2024, 10:10 PMShai Coleman
03/06/2024, 11:53 AMSuiteQL Query Tool
) may wrap the query for pagination, etc.
Try another tool to see if you're getting the same result e.g. NimbusQL Full Release