Bugs item #2896012, was opened at 2009-11-11 07:41
Message generated for change (Tracker Item Submitted) made by sbenz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2896012&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL "stable"
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stephen Benz (sbenz)
Assigned to: Niels Nes (nielsnes)
Summary: Filter using same field in OR and AND throws typeexception

Initial Comment:
Attempting to write a sql statement that contains the same field in both an AND 
clause and an OR clause causes a TypeException to occur.

Steps to reproduce:
sql>create table "simple" (id int,field1 int, field2 int);
sql>select * from "simple" where field1 = 1 and (field1 = 1 or field2 = 1);

Error seen:
!TypeException:user.s0_1[27]:'algebra.kunion' undefined in: _38:any := 
algebra.kunion(_24:bat[:oid,:int], _37:bat[:oid,:void])
!TypeException:user.s0_1[29]:'algebra.markT' undefined in: _41:any := 
algebra.markT(_38:any, _39:oid)
!TypeException:user.s0_1[30]:'bat.reverse' undefined in: _42:any := 
bat.reverse(_41:any)
!TypeException:user.s0_1[40]:'algebra.leftjoin' undefined in: _58:any := 
algebra.leftjoin(_42:any, _57:bat[:oid,:int], _59:lng)
!TypeException:user.s0_1[41]:'algebra.leftjoin' undefined in: _60:any := 
algebra.leftjoin(_42:any, _19:bat[:oid,:int], _59:lng)
!TypeException:user.s0_1[42]:'algebra.leftjoin' undefined in: _61:any := 
algebra.leftjoin(_42:any, _34:bat[:oid,:int], _59:lng)
!SQLException:SQLengine:Program contains errors

Expected result:
All rows that meet the condition field1 = 1 should be returned, and no rows 
that *only* meet the condition field2=1 are expected.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2896012&group_id=56967

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to