| Date: | Fri, 6 Aug 2004 10:23:10 -0400 |
| Reply-To: | Steve Raimi <steven.raimi@GM.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Steve Raimi <steven.raimi@GM.COM> |
| Subject: | Re: Question for merging 4 dataset |
|---|
>>Table Data
>>Country char(3)
>>ExRate Number
>>ExRateSource char(8)
>>IDCountry char(3)
>>
>>
>>
>>It will contains "country" where IDCountry matches with the first 3
>>char of ID field.
>>Any one can shed some light on SAS?
>>Thanks
>
Corrected code:
proc sql;
select m.ID,
m.Date,
s.Shares,
m.Price,
m.Currency,
m.Source,
m.Return,
m.Out_Shares,
v.Volume,
v.VolumeSource,
d.Country
d.ExRate
d.ExRateSource
from market m,
volume v,
shares s,
data d
where m.id=s.id and
m.date=s.date and
m.id=v.id and
m.date=v.date and
substr(m.id,13)=d.idcountry
;
quit;
|