Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 get recordcount

Author  Topic 

spiveygb
Starting Member

3 Posts

Posted - 2008-01-22 : 14:18:58
I know my limitations and writing mind-numbing queries is one of them so any help is greatly appreciated! I need to be able to display the # of downloads for each particular file. In the following query I need to get the count of "cdds_DataDownload.ZipFileName" for use in a grid.

SELECT DISTINCT 
cdds_Metadata.DatasetId AS ID, cdds_Metadata.DataCurrencyDate AS CurrencyDate, cdds_Metadata.DataFormatType AS DataFormat,
cdds_DataUpload.ZipFileName, cdds_Agencies.WorkUnit + ' - ' + cdds_Agencies.WorkUnitDesc AS AgencyName
FROM cdds_Metadata INNER JOIN
cdds_DataDownload INNER JOIN
cdds_DataUpload INNER JOIN
cdds_Agencies ON cdds_DataUpload.AgencyUniqueId = cdds_Agencies.AgencyUniqueId ON
cdds_DataUpload.ZipFileName = cdds_DataDownload.ZipFileName ON cdds_Metadata.DatasetId = cdds_DataUpload.DatasetId
ORDER BY cdds_DataUpload.ZipFileName
   

- Advertisement -