Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The proper syntax would be
PercentMap_2005:
Mapping LOAD
State,
Year2005GSP
Resident StateGDP_2005_2011
;
PercentMap_2006:
Mapping LOAD
State,
Year2006GSP
Resident StateGDP_2005_2011
;
Table2:
LOAD
State,
[2005],
[2006],
[2007],
[2008],
[2009],
[2010],
[2005]/ApplyMap('PercentMap_2005',State,0) as PercentOf2005GSP,
[2006]/ApplyMap('PercentMap_2006',State,0) as PercentOf2006GSP
Resident StateInvestment_2005_20011
;
Although, I think the data model would be better and you wouldn't have to maintain the script so much if you created one column with the value of year.
State | Year |
---|---|
CA | 2005 |
CA | 2006 |
NY | 2005 |
Karl
The proper syntax would be
PercentMap_2005:
Mapping LOAD
State,
Year2005GSP
Resident StateGDP_2005_2011
;
PercentMap_2006:
Mapping LOAD
State,
Year2006GSP
Resident StateGDP_2005_2011
;
Table2:
LOAD
State,
[2005],
[2006],
[2007],
[2008],
[2009],
[2010],
[2005]/ApplyMap('PercentMap_2005',State,0) as PercentOf2005GSP,
[2006]/ApplyMap('PercentMap_2006',State,0) as PercentOf2006GSP
Resident StateInvestment_2005_20011
;
Although, I think the data model would be better and you wouldn't have to maintain the script so much if you created one column with the value of year.
State | Year |
---|---|
CA | 2005 |
CA | 2006 |
NY | 2005 |
Karl
Thanks that worked.