BookmarkSubscribeRSS Feed
acemanhattan
Quartz | Level 8

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.

proc sql;

       create table mems_a_&year as

       select distinct

       a.ctg_id_txt as ctg

      ,b.npi_id as npi

       ,b.tin

       ,b.tin_nm

       ,b.tin_nm_rllp

       ,a.eligty_mo_yyyymm

       ,b.clm_sys_pvdr_id

       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,

       995999995203792,

       999499993122771,

       999499993127895)

       and eligty_mo_yyyymm between &yearmo_beg and &yearmo_end

;quit;

3 REPLIES 3
Reeza
Super User

What isn't working?

acemanhattan
Quartz | Level 8

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.

Reeza
Super User

Yes, if it's a character it needs to be quoted, single or double.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 955 views
  • 0 likes
  • 2 in conversation