Selasa, 31 Maret 2015

[MS_AccessPros] Re: Identify patients that are not those with an identified enc number

 

Patty


I think this is what you are looking for.

SELECT wo_Master_IM3_filter.person_id
       , wo_Master_IM3_filter.enc_id
       , wo_Master_IM3_filter.modify_timestamp
       , wo_Master_IM3_filter.visit_type_expanded
       , wo_Master_IM3_filter.rendering_provider
FROM   wo_Master_IM3_filter
WHERE  wo_Master_IM3_filter.enc_id NOT IN
       (SELECT [wo_master_IM3_shot only encounters].enc_id
       FROM    [wo_master_IM3_shot only encounters]
       )

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com


---In MS_Access_Professionals@yahoogroups.com, <pattykf@cox.net> wrote :

I have this query, but what i want is the opposite, I want those without the same enc number
SELECT wo_Master_IM3_filter.person_id, wo_Master_IM3_filter.enc_id, wo_Master_IM3_filter.modify_timestamp, wo_Master_IM3_filter.visit_type_expanded, wo_Master_IM3_filter.rendering_provider
FROM wo_Master_IM3_filter LEFT JOIN [wo_master_IM3_shot only encounters] ON wo_Master_IM3_filter.enc_id = [wo_master_IM3_shot only encounters].enc_id;

I tried to use the <> and  != and both resulted in incorrect info or error message.  I am sure there is a way to do it. I just have a block right now
thank you
Patty
 

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar