Hi,
Got a SQL question for you experts out here. I would like to generate a count field based on the table below. Basically the count would reflect the number of records with the dates lesser than it and of the same ID.
Source Table
============
ID DATE
=== =======
123 01/01/05
123 01/01/04
123 01/01/03
124 01/01/05
Result Table
============
ID DATE Count
=== ======= ======
123 01/01/05 2
123 01/01/04 1
123 01/01/03 0
124 01/01/05 0
Any ideas anyone???? I am stumped.
Got a SQL question for you experts out here. I would like to generate a count field based on the table below. Basically the count would reflect the number of records with the dates lesser than it and of the same ID.
Source Table
============
ID DATE
=== =======
123 01/01/05
123 01/01/04
123 01/01/03
124 01/01/05
Result Table
============
ID DATE Count
=== ======= ======
123 01/01/05 2
123 01/01/04 1
123 01/01/03 0
124 01/01/05 0
Any ideas anyone???? I am stumped.