Return-Path: <ml-errors@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h9LI2hf31150
 for <oracle-l@orafaq.net>; Tue, 21 Oct 2003 13:02:43 -0500
X-ClientAddr: 66.27.56.212
Received: from www3.fatcity.com (rrcs-west-66-27-56-212.biz.rr.com [66.27.56.212])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h9LI2ac31144
 for <oracle-l@orafaq.net>; Tue, 21 Oct 2003 13:02:40 -0500
Received: (from root@localhost)
 by www3.fatcity.com (8.11.6/8.11.6) id h9LFFS323883
 for oracle-l@orafaq.net; Tue, 21 Oct 2003 08:15:28 -0700
Received: by fatcity.com (05-Jun-2003/v1.0g-b73/bab) via fatcity.com id 005D3DF3; Tue, 21 Oct 2003 08:14:26 -0800
Message-ID: <F001.005D3DF3.20031021081426@fatcity.com>
Date: Tue, 21 Oct 2003 08:14:26 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
Sender: ml-errors@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
Subject: RE: WHERE 1 = 1 (any info on this)
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 73; ListGuru (c) 1996-2003 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

I have seen people use this in pseudo-dynamic sql in a beast called SQR. Especially when they have code like ...

select ...
union 
select ...
union
select ...
union 
select ... limit to your imagination.

Lot of people think that using 1=1 in absence of a valid limiting condition will let them evaluate (and get data from) a union clause where as putting 1=2 will help them avoid ...

I don't hate just because I don't like SQR, I don't like it because until CBO encounters and evaluates 1=2 clause, it still does all the work of selecting etc and that is just a waste.

Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !


**************************************************************************************
This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.
**************************************************************************************5
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni@espn.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

