Home > Enterprise >  I'm using Oracle for the first time and this code seems to be working for everyone else, but wh
I'm using Oracle for the first time and this code seems to be working for everyone else, but wh

Time:10-31

Question:

Display the order date and the ship date for all orders that were made April 1 through April 15. List the order date, ship date, order priority, and ship mode. Order the results by order_date. Do you notice anything unusual about the data? [Hint: You will need to join the orders and shipping together and use a join statement. You will need to limit the result set by the date field order_date <= to_date('04/15/2018', 'mm/dd/yyyy'). ]

What I put:

select ORDERS.Order_date, SHIPPING.ship_date, ORDERS.order_priority, SHIPPING.ship_mode from orders
join shipping on ORDERS.order_Date = SHIPPING.Ship_Date
where order_date between to_date ('04/01/2018','mm/dd/yyyy')
and to_date ('04/15/2018','mm/dd/yyyy')
order by order_date

The error I'm getting:

ORA-00942: table or view does not exist

CodePudding user response:

You have already made a synonym.. Please try with schema . select ORDERS.Order_date from your_schema.ORDERS

CodePudding user response:

You have to create a synonym for the Orders table like this: CREATE SYNONYM orders FOR orders;

  • Related