DATA Step, Macro, Functions and more

Merge

Reply
Occasional Contributor
Posts: 15

Merge

Hi,

I have two datasets namely A and B.
A has 400 columns in which only column number 18 is not filled(Blank).
B has 400 columns in which only column number 18 and Key (column 1) is filled and remaining all are missing(numeric) or blank(Char) based on the data type.

Now I want new dataset as follow:

If match on key between A and B: I want all columns of A with columns number 18 having value of dataset B.

If exist in B and not A then I want all records in B.(Meaning columns1 and columns 18 filled and remaining missing or blank).

Please let me know how can I do this. Thanks.
Respected Advisor
Posts: 3,777

Re: Merge

You want to use

[pre] UPDATE A B; BY ID; [/pre]
N/A
Posts: 0

Re: Merge

you can use dataset merge. keep column1 and column18 from datasetB in merge step.

GL.
Ask a Question
Discussion stats
  • 2 replies
  • 118 views
  • 0 likes
  • 3 in conversation