LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 30 Apr 2008 14:27:09 -0400
Reply-To:   Lizette Koehler <starsoul@mindspring.com>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Lizette Koehler <starsoul@MINDSPRING.COM>
Subject:   Best way to merge multiple datasets with Unlike Var Names
Content-Type:   text/plain; charset=UTF-8

I have two sas datasets that contain the same information but in different variable names. I am having one of those moments where I cannot see how to do this. Any help is appreciated.

Data DS1; INPUT A $ B $ C $ ; Cards ; Small Tike Red Med Bike Blue Large Bike Red ;;

Data DS2 ; INPUT X $ Y $ Z $ ; Cards ; Small 10.99 1yr Small 20.99 2yr Large 50.00 1yr ;;

Data AllDS ; Merge DS1 DS2 ; ( Need Var A Merged and Var X - The fields are alike but the variable name is different) ; By ? ;

Should come out

Small Tike RED 10.99 1yr Small Tike Blue 20.99 2yr Med Bike Blue Large 50.00 1yr

Thanks Lizette


Back to: Top of message | Previous page | Main SAS-L page