BookmarkSubscribeRSS Feed
saikiran_nemani
Obsidian | Level 7
I have a query and we need to join and none of the columns are present (unique)

How can we join?
4 REPLIES 4
ballardw
Super User

Example of input data sets and what the result of the join should look like.

 

Sometimes data step Merge is appropriate instead of SQL join if the existing order of the two sets is important.

saikiran_nemani
Obsidian | Level 7
We have to add a variable called Contractor from WMIS dataset to the existing query and on which join we can perform ?
ballardw
Super User

@saikiran_nemani wrote:
We have to add a variable called Contractor from WMIS dataset to the existing query and on which join we can perform ?

Provide example data of the input data sets as data step. An Example:

data example;
   input x $ y z;
datalines;
abc  123 456
pdq  987.3  333
;
run;

Then a similar step to show what the result should be for the two small example input data sets.

 

That way we know 1) what the variable names and types are, 2) which data set they come from, 3) order of the data which may be critical if there are no columns to actually "join on".

LinusH
Tourmaline | Level 20
@saikiran_nemani you leave too little information to let us give you usable feedback.
Provide the input sample data and desired output.
Data never sleeps

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 4 replies
  • 1001 views
  • 0 likes
  • 3 in conversation