Receiving the same error when running query in Oracle

I have tried to query a piece of code in Oracle, but I continue to receive the error ORA 00933. Can anyone point me to the solution? This is the piece of code:

SELECT 
        EXTRACT(MONTH FROM i.invoicedate) AS Month
      , CAST(i.invoicedate AS DATE) AS Invoicedate
      , I.fiscalinvoiceid
      , I.invoiceid
      , NULL as Quantity
      , I.shipmentcost AS Invoiceprice
      , CASE WHEn I.creditinvoiceid IS NOT NULL THEN -1 ELSE 1 END * ROUND((I.shipmentcost * 
      CASE WHEN I.vatfree = 'N' THEN (1+ (V.vatpercentage / 100)) ELSE 1 END), 2) as 'Total'
      , I.vatfree
      , creditinvoiceid
      , 'Shipment' AS costtype
      , I.customerid
      , I.subsidiaryid
      , EXTRACT(YEAR FROM I.paymentduedate) AS dueyear
      , EXTRACT(MONTH FROM I.paymentduedate) AS duemonth
      , I.paymentmethodid  
    FROM VAN_Invoice I
    INNER JOIN VAN_VAT V ON I.shipmentcostvatid = V.vatid

Upvotes: 0

Views: 37

Answers (0)

Related Questions