|
|
Merge data sets with Proc SQL or a data set
Hello
I am try to merge two data sets. I have used Proc SQL and tried to
merge them with merge statement when creating a new data set from the
two original data sets. I am trying to merge the sets by first name,
last name, and data of birth. One data set has about 400 observations
and the second data set has about 12000 observations. I trying to get
test scores from the 12000 observation into the 400 observation data
set. The 400 observation set has 3 variables and from the 12000 one I
am pulling about 4 variables. When using both Proc SQL and the merge
statement the 4 variables are moved to the 400 observation data set,
but the columns are empty. Any help or suggestions to solve this
problem would be great.
|
|
0
|
|
|
|
Reply
|
cwgmath1975 (9)
|
8/27/2010 11:01:32 PM |
|
On Aug 27, 4:01=A0pm, cwgmath <cwgmath1...@yahoo.com> wrote:
> Hello
>
> I am try to merge two data sets. =A0I have used Proc SQL and tried to
> merge them with merge statement when creating a new data set from the
> two original data sets. =A0I am trying to merge the sets by first name,
> last name, and data of birth. =A0One data set has about 400 observations
> and the second data set has about 12000 observations. =A0I trying to get
> test scores from the 12000 observation into the 400 observation data
> set. =A0The 400 observation set has 3 variables and from the 12000 one I
> am pulling about 4 variables. =A0When using both Proc SQL and the merge
> statement the 4 variables are moved to the 400 observation data set,
> but the columns are empty. =A0Any help or suggestions to solve this
> problem would be great.
I don't know of a merge statement with proc sql...
See this http://www.ats.ucla.edu/stat/sas/modules/merge.htm for a
merge with a data step.
Or this http://www.ats.ucla.edu/stat/sas/modules/sqlmerge.htm via PROC
SQL.
This site has some good tutorials in general if you're a sas newbie.
http://www.ats.ucla.edu/stat/sas/modules/
|
|
0
|
|
|
|
Reply
|
Reeza
|
8/27/2010 11:06:59 PM
|
|
The merge statement was used in a data step not in proc sql. Not a
newbie to sas, but will look at the web site.
On Aug 27, 6:06=A0pm, Reeza <fkhurs...@hotmail.com> wrote:
> On Aug 27, 4:01=A0pm, cwgmath <cwgmath1...@yahoo.com> wrote:
>
> > Hello
>
> > I am try to merge two data sets. =A0I have used Proc SQL and tried to
> > merge them with merge statement when creating a new data set from the
> > two original data sets. =A0I am trying to merge the sets by first name,
> > last name, and data of birth. =A0One data set has about 400 observation=
s
> > and the second data set has about 12000 observations. =A0I trying to ge=
t
> > test scores from the 12000 observation into the 400 observation data
> > set. =A0The 400 observation set has 3 variables and from the 12000 one =
I
> > am pulling about 4 variables. =A0When using both Proc SQL and the merge
> > statement the 4 variables are moved to the 400 observation data set,
> > but the columns are empty. =A0Any help or suggestions to solve this
> > problem would be great.
>
> I don't know of a merge statement with proc sql...
>
> See thishttp://www.ats.ucla.edu/stat/sas/modules/merge.htmfor a
> merge with a data step.
> Or thishttp://www.ats.ucla.edu/stat/sas/modules/sqlmerge.htmvia PROC
> SQL.
>
> This site has some good tutorials in general if you're a sas newbie.
>
> http://www.ats.ucla.edu/stat/sas/modules/
|
|
0
|
|
|
|
Reply
|
cwgmath
|
8/28/2010 6:20:40 PM
|
|
|
2 Replies
370 Views
(page loaded in 0.174 seconds)
|
|
|
|
|
|
|
|
|