Help using Base SAS procedures

Filtering a column while perfomimg merge for creating time series dataset

Reply
Contributor
Posts: 59

Filtering a column while perfomimg merge for creating time series dataset

Hi,

I have 27 different datasets for different months. My objective is to create a time series dataset such that I have data appnded on coloumns and not row wise. I have renamed same variables in these datasets with a time stamp such as

abc_0108 (Jan Dataset)
abc_0208 (Feb Datastet)
abc_0308 (March dataset)

What I am planning to use is

data a;
set b;
merge a b c;
by s;
run;

However there is a field called client which is present in all 27 dataset with the same name. This field takes 12 different values and my obejective is to perform merge on single values on client.

Can anyone suggest a way so that i can filter client while merge and in best possible fashion since I am dealing with data which is in millions.
Thanks
Super User
Posts: 5,256

Re: Filtering a column while perfomimg merge for creating time series dataset

Could you be more specific about your client column? Pls give some examples of your 12 different values (which I assume exist for each client?).

Without knowing these, I could only guess that you need to clean your client columns in prior to the merge.
/Linus
Data never sleeps
Contributor
Posts: 59

Re: Filtering a column while perfomimg merge for creating time series dataset

The client field will have 12 different values such as

Bigshoppe
Shopperee
Westcouper

Now if I want the merge to happen only for Bigshoppe, is there a way I can do that while performing the merge?

Thanks
Super User
Posts: 5,256

Re: Filtering a column while perfomimg merge for creating time series dataset

Just add a WHERE statement.

/Linus
Data never sleeps
Ask a Question
Discussion stats
  • 3 replies
  • 96 views
  • 0 likes
  • 2 in conversation