first i have to select 'FromDate' and also 'TODate' from datetimepicker.then click preview button.in preview button ,passing parameters like "customerid","from date" and "to date" and called here "save function",because want to insert some datas into a 'newtable(tblreport)',so i written a query ij sql 2005, in this save function,which is used for select(by using inner join of two table like tblsales and tbl salesitem) and also insert here into a new table for design a report.i have mistake in that query in WHERE condition.i don't know how to give.THE date which is inserted into that new table(tblreport) is invoice date means from date....but first i need date should display one by one in order....if you want my query...i will forward....please help me as soon as possible....in c# windows application