BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Gil_
Quartz | Level 8
I have 2 data sets thst are same one has historical data and the one is daily
Table a
Code. Date. Dollar. Recommend
123. 03/212018. 1. 500
123. 03/21/2018. 2. 300
123. 03/21/2018. 100. 200

Table b
Dnd. date.max Dollar. Max Amt max
123. 01/01/2018. 1. 600
123. 12/01/2017. 2. 500


What I need the tables to merge Ive data step set thst merges but the dollar amt doesn't match max dollar
It only matches dnd to dnd.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@Gil_ wrote:


What I need the tables to merge Ive data step set thst merges but the dollar amt doesn't match max dollar
It only matches dnd to dnd.


Show the code you attempted and the actual desired result for your example data.

 

I suspect that your dates play some role in the attempted merge but you will have to state what that would be.

View solution in original post

6 REPLIES 6
Reeza
Super User

What are you expecting as output?

ballardw
Super User

@Gil_ wrote:


What I need the tables to merge Ive data step set thst merges but the dollar amt doesn't match max dollar
It only matches dnd to dnd.


Show the code you attempted and the actual desired result for your example data.

 

I suspect that your dates play some role in the attempted merge but you will have to state what that would be.

Gil_
Quartz | Level 8
Here how I want data merge
Code. Date. Dollar. Reco dnd mdate. Dol amt
123. 03/212018. 1. 500. 123 01/01/2018. 1. 600
123. 03/21/2018. 2. 300 123 12/01/2018 2. 500
123. 03/21/2018. 100. 200
LinusH
Tourmaline | Level 20
And the code tried...?
Data never sleeps
Gil_
Quartz | Level 8
I tried
Data tablec;
Merge tablea tableb;
By dnd;
Run;
Gil_
Quartz | Level 8
Did sort by dnd b4

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1717 views
  • 0 likes
  • 4 in conversation