nnmmss
nnmmss

Reputation: 2992

Cross apply missing keyword

I am writing a query in Oracle(11g):

  select DBTM,AVNR from E_MW_01Min_MIT m
  cross apply(
        select Avnr,XDatum1 from E_MW_01DAY_MEX d
        where  d.AVnr = m.avnr
        and    d.XDatum1 = m.DBTM 
   )

but it gives me the error

   ORA-00905: missing keyword

where is the problem? Thank you

Upvotes: 0

Views: 459

Answers (2)

Gordon Linoff
Gordon Linoff

Reputation: 1270843

cross apply is not available in that version of Oracle. Just use join instead:

select m.DBTM, d.AVNR
from E_MW_01Min_MIT m JOIN
     E_MW_01DAY_MEX d
     ON  d.AVnr = m.avnr AND d.XDatum1 = m.DBTM ;

This is actually more easily expressed using JOIN, so I see no advantage to attempting APPLY even if the database does support it.

Upvotes: 1

Santosh Vishwakarma
Santosh Vishwakarma

Reputation: 199

This keywords (CROSS APPLY or OUTER APPLY) is introduced in Oracle 12c version. You can see this link : cross apply giving missing keyword error

Upvotes: 2

Related Questions