Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have these two tables:
Table1:
Table2:
I want to replace all of the YearEvents and YearEventKey_Grouping with their corresponding key... so for example replace all 2009 WTS with a 1. all 2011 WTS with a 2... etc.
Thanks!
I'm not sure I understand your problem exactly, but if you want to make the YearEventKey_Grouping go from
2009 Submission-2010 Submission to 12-13, then this is how you can do it.
YearEventIDMap:
mapping load
YearEvent,
id
From Table2; //If this table is in memory, then you should use Resident Table2; in stead of From.
Table1:
load
mapsubstring('YearEventIDMap',YearEventKey_Grouping) as YearEventKey_Grouping,
Volume,
ProductA,
ProductB
From Table1; //need to replace this line with the source for table 1.
Hope this helps
Regards
SKG
I'm not sure I understand your problem exactly, but if you want to make the YearEventKey_Grouping go from
2009 Submission-2010 Submission to 12-13, then this is how you can do it.
YearEventIDMap:
mapping load
YearEvent,
id
From Table2; //If this table is in memory, then you should use Resident Table2; in stead of From.
Table1:
load
mapsubstring('YearEventIDMap',YearEventKey_Grouping) as YearEventKey_Grouping,
Volume,
ProductA,
ProductB
From Table1; //need to replace this line with the source for table 1.
Hope this helps
Regards
SKG
Perfect. Thank you