473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

INNER JOIN

I am using Access to create a SQL query. It creates an Inner Join Query. I cut and paste the query into PL-SQL. When I try to execute the query I get an error.

ORA 933 SQL command not properly ended.

It highlights the INNER JOIN statement on the SQL command.

Can someone recommend a utility to convert these Microsoft or Access SQL queries to PL SQL?

Thanks!

Jul 19 '05 #1
7 43626
Barry Young wrote:
I am using Access to create a SQL query. It creates an Inner Join
Query. I cut and paste the query into PL-SQL. When I try to execute the
query I get an error.

ORA 933 SQL command not properly ended.

It highlights the INNER JOIN statement on the SQL command.

Can someone recommend a utility to convert these Microsoft or Access SQL
queries to PL SQL?


In many cases what is needed another line following the end for the
SQL-statement. This line should contain a single "/" as the leftmost and
only character on the line
HTH & YMMV

Jul 19 '05 #2
Hello Ana,

Thanks for the reply...

Can you please give me an example of what you are referring to?

Thanks again!

Barry
"Ana C. Dent" <an*******@hotmail.com> wrote in message
news:0tqHb.41585$BQ5.35902@fed1read03...
Barry Young wrote:
I am using Access to create a SQL query. It creates an Inner Join
Query. I cut and paste the query into PL-SQL. When I try to execute the
query I get an error.

ORA 933 SQL command not properly ended.

It highlights the INNER JOIN statement on the SQL command.

Can someone recommend a utility to convert these Microsoft or Access SQL
queries to PL SQL?


In many cases what is needed another line following the end for the
SQL-statement. This line should contain a single "/" as the leftmost and
only character on the line
HTH & YMMV

Jul 19 '05 #3
> Barry Young wrote:

I am using Access to create a SQL query. It creates an Inner Join
Query. I cut and paste the query into PL-SQL. When I try to execute
the query I get an error.

ORA 933 SQL command not properly ended.

It highlights the INNER JOIN statement on the SQL command.

Can someone recommend a utility to convert these Microsoft or Access
SQL queries to PL SQL?

Thanks!


Please post your SQL statement, and the target Oracle version. If it's
proper SQL it should run on plain Oracle (since Oracle runs as close to
the standard as any) but the version number is certainly a big help.

Ana C. Dent suggested adding a line with a slash "/" as the only thing
on the line. No leading or trailing charaters (not even a blank).
Something like

SELECT * FROM TAB
/

or

SELECT TNAME
FROM TAB
/
Please note, PL/SQL is Oracle's procedural programming language (doing
roughly the same as Sybase's Transact-SQL (AKA Microsoft's T-SQL)).
These languages try to put procedural stuff (sequential statements,
loops, conditions, etc) around SQL. I suspect you are trying to use
plain SQL rather than the slightly more complex PL/SQL.

HTH
/Hans
Jul 19 '05 #4
Hello Hans,

Here is an example statement:

SELECT Table1.StartDate, Table2.Description
FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID;

INNER JOIN is what is giving me the ORA 933 SQL command not properly ended.

This is just a piece of the code.. In the final statement there will be
NESTED INNER JOINS.. So I may have to do Unions??

Any help would be appreciated.

Thanks!

Barry
"Hans Forbrich" <fo******@yahoo.net> wrote in message
news:3F***************@yahoo.net...
Barry Young wrote:

I am using Access to create a SQL query. It creates an Inner Join
Query. I cut and paste the query into PL-SQL. When I try to execute
the query I get an error.

ORA 933 SQL command not properly ended.

It highlights the INNER JOIN statement on the SQL command.

Can someone recommend a utility to convert these Microsoft or Access
SQL queries to PL SQL?

Thanks!


Please post your SQL statement, and the target Oracle version. If it's
proper SQL it should run on plain Oracle (since Oracle runs as close to
the standard as any) but the version number is certainly a big help.

Ana C. Dent suggested adding a line with a slash "/" as the only thing
on the line. No leading or trailing charaters (not even a blank).
Something like

SELECT * FROM TAB
/

or

SELECT TNAME
FROM TAB
/
Please note, PL/SQL is Oracle's procedural programming language (doing
roughly the same as Sybase's Transact-SQL (AKA Microsoft's T-SQL)).
These languages try to put procedural stuff (sequential statements,
loops, conditions, etc) around SQL. I suspect you are trying to use
plain SQL rather than the slightly more complex PL/SQL.

HTH
/Hans

Jul 19 '05 #5
Hans,

Well I think what appears to be the problem is that Pre Oracle 9i does not
support the INNER JOIN. I am using 8i so I will have to restructure the SQL
query similar to this:

SQL> SELECT c.course_name, c.period, e.student_name
2 FROM course c, enrollment e
3 WHERE c.course_name = e.course_name
4 AND c.period = e.period;

I thought INNER JOINS were an ANSI SQL standard. I was surprised that
ORACLE doesn't support the INNER JOIN. Unless I am wrong.

Barry

"Hans Forbrich" <fo******@yahoo.net> wrote in message
news:3F***************@yahoo.net...
Barry Young wrote:

I am using Access to create a SQL query. It creates an Inner Join
Query. I cut and paste the query into PL-SQL. When I try to execute
the query I get an error.

ORA 933 SQL command not properly ended.

It highlights the INNER JOIN statement on the SQL command.

Can someone recommend a utility to convert these Microsoft or Access
SQL queries to PL SQL?

Thanks!


Please post your SQL statement, and the target Oracle version. If it's
proper SQL it should run on plain Oracle (since Oracle runs as close to
the standard as any) but the version number is certainly a big help.

Ana C. Dent suggested adding a line with a slash "/" as the only thing
on the line. No leading or trailing charaters (not even a blank).
Something like

SELECT * FROM TAB
/

or

SELECT TNAME
FROM TAB
/
Please note, PL/SQL is Oracle's procedural programming language (doing
roughly the same as Sybase's Transact-SQL (AKA Microsoft's T-SQL)).
These languages try to put procedural stuff (sequential statements,
loops, conditions, etc) around SQL. I suspect you are trying to use
plain SQL rather than the slightly more complex PL/SQL.

HTH
/Hans

Jul 19 '05 #6
Barry Young wrote:

Hello Hans,

Here is an example statement:

SELECT Table1.StartDate, Table2.Description
FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID;

INNER JOIN is what is giving me the ORA 933 SQL command not properly ended.

This is just a piece of the code.. In the final statement there will be
NESTED INNER JOINS.. So I may have to do Unions??

Any help would be appreciated.

Thanks!


Try eliminating the semi-colon. SQL statements themselves do not use a
semi-colon. However many of the languages/environments that call SQL do
need a 'statement terminator' and many of those use a semi-colon. In
many cases (eg: cut & paste) will accidently include the semi-colon as
part of the SQL statement instead of an environment statement
terminator.

Also note that the 'new' ANSI syntax (INNER JOIN, NATURAL JOIN, etc.) is
only supported when dealing with Oracle9i and higher. If you are going
against an older version (Oracle8i, Oracle8, Oracle 7) then you need to
fall back to the old syntax which would be

SELECT Table1.StartDate, Table2.Description
FROM Table1, Table2
WHERE Table1.ID = Table2.ID;
Jul 19 '05 #7
Barry Young wrote:

Hans,

Well I think what appears to be the problem is that Pre Oracle 9i does not
support the INNER JOIN. I am using 8i so I will have to restructure the SQL
query similar to this:

SQL> SELECT c.course_name, c.period, e.student_name
2 FROM course c, enrollment e
3 WHERE c.course_name = e.course_name
4 AND c.period = e.period;

I thought INNER JOINS were an ANSI SQL standard. I was surprised that
ORACLE doesn't support the INNER JOIN. Unless I am wrong.

Barry


The new JOIN syntax is not available below Oracle9i.

As for being an ANSI SQL standard, you are likely running into a timing
issue, as follows:

Oracle8 series (which ends with Oracle8i Release 3 or 8.1.7.x) was
released around 1997. Flip side, ANSI SQL has had 3 major revisions -
'87 (IIRC), '92 and '99. If I'm not mistaken, that JOIN syntax was
introduced in SQL '92 (but had holes) and was completed in '99. Not the
kind of thing I'd hold against Oracle, especially since there was a
perfectly acceptable workaround.

All the more reason to move to Oracle9i. Especially since Oracle did
announce End of Life for 8i.
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ike | last post by:
Oh I have a nasty query which runs incredibly slowly. I am running MySQL 4.0.20-standard. Thus, in trying to expedite the query, I am trying to set indexes in my tables. My query requires four...
4
by: Nathan | last post by:
I have an application that uses an Access database to gather information on students' test scores. In the database there are three tables which are joined by one- to-many relationships: ...
6
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: ...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
3
by: Zeff | last post by:
Hi all, I have a relational database, where all info is kept in separate tables and just the id's from those tables are stored in one central table (tblMaster)... I want to perform a query, so...
3
by: janko.klemensek | last post by:
Hello. In the following query: SELECT tblDokumentiDetails.ID_Artikel, - tblDokumentiDetails.Kolicina AS Kolicina FROM (tblDokumenti INNER JOIN tblDokumentiDetails ON tblDokumenti.ID_Dokument...
12
by: Chamnap | last post by:
Hello, everyone I have one question about the standard join and inner join, which one is faster and more reliable? Can you recommend me to use? Please, explain me... Thanks Chamnap
3
by: Anila | last post by:
Hi Friends, My problem with Inner join is ... first i joined two tables and i got the result. after that iam trying to join one more table its giving syn tax error in JOIN condition. ...
1
by: teneesh | last post by:
Here I have a code for a view that has been created by a developer on my team. I am trying to use the very same code to create a view for a different formid/quesid. But I cannot figure out how this...
2
by: MATTXtwo | last post by:
I have this store procedure to select data from table with join like this...SELECT tblPeribadi.Personel_No, tblPeribadi.Nama,tblCompany.Keterangan as Company_Code, tblPeribadi.Jawatan,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.