Selasa, 31 Maret 2015

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

 

Thank you,
I gave it a shot, it ran but it keeps hanging when I try to determine the number of patients it returns
this is how I have it in my system, did I forget to delete a space or something? it should be returning 35475 rows of data.  the larger file (wo_master_IM3_filter) works fine and I can see the 36511 patients and the count at the bottom.
thank you so much for your help

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]);

Patty



---In MS_Access_Professionals@yahoogroups.com, <wrmosca@...> wrote :

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@...> 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: pattykf@cox.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar