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

Help With SQL Statement

Status
Not open for further replies.

Bkster

Technical User
Jan 25, 2002
94
0
0
US
This is a query that I created in MS Access. This is the error I am getting when I try and put into a recordset to publish on the web. I have done this before but have forgotten what it was that was cauing the error I think it was placement of "". Any help would be greatly appreciated.

ORA-00933 SQL Command not properly ended.

SELECT PLATEAU_PA_SCH_SEG.START_DTE, PLATEAU_PA_SCH_SEG.START_TME, PLATEAU_PA_SCHED.SCHD_DESC, PLATEAU_PA_LOCN.LOCN_DESC
FROM PLATEAU_PA_LOCN INNER JOIN ((PLATEAU_PA_SCH_SEG INNER JOIN PLATEAU_PA_SCHED ON PLATEAU_PA_SCH_SEG.SCHD_ID = PLATEAU_PA_SCHED.SCHD_ID) INNER JOIN PLATEAU_PA_SSG_LOCN ON (PLATEAU_PA_SCH_SEG.SSG_SEG_NUM = PLATEAU_PA_SSG_LOCN.SSG_SEG_NUM) AND (PLATEAU_PA_SCHED.SCHD_ID = PLATEAU_PA_SSG_LOCN.SCHD_ID)) ON PLATEAU_PA_LOCN.LOCN_ID = PLATEAU_PA_SSG_LOCN.LOCN_ID
WHERE (((PLATEAU_PA_SCH_SEG.START_DTE)>Date() Or (PLATEAU_PA_SCH_SEG.START_DTE)=Date()))
ORDER BY PLATEAU_PA_SCH_SEG.START_DTE;
 
You have at least 2 issues with this query.

1) Oracle queries cannot have ; at the end, unless you're sending them from SQL*Plus.

2) Unless you're using Oracle 9i (and since this was posted in the 8/8i forum, I'll assume you're not), ANSI JOIN syntax is not supported. So you'll need to rewrite your WHERE clause to get rid of all the JOIN statements and replace them with something like:
Code:
table1.column = table2.column

...and so on. Don't forget to use the
Code:
(+)
operator for outer joins, if you need it.

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top