Have you tried using union
-----Original Message-----
From: Qi cheng
[mailto:oracledba-ezmlmshield-x78815581.[Email address protected]
Sent: 27 September 2006 19:35
To: LazyDBA Discussion
Subject: Re: weird sql result
I need OR here. And will not work in this case.(I tested, return none)
Seems oracle oracle care about the condition before OR , if I switch the
condition after OR to begin, it return other part of records.
On 9/27/2006 2:27 PM, McCarthy Kendall
<oracledba-ezmlmshield-x30684462.[Email address protected] wrote:
>'OR' to 'AND'
>
>-----Original Message-----
>From: Qi cheng
>[mailto:oracledba-ezmlmshield-x36818603.[Email address protected]
>Sent: Wednesday, September 27, 2006 2:24 PM
>To: LazyDBA Discussion
>Subject: weird sql result
>
>
>SQL> SELECT snseq FROM FSNE WHERE SNPUB = 'LIN' AND SNPUBDT =
'29-MAY-06'
>AND SNEDTN = 'FULL RUN' ;
>
> SNSEQ
>----------
> 355078
> 57663
>
>SQL> SELECT snseq FROM FSNE WHERE
> 2 SNPUB = 'NYT' AND SNPUBDT = '02-MAY-06' AND SNEDTN = 'FULL RUN';
>
> SNSEQ
>----------
> 72018
> 367620
> 72018
>
>But the following not show 355078 and 57663:
>SQL> SELECT snseq FROM FSNE WHERE
> 2 (SNPUB = 'NYT' AND SNPUBDT = '02-MAY-06' AND SNEDTN = 'FULL
>RUN') OR
> 3 (SNPUB = 'LIN' AND SNPUBDT = '29-MAY-06' AND SNEDTN = 'FULL RUN'
>);
>
> SNSEQ
>----------
> 72018
> 367620
> 72018
>
>
>
>---------------------------------------------------------------------
>TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post
>a dba job: http://jobs.lazydba.com To Subscribe :
>http://www.LazyDBA.com To unsubscribe:
>http://www.lazydba.com/unsubscribe.html
>
>
>
>
>
>---------------------------------------------------------------------
>TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post
>a dba job: http://jobs.lazydba.com To Subscribe :
>http://www.LazyDBA.com To unsubscribe:
>http://www.lazydba.com/unsubscribe.html
>
>
>
>
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Oracle LazyDBA home page