BookmarkSubscribeRSS Feed
Chandra6
Calcite | Level 5
Proc sql ;
create table CIR_TRV_BUREAU _&MISDATE._6 AS
SELECT A. *, B. PHASE1_2_ELIGIBLE
FROM ABC.CIR_TRV AS à
Left join(select distinct crn, 1 as phase1_2 eligible from abc. Bureau) as b on a. Crn_n=b.crn; quit;
Regina
2 REPLIES 2
ballardw
Super User

Run proc contents on BOTH data sets and compare the variable type. In one the variable will be character in the other numeric.

If Crn_n has the _n to indicate a numeric version then I might guess that Crn in B is character.

Join on variables have to be the same type.

 

Note that your code as posted:

FROM ABC.CIR_TRV AS à

with the accent over the a is also likely to be invalid syntax.

 


@Chandra6 wrote:
Proc sql ;
create table CIR_TRV_BUREAU _&MISDATE._6 AS
SELECT A. *, B. PHASE1_2_ELIGIBLE
FROM ABC.CIR_TRV AS à
Left join(select distinct crn, 1 as phase1_2 eligible from abc. Bureau) as b on a. Crn_n=b.crn; quit;
Regina

 

PaigeMiller
Diamond | Level 26

Show us the ENTIRE log for this PROC SQL, not just the error messages.

--
Paige Miller

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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