I want to get date wise data from sql query.
Please help me.
my table definition like:
Create table #tempTbl
( id int,
Note varchar(200),
stDate Datetime NULL,
crAmt Decimal(12,2),
endDate Datetime NULL,
dbAmt Decimal(12,2)
)
Insert into #tempTbl (id,Note,stDate,crAmt,dbAmt)values(1,'Test1','2012-06-01',1000,0);
Insert into #tempTbl (id,Note,crAmt,endDate,dbAmt)values(2,'Test2',0,'2012-06-01',1000);
Insert into #tempTbl (id,Note,stDate,crAmt,dbAmt)values(3,'Test3','2012-06-02',2000,0);
Insert into #tempTbl (id,Note,stDate,crAmt,dbAmt)values(4,'Test4','2012-06-03',3000,0);
Insert into #tempTbl (id,Note,crAmt,endDate,dbAmt)values(5,'Test5',0,'2012-06-02',1000);
Insert into #tempTbl (id,Note,crAmt,endDate,dbAmt)values(6,'Test6',0,'2012-06-06',1000);
Insert into #tempTbl (id,Note,stDate,crAmt,dbAmt)values(7,'Test7','2012-06-05',2000,0);
Select * from #tempTbl
Drop table #tempTbl