Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Binaries » View Thread |
Messages 1 to 2 of 2 total |
edb count function problem |
Wed, May 14 2014 5:52 AM | Permanent Link |
codealfa | We use Delphi 7 and edb 2.16b2.
We found a problem when using count function. I attached the sample database for analizing the problem. /* BAD: result: 3 */ SELECT COUNT(*) FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.t1id = t1.id); /* GOOD: result: 2 */ SELECT COUNT(id) FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.t1id = t1.id); /* GOOD: result: 2 rows */ SELECT * FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.t1id = t1.id); Attachments: count_error.zip |
Wed, May 14 2014 7:29 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | codealfa
It does look like a bug, You should report it to ElevateSoft support to bring it to Tim's attention quicker. In the meantime I'd suggest using an alternative like SELECT COUNT(*) FROM t1 WHERE id in (SELECT t1id FROM t2) Roy Lambert |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |