Rabu, 14 Maret 2018

Re: [MS_AccessPros] Re: Crosstab query help needed

 

You can create a total query that includes just the grouping fields and the Min of the difference. You can then join this query to the original query on the grouping fields as well as the min of difference to the difference.


Duane 




From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of tcellr777 <no_reply@yahoogroups.com>
Sent: Wednesday, March 14, 2018 7:32 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Crosstab query help needed
 


Formatting was lost, so retrying:

ORDER_NO          TASK_NAME             CREATED_DATE      COMPLETE_DATE              DIFFERENCE

 2017-25420     Pricing - Banana              04/05/2017               06/12/2017                            68 
 2017-25420     Pricing  - Banana             04/07/2017               06/12/2017                            66

 2017-25420     Pricing - Carrots              07/01/2017               07/12/2017                            11 
 2017-25420    Pricing  - Carrots              07/11/2017               07/12/2017                            01


I haven't done a crosstab query for a long while, but I think that is what I kinda need.  The query needs to show all of the above columns, and the closest date difference for each of the above groups.  The order numbers do change.  Do I have to concatenate the first three columns, in order to pick the best difference?  If possible, I think a simple SQL solution would work, but I can't think of any right now.

Idea result would be:
2017-25420     Pricing  - Banana             04/07/2017               06/12/2017                            66
2017-25420     Pricing  - Carrots              07/11/2017               07/12/2017                            01


Thanks for any help,
Mark B.





__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar