A
Assimalyst
Hi,
I am attempting to do a number of count functions on a single table of
data for presentation in an ASP webpage. The functions are number
today, number this week, number this month etc. As the Database table
is large it does not make sense to query it directly a number of times.
My idea is to create a dataset containing the table "ApplicationForms".
I then want to query this and perform the various count functions.
If I were querying the database the query would be:
SELECT COUNT(DISTINCT fkiBatchNumber) AS 'YearCount'
FROM tblApplicationForms
WHERE (dtDateScanned < dtYear)
dtToday is a datetime predefined in C# code.
I have no idea how to query the dataset in an equivilent manner.
Is this the most suitable method of acheiving my requirement? If so,
any help in doing so is much appreciated.
Thanks.
I am attempting to do a number of count functions on a single table of
data for presentation in an ASP webpage. The functions are number
today, number this week, number this month etc. As the Database table
is large it does not make sense to query it directly a number of times.
My idea is to create a dataset containing the table "ApplicationForms".
I then want to query this and perform the various count functions.
If I were querying the database the query would be:
SELECT COUNT(DISTINCT fkiBatchNumber) AS 'YearCount'
FROM tblApplicationForms
WHERE (dtDateScanned < dtYear)
dtToday is a datetime predefined in C# code.
I have no idea how to query the dataset in an equivilent manner.
Is this the most suitable method of acheiving my requirement? If so,
any help in doing so is much appreciated.
Thanks.