Column bind in SAS

Column bind in SAS is accomplished using merge keyword, Merge Keyword followed by the table names to be column bind is specified which column binds the multiple table in SAS.  Lets see an example on column bind in SAS.

  • column Bind in SAS – Merge keyword
  • column bind multiple tables in SAS

Column Bind Example:

Column Bind in SAS 0a

We will be using EMP_DET and SAL_2020 table

EMP_DET:

Column Bind in SAS 1

SAL_2020:

Column Bind in SAS 2

 

Column Bind in SAS – Merge


/* Method 1 column bind - merge */ 

data EMP_DET_fin; 
merge EMP_DET SAL_DET; 
run; 

In this method we will use datastep procedures to column bind two tables. MERGE keyword takes two tables namely EMP_DET and SAL_2020 and column binds them together and named as EMP_DET_FIN as shown below.

Column Bind in SAS 3

 

                                                                                                 

Author

  • Sridhar Venkatachalam

    With close to 10 years on Experience in data science and machine learning Have extensively worked on programming languages like R, Python (Pandas), SAS, Pyspark.