2 Replies - 7337 Views - Last Post: 24 March 2010 - 07:36 PM Rate Topic: -----

#1 srbatcha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 20-March 09

How to create ( monthly wise and yearly wise report in one query

Posted 24 March 2010 - 01:38 PM

I am doing one project using vb6.0 with ms-access. my question is

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

*//
fdate=01-jan-2009
tdate=31-dec-2009

fidate=01-jan-2009
todate=31-jan-2009

But result is not correct. what is the mistake for this query?


Please help me

Thank you

sathik
srbatcha_29@yahoo.com

This post has been edited by srbatcha: 25 March 2010 - 06:09 AM


Is This A Good Question/Topic? 0
  • +

Replies To: How to create ( monthly wise and yearly wise report in one query

#2 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: How to create ( monthly wise and yearly wise report in one query

Posted 24 March 2010 - 03:44 PM

well i am not sure what you rly want here but if you think of it the year report will contain and the monthly and you can make an year report and use filter to show the monthly results. but i dont understand what you rly want.
Was This Post Helpful? 0
  • +
  • -

#3 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: How to create ( monthly wise and yearly wise report in one query

Posted 24 March 2010 - 07:36 PM

there is no date column then how can you get the year wise or month wise report
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1