Where Clause in Parenthesis

Joe Boyle atla38 at dsl.pipex.com
Wed Aug 17 13:54:59 CDT 2005


I wish it were, but Fernando confirmed that they made no difference.

Way back in the day, I must have fixed something else and at the same time
added the ()'s and assumed the rest. Still - and as I said to F, you learn
something every day :-)

Regards, Joe.



-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Darren Reely
Sent: 17 August 2005 19:03
To: Joe Boyle
Cc: powerh-l at lists.sowder.com
Subject: Re: Where Clause in Parenthesis

Joe Boyle wrote:
> first of all I would suggest that you place the 'where' clause in brackets
> as below. 

>         where  ( (im.credit_note_flag   =  'Y'  ) and &
>                 (id.gl_account_no      <> 'D2480'   )   )


Joe,

Is that one of those 'Old School' practices again. Based on the WHERE 
clause above, parenthesis seem to simply be a setup for possible 
confusion with no added value.

I suppose the reason to add extra parenthesis could be due to knowledge 
of a particular database engine. Years ago when I worked with the 
Digital RDB database, via Pascal, we had an expert tell us that 
parenthesis helped the RDB engine make more efficient queries. And sure 
enough, we saw some performance gains by carefully rearranging our 
statements within grouped parenthesis.

Darren
-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.



More information about the powerh-l mailing list