How to create ( monthly wise and yearly wise report in one query) based on below query.
rec.Open "select Sales_Person_ID,Employee_Name,sum(Total_value),division_name,segment_name from segment_trans where (segment_trans.date >= #" & (fdate.Text) & "# and segment_trans.date<= #" & (tdate.Text) & "# ) and (segment_trans.date >= #" & (fidate.Text) & "# and segment_trans.date<= #" & (todate.Text) & "# )
GROUP BY Sales_Person_ID ,Employee_Name,division_name,segment_name order by division_name,segment_name", con, adOpenKeyset, adLockOptimistic
But result is not correct. what is the mistake for this query?
Please help me
This post has been edited by srbatcha: 25 March 2010 - 06:09 AM