| Date: | Fri, 6 Aug 2004 07:13:24 -0700 |
| Reply-To: | vickey <vickey_d@REDIFFMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | vickey <vickey_d@REDIFFMAIL.COM> |
| Organization: | http://groups.google.com |
| Subject: | Re: Question for merging 4 dataset |
| Content-Type: | text/plain; charset=ISO-8859-1 |
HI Bryan!
I can give the idea, you can merge first two table(1 & 2) by common
variables date and the id, then merge this new table with the third
table with the same common variable.
Now in order to merge fourth table with this table u need to have a
common variable and as As IDCountry matches with the first 3 char of
ID field, we will generate the IDCountry variable in the first table
by useing substr function on the variable id, use the first 3 letters
and this variable will be common in both the tables. Now merge 4th
table with the merge table of first 3 tables.
Problem solve.
(1) Table Market
ID char(8)
Date Date
Price Number
Currency Char(3)
Source Char(8)
Return Number
Out_Shares Number
(2)Table Shares:
ID char(8)
Date Date
Shares Number
(3)Table Volume
ID char(8)
Date Date
Volume Number
VolumeSource Char(8)
(4)Table Data
Country char(3)
ExRate Number
ExRateSource char(8)
IDCountry char(3)
|