3 Replies - 2457 Views - Last Post: 30 June 2012 - 06:57 PM

#1 quitac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 28-March 09

MS Access count distinct and group dates query help

Posted 29 June 2012 - 11:32 PM

Hello my friends. I have a table like the one I attached.

Whem I wrote the query :

SELECT ekipman_no, Count(*) AS Items
FROM is_emri
GROUP BY ekipman_no

This just counts the distinct elements. BUt my dates are gone. I want to store the dates of the distinct elements like

ekipman_no --- count ---- dates
1A-103 -------- 2 ------ 14/06/2012,17/06/2012

So I wnat my dates to be stored too.
Thanks in advance

Attached image(s)

  • Attached Image

This post has been edited by quitac: 29 June 2012 - 11:33 PM


Is This A Good Question/Topic? 0
  • +

Replies To: MS Access count distinct and group dates query help

#2 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: MS Access count distinct and group dates query help

Posted 30 June 2012 - 10:16 AM

Will need VBA code to rearrange date values into a single record. Review http://allenbrowne.c...unc-concat.html
That function works but can run very slow.
Don't know if all can be done in one query.

Why don't you build a report and use grouping & sorting features with summary calcs in header/footer?
Was This Post Helpful? 0
  • +
  • -

#3 quitac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 28-March 09

Re: MS Access count distinct and group dates query help

Posted 30 June 2012 - 10:40 AM

Thanks for your reply,

I just build a report using group etc.. and it works fine. I just want to learn the query. Thats all.

Do you have any idea about howto pass crystal report database login window at the topic below :

http://www.dreaminco...e-login-screen/

thank you again.
Was This Post Helpful? 0
  • +
  • -

#4 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: MS Access count distinct and group dates query help

Posted 30 June 2012 - 06:57 PM

Nope, never used Crystal Reports.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1