Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Query of Query count(column) returns blank not zero

Guest
Nov 07, 2008 Nov 07, 2008
This appears to be a bug in 7,0,1,116466 and 8,0,1,195765

Query of Query count(column) or count(*) returns blank not zero when there are no matches. Properly returns a number when there are query matches.

e.g. select count(i_id) from PersonnelQuery where i_id < 100

Where does one report these?
TOPICS
Database access
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Nov 07, 2008 Nov 07, 2008
scottcook,

This was a known bug in ColdFusion 6.x which has apparently not been fixed.

Bug in CF6 (See the Comments section of the page linked below)
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/using_29.htm

Workaround
http://www.bennadel.com/blog/244-ColdFusion-Query-Of-Queries-Odd-COUNT-Behavior.htm

To report this as a bug
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Translate
LEGEND ,
Nov 07, 2008 Nov 07, 2008
report what? normal query behaviour? no matter how many NULLs you count
the result will still be... NULL!

you can do a QoQ recordcount check before processing results of your QoQ
to make sure it has actually returned a result.

but if your sure you want to report this, go to
http://www.adobe.com/go/wish/


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 07, 2008 Nov 07, 2008
Thank you for your quick rude response. They are not nulls. Did I say nulls? I said no records match the query. That results in a zero in every database I've used in the last 25 years. So are you still telling me this is normal query behavior?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 07, 2008 Nov 07, 2008
scottcook,

This was a known bug in ColdFusion 6.x which has apparently not been fixed.

Bug in CF6 (See the Comments section of the page linked below)
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/using_29.htm

Workaround
http://www.bennadel.com/blog/244-ColdFusion-Query-Of-Queries-Odd-COUNT-Behavior.htm

To report this as a bug
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2008 Nov 07, 2008
didn;t mean to be rude at all. and i did provide a link to report it.

on a second thought, it is a bit strange, but then cf QoQ's support only
limited SQL...

no, you are right, i would expect that QoQ to return a row, too...


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 07, 2008 Nov 07, 2008
Azadi, yes, thanks for the link. I logged it. It has to be such a simple fix I can't believe that it's been years.

Bob - my workaround was probably less annoying to do. I do a select of any column and then used QofQ.RecordCount instead of the QofQ.countqueryvariable
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 09, 2008 Nov 09, 2008
LATEST
> This appears to be a bug.

Yep.

> Query of Query count(column) returns blank not zero when there are no matches.
> With matches works fine.
>
> e.g. select count(i_id) from PersonnelQuery where i_id < 100
>
> Where does one report these?

Just FYI... I've made sure the Adobe bods on the CF9 programme are aware of
this. UInfortunately I cannot relay back what action is being taken, or
even *if* any action is being taken (I've signed the usual NDA carry-on),
but they're aware of it.

Cheers for bringing this up.

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources