Ramco Ramco

Ramco Ramco

  • 431
  • 3.5k
  • 559.9k

Inner Select Statement

Jan 15 2025 9:00 AM

Hi

  I have below code . In inner statement there are multiple reords. I want to get value of 1 record . How it can be done i don't use Max Keyword.

 

Thanks

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;

 


Answers (2)