Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00936: missing expression when using (+)

Christian PitetAug 20 2020 — edited Aug 20 2020

Hi,

This request with the sign ( + ) is giving me an error ORA-00936: missing expression. How to solve that ?

with

r as (

select trunc(t.date_travaux, 'yyyy') date_travaux, sum(t.montant_facture) montant_facture from mv_entretien t

where vehicule = 1 and TYPE_TRAVAUX <> 4

GROUP by trunc(t.date_travaux, 'yyyy')),

y as (select date1,cout_carburant from mv_cout_carburant where vehicule = 1)

select trunc(a.date_kilometrage, 'yyyy') "Année", a.kilometrage "Kilométrage", ((b.cout_acquisition/6)+r.montant_facture+y.cout_carburant)/a.kilometrage "Prix de revient km"

from mv_kilometrage a, mv_amortissement b, r, y

where trunc(r.date_travaux, 'yyyy') = trunc(a.date_kilometrage, 'yyyy') (+)

and trunc(y.date1, 'yyyy') = trunc(a.date_kilometrage, 'yyyy')

and a.vehicule=1

order by a.date_kilometrage;

Thank you for your kind help.

Best regards.

This post has been answered by mathguy on Aug 20 2020
Jump to Answer
Comments
Post Details
Added on Aug 20 2020
6 comments
907 views