Toad World® Forums

Problem with having and count


#1

The following sql works in sql plus, but not in nav

SELECT object_type, status, GENERATED, COUNT()
FROM all_objects
GROUP BY object_type,
status,
GENERATED
HAVING COUNT(
) > 1;


#2

Even worse, the having clause seems to make nav ignore the group by completely! It returns rows when it shouldn’t!

So, Nav will take this statement and run it!

SELECT object_name,
status,
CREATED
FROM all_objects
GROUP BY os,
CREATED
HAVING COUNT(*) > 1;

:frowning: :frowning:

Of course, the only way it can do this is by ignoring the group clause completely. That explains why the count(*) in the previous statement is considered a problem.

Jet


#3

This issues has already been fixed in our internal build.

Gwen


#4

But, if you imbed it in a sub query it works! Weirdness.


#5

Hi Joe,

There was a bug in the SQL parser. It would truncate SELECT statements after FROM or WHERE clause. This has been fixed now.

Regards,
Roman


#6

Yeah, there are other type s of queries that are broken too! Do you know when this is going to be released?

I can’t do my work with this version. I’ll have to go back to 5.5.

null


#7

Confirmed fixed in Build 1028.