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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-00928: missing SELECT keyword

Status
Not open for further replies.

Chrillef

Programmer
Jan 16, 2003
7
SE
Hi

I have created a question in Access and then copied the SQL question from it.
When I try to run it in eg SQL plus I get an error.From the error I understand that there must be one more Select statement but I can't figure out where.

SQL> SELECT MC_POSUM.ID, MC_POLINE.ID,MC_INVTRANS.TQTY_AMT, MC_PCITEM.ITID, MC_INVTRANS.PRSD_DTTM,MC_EMPLOYEE.AENM

2 FROM ((((((MC_POSUM INNER JOIN MC_POLINE ON MC_POSUM.POSUMOI = MC_POLINE.PO_OI) INNER JOIN MC_P
ODEL ON MC_POLINE.POLNOI = MC_PODEL.POLINE_OI) INNER JOIN MC_INVTRANS ON MC_PODEL.PODELOI = MC_INVTR
ANS.PODEL_OI) INNER JOIN MC_EMPLOYEE ON MC_INVTRANS.AUDT_USER_OI = MC_EMPLOYEE.EMPOI) INNER JOIN MC_PCITEM ON MC_POLINE.PCITEM_OI = MC_PCITEM.PCITOI) LEFT JOIN MC_STOREROOM ON MC_INVTRANS.STOR_OI = MC_STOREROOM.STOROI) INNER JOIN MC_EMPLOYEE AS MC_EMPLOYEE_1 ON MC_POSUM.BUY_OI = MC_EMPLOYEE_1.EMPOI

3 WHERE (((MC_EMPLOYEE_1.AENM) Not Like [MC_EMPLOYEE.AENM]) AND ((MC_STOREROOM.STOROI) Not Like 3
2050) AND ((MC_INVTRANS.TRNTYP) Like 5));
FROM ((((((MC_POSUM INNER JOIN MC_POLINE ON MC_POSUM.POSUMOI = MC_POLINE.PO_OI) INNER JOIN MC_PODEL
*
ERROR at line 2:
ORA-00928: missing SELECT keyword

 
Hi

Not an expert on Oracle dialect of SQL, but I think you will find that Access style JOIN is not supported

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Your problem seems to be here
[blue][tt]
2050) AND ((MC_INVTRANS.TRNTYP) Like 5))[/tt][/blue][COLOR=red yellow];[/color][blue][tt]
FROM ((((((MC_POSUM INNER JOIN MC_POLINE ON MC_POSUM.POSUMOI = MC_POLINE.PO_OI) INNER JOIN MC_PODEL
[/tt][/blue]
The semi-colon at the end of the WHERE clause ends the first SQL statement and then you have a FROM clause with no SELECT before it hence, "missing SELECT keyword". I suspect that you really didn't mean to have that FROM after the end of the statement.
 
HI

Thanks for both you answers.
The last Form line is something that is added extra in SQL plus. The line is already in the beginning so that's why the; seems to be missing. This is one problem. But I also have another appliction which doesn't add this line and the question doesn't work there either.
I am accessing an Oracle DB so perhaps my question must be changed somehow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top