Click to See Complete Forum and Search --> : ms sql


kashyaplalit
May 19th, 2004, 01:33 AM
hi i want a query
my table has two fields one is number of transacto\ion and other is date and time
so i want to calculate the out put as this
tra id DATE_TIME
2 10/11/2003
0 11/11/2003
3 12/11/2003
to be noted in my table has no records for date 11/11/2003 so in my result i want the count for transction as zero
working on sql 2000

hspc
May 19th, 2004, 04:50 AM
you'll need to make multiple queries!!
retrieve the data using your query as usual .. but using Select into #temptable..
then using a cursor search for date gaps in the #temptable and insert them..