EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Query returning incorrect results..  XML

Forum Index » GridSQL - Developers
Author Message
Venkat_B

Member

Joined: 16 Jun 2008 08:39:02
Messages: 45
Offline

Hi Mason,
We are testing GridSQL with Postgresplus. When I issue the below query I am getting incorrect result..

GridSQL -> select calledpartynumber from test_cdr
GridSQL -> where substr(calledpartynumber,1,2) not in ('11','12');
+-------------------+
| calledpartynumber |
+-------------------+
| 1194775588345 |
| 12456 |
+-------------------+
2 row(s).

Whereas, the below query also gives the same result..

GridSQL -> select calledpartynumber from test_cdr
GridSQL -> where substr(calledpartynumber,1,2) in ('11','12');
+-------------------+
| calledpartynumber |
+-------------------+
| 1194775588345 |
| 12456 |
+-------------------+
2 row(s).


And another is when giving limit and offset in a single query is resulting no rows even there are rows in table.


Thanks,
Venkat

This message was edited 1 time. Last update was at 11 Aug 2008 07:30:42

Mason_S

Senior member

Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline

Yikes, this is a bug!

I can see that when the condition is rebuilt, it is leaving off the all important "NOT". We will get this fixed right away.

I also double-checked IN and NOT IN for subqueries, and those are working properly.

Thanks,

Mason
[WWW]
Mason_S

Senior member

Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline

I also wanted to add, that you can do the following in the meantime as a work-around, until this is fixed:

select calledpartynumber from test_cdr
where not substr(calledpartynumber,1,2) in ('11','12');

Note, I added NOT instead at the beginning of the condition.

Thanks,

Mason
[WWW]
Mason_S

Senior member

Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline


This has been fixed and checked into CVS:

http://forums.enterprisedb.com/posts/list/0/1388.page#4936

Thanks,

Mason
[WWW]
 
Forum Index » GridSQL - Developers
Go to:   
Powered by JForum 2.1.8 © JForum Team