Hi,
I am trying to use a select statement inside the NVL function but keep getting a Missing Expression error. Cannot figure out what I am doing wrong. Below is my code
Thanks for taking a look at it.
-E
I am trying to use a select statement inside the NVL function but keep getting a Missing Expression error. Cannot figure out what I am doing wrong. Below is my code
Code:
SELECT
F.TYPE,
L.CODE,
L.ID,
L.STATUS,
L.START_DATE,
L.END_DATE,
NVL(SELECT ID
FROM LOG LY
WHERE LY.CODE = 51
AND LY.TYPE = L.TYPE
AND LY.IDENT = L.IDENT
AND LY.STATUS = 'X'
AND LY.END_DATE BETWEEN L.START_DATE AND DECODE(L.CODE, 58, L.END_DATE + 10/24, L.END_DATE)
AND ROWNUM = 1, 0) CERTIFIED_LOG
FROM FAC F
JOIN LOG L ON L.ID = F.ID
Thanks for taking a look at it.
-E