Hi
I am getting error Incorrect Syntax near docentry
SQL
SELECT T2."CardCode" ,
(Select Max(I0."Rate") from DPO5 I0 Where I0."AbsEntry" =
(Select I1."BaseAbs" from PCH9 I1 where I1."DocEntry” = T2."DocEntry"))
from opch t2Thanks
Hi
I am getting error Incorrect Syntax near docentry
SELECT T2."CardCode" ,
(Select Max(I0."Rate") from DPO5 I0 Where I0."AbsEntry" =
(Select I1."BaseAbs" from PCH9 I1 where I1."DocEntry” = T2."DocEntry"))
from opch t2Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh KumarRank #91 · 22.9K reputationPosted Jan 15, 2025, 1:38 AM EST
Hello Ramco,
You can use below query to simplyfy your query and get correct result,
SELECT T2."CardCode", ( SELECT MAX(I0."Rate") FROM DPO5 I0 WHERE I0."AbsEntry" = ( SELECT I1."BaseAbs" FROM PCH9 I1 WHERE I1."DocEntry" = T2."DocEntry" ) ) AS MaxRate FROM OPCH T2;