CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Nav not working with DISTINCT sql

Print topic Send  topic

Author Message
gsuarez
Posted: 05/06/2003, 7:33 AM

I'm using CCS with ASP, my grid have this query:

SELECT DISTINCT T.identifier AS total
FROM dbo.TablaGeneral_CatalogEntry RIGHT OUTER JOIN
dbo.TablaGeneral T ON
dbo.TablaGeneral_CatalogEntry.identifier = T.identifier

The number of records wiht this query is 6782


I have a NAV control. In the tab CODE this NAV have the query next:

SELECT COUNT(T.identifier) AS total
FROM dbo.TablaGeneral_CatalogEntry RIGHT OUTER JOIN
dbo.TablaGeneral T ON
dbo.TablaGeneral_CatalogEntry.identifier = T.identifier

The number of records wiht this query is 7100

How I can solver this problem? I need the NAV Control, only show 6782 records (equal that grid)

Thanks
RonB
Posted: 05/06/2003, 8:52 AM

the difference is in the distinction :-)

the first query get's distinct records. The count() query get's ALL records hence the difference.

Try using the distinct in the count sql

Ron

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.