Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: What is wrong with my simple SQL syntax?

Re: What is wrong with my simple SQL syntax?

From: Hans Bos <hans.bos_at_xelion.nl>
Date: Fri, 11 May 2001 20:28:19 +0200
Message-ID: <9dhapg$7jp$1@porthos.nl.uu.net>

Daniel A. Morgan <dmorgan_at_exesolutions.com> wrote in message news:3AF8D55F.954794A9_at_exesolutions.com...
> Kenneth Jensen wrote:
>
> > I try to make a simple SQL syntax the way I have always done on
 other
> > databases, but Oracle says that it hasn't been properly terminated.
> >
> > SELECT tblHippie.*, tblTrip.strName FROM
> > tblHippie INNER JOIN tblTrip ON tblHippie.lngHippieID =
 tblTrip.lngHippieID
> >
> > Can someone please tell me, what's wrong with it?
> >
> > Yours sincerely
> > Kenneth Jensen
>
> What is wrong is that you never opened a book on PL/SQL.
>
> You can not work with Oracle using syntax that appears to be straight
 out of
> SQL Server.
>
> The advise you have already received from TurkBear will get you
 through this
> one. But you will get no further if you don't buy a PL/SQL book, open
 it, and
> read it.
>
> Daniel A. Morgan
>

I thought that PL/SQL is oracle's proprietary scripting language.

This looks like standard (ISO SQL92) syntax to me. I have never used SQL-sever but I guess that it supports the SQL standard.

Fortunately Oracle does support entry level SQL (no doubt the main reason for entry level SQL is that the main databases already supported it).

This query can also be written as:
SELECT tblHippie.*, tblTrip.strName FROM tblHippie, tblTrip
where tblHippie.lngHippieID = tblTrip.lngHippieID.

If you want to do more advanced things (like outer joins) you have to look into an Oracle specific SQL manual, because Oracle has invented their own syntax for outer joins and has different names for standard functions.
In the SQL reference their is also a chapter about what the support from the SQL standard apart from entry level SQL (e.g. you can use a trailing underscore in identifiers).

It's a pity that Oracle doesn't implement more of the standard, like standard syntax, the standard functions (with standard names) and proper date and time handling.

Greetings,
Hans.   Received on Fri May 11 2001 - 13:28:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US