Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Help pls
Thu, Apr 27 2006 9:41 AMPermanent Link

Alex
Hello!
DBISAM 3.24

SELECT COUNT(1) AS "Count", 1 AS "IDStorage"
FROM "dA10002"
UNION  ALL
SELECT COUNT(1) AS "Count", 2 AS "IDStorage"
FROM "dA10003"
UNION  ALL
SELECT COUNT(1) AS "Count", 3 AS "IDStorage"
FROM "dA10005"

if table dA10003 empty (RecordCount=0) returns result

Count                                  IDStorage                             
-------------------------------------- --------------------------------------
23                                        1                                     
                                       
47                                        3

must be

Count                                  IDStorage                             
-------------------------------------- --------------------------------------
23                                        1                                     
0                                        2                                     
47                                        3

What do it is correct?
Senx.
Fri, Apr 28 2006 4:05 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< if table dA10003 empty (RecordCount=0) returns result >>

Why not just use COUNT(*) instead of COUNT(1) ?  That should give you the
desired result.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Apr 29 2006 10:59 AMPermanent Link

Alex
Tim,

<<Why not just use COUNT(*) instead of COUNT(1) ?  That should give you the
desired result.>>

I have checked  COUNT(*) - result did not change.
Possible this mistake DBISAM engine?

Mon, May 1 2006 2:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< I have checked  COUNT(*) - result did not change. Possible this mistake
DBISAM engine? >>

It appears so.  3.30 returns a single row with a value of 0 for COUNT(*), so
you should update to 3.30 to get this fix.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, May 2 2006 6:01 AMPermanent Link

Alex
Tim,

<<It appears so.  3.30 returns a single row with a value of 0 for COUNT(*), so
you should update to 3.30 to get this fix.>>

I download and install Database System Utility ver. 3.30.
Check has shown following:
1. If use
 SELECT COUNT(*) AS "Count" FROM Table
result is good - returns a single row with a value of 0.
2. If use
 SELECT COUNT(*) AS "Count", "Additional_Value" AS "Additional_Field" FROM Table
result not correct - returns a single row with a value of EMPTY.

i.e. mistake is not fix?
Tue, May 2 2006 1:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< I download and install Database System Utility ver. 3.30.
Check has shown following:
1. If use
 SELECT COUNT(*) AS "Count" FROM Table
result is good - returns a single row with a value of 0.
2. If use
 SELECT COUNT(*) AS "Count", "Additional_Value" AS "Additional_Field" FROM
Table  result not correct - returns a single row with a value of EMPTY.

i.e. mistake is not fix? >>

Ahh, sorry about that - I missed the additional virtual column.  In that
case, no, it isn't fixed in 3.x.  Unfortunately 3.x is frozen, so the only
way to get the fix is to upgrade to 4.x or fix it in the 3.x source code.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image