Ok... I'm really not in the mood for trying to figure out this sql right
now.  I know it's simple, but I just can't get my head round it!

I have a table with these types of values:

Txt     num     date
A       12      12/02/04
A       44      13/02/04
B       2       13/02/04
B       4       14/02/04
B       9       15/02/04

You get the idea. It's basically a table full of the counts of a string
for a specific day (data collection app).

I want to produce a table for a given date range that says:

Date range, from 12/02/04 to 13/02/04:

Txt     num
A       56
B       2

Anyone do it in one query (NOTE: 1 query). There are 1000s of records
for each day, so doing a

SELECT DISTINCT txt
FROM tbl

And then looping over them to get the:

SELECT COUNT(num)
FROM tbl
WHERE txt = '#myquery.txt#'

Isnt' going to be worthwhile. I know I'm 80% of the way there... Call it
brain fuzz today.

Anyone?

Paul
--------------------------
Paul Johnston
PJ Net Solutions Ltd
E: [EMAIL PROTECTED]
M: +44 7866 573013



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to