Kamis, 10 Mei 2018

RE: [MS_AccessPros] help with my query

 

The simplest answer is for you to create a  uery that returns the lowest value. At that point, you can use it as your source for the main query.

 

A bit more detail is necessary for us to move forward.

 

Regards,
Bill Mosca,
Founder, MS_Access_Professionals

MS Access MVP 2006-2016
That'll do IT http://thatlldoit.com

My Nothing-to-do-with-Access blog

https://wrmosca.wordpress.com

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, May 10, 2018 7:22 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] help with my query

 

 

I have the following query:

 

UPDATE DISTINCTROW crwksuma INNER JOIN MLTC ON crwksuma.[patient id] = MLTC.patientid SET crwksuma.insrcd = "   ", crwksuma.[billing type] = "M"

WHERE [mltc].[enrollmentdate]>[Forms]![zformcrwk]![pid to];

 

The query works, but '[mltc].[enrollmentdate]' can have multiple entries and I only want to use the lowest one. If I use the MIN() function, I get error 'cannot have aggregate function in WHERE clause.'.



Is there any way to do this in the above query or do I need to do it differently.



Thanks for your help.



Sarah





 

__._,_.___

Posted by: "Bill Mosca" <wrmosca@comcast.net>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (19)

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