08-01-2015 10:20 AM
I'm trying to create a table that is limited to only the members I specify, but I'm getting all the members.
The members are here identified by their ctg_id_txt.
create table mems_a_&year as
a.ctg_id_txt as ctg
,b.npi_id as npi
from ACORS.core_attrbn_reslt_pmpm a, DATA.pvdr_roster b
where a.npi_txt = b.npi_id
and a.tax_id_txt = b.tin
and cntrct_typ_id in (331929496) /*MA PPO*/
and ctg_id_txt in (995999994922850,
and eligty_mo_yyyymm between &yearmo_beg and &yearmo_end
08-01-2015 11:35 AM
As I mentioned, I'm returning all members, not just the ones with the ctg_id_txt I specified. In exploring the matter further I think it is because the ctg_id_txt is a character datatype so, I think, I need to put the values in single quotes.