There are 5 tables:
1. Year05d: 5 variables + 2 keys: zip naics
2. Year06d: 5 variables + 2 keys: zip naics
3. Year05t: 3 variables + key: zip
4. Year06t 3 variables + key: zip
5. look-up table: 2 variables: naics sic
I need one table that is unique at zip+naics level and contains all observations and all the variables from all 5 tables.
With data step the logic was as following:
1. merge Year05d Year06d by zip naics
2. merge Year05t Year06t by zip
3. merge step1 and step2
4. merge step3 and look-up table by naics
how do i do that with sql in one step?
... View more