Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ok in SQL Plus - ORA-00933 creating a view !!! 1

Status
Not open for further replies.

saustin

MIS
Feb 19, 2001
336
US
Hi,
Bizzare situation, can run the code below perfectly in SQL Plus 8i but when we try to create a view it generates the 0RA-00933 error message. Is there anything missing here, and why would SQL Plus be happy (and fast) but the view complain ?

Many thanks for any suggestions, Steve.

Select
p.ID,
p.STOCK_UM,
p.QTY_ON_HAND,
b.TRANSACTION_ID,
b.QTY,
(b.MATERIAL_AMOUNT + b.LABOR_AMOUNT + b.BURDEN_AMOUNT + b.SERVICE_AMOUNT) as TOTALCOST,
b.POSTING_DATE
from INVENTORY_BALANCE b, PART p
WHERE p.QTY_ON_HAND > 0 and b.PART_ID = p.ID and b.POSTING_DATE in (SELECT Max(POSTING_DATE) FROM INVENTORY_BALANCE)
order by p.ID
 
ORA-00933 SQL command not properly ended

Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certain order.
 
Hi lewisp you ROCK !!!! Great to know. Was just about to post that when testing and taking out the order by everything compiled nicely. Thanks again, Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top