Subject Re: [IBO]Major problem for me with V4.7.16
Author Martijn Tonies
> > At 09:43 PM 16/02/2007, you wrote:
> > >Unfortunately I have lots of code like
> > >Select a.bla,b.bla,c.bla
> > >from (taba a join tabb b)left outer join tabc c
> > >
> > >The presence of these brackets breaks the parser. I know
> > Helen has told me
> > >that the use of brackets in the 'from' is 'not correct syntax' but I
> > >have been using it for years, it worked in V4.3Aa and it is
> > accepted by
> > >the engine.
> > >
> > >I have a huge task getting rid of the brackets especially as
> > a lot of
> > >SQL is generated in code and it is sometimes difficult to
> > see both ends
> > >of the brackets.
> > >
> > >Should the parser be 'fixed' or are we officially declaring
> > the use of
> > >brackets in 'from' illegal?
> >
> > Brackets in 'from' are legal, just not the way you are using
> > them. You can (and sometimes need to) bracket the join
> > conditions, i.e.
> >
> > from tableA a
> > join tableB b on (........)
> >
> > I'm curious about where you picked up the idea of bracketing
> > everything including the ON .... It's not even provided as
> > an optional syntax under the standard, as far I can find out...

Brackets are legal as he used them.

> > Helen
>
> Yes, I'm curious as well. Its so long ago I don't remember. I've never
> read the standard my guess is I saw it somewhere :-/

I believe the brackets signal preferred join order.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com