Data Conversion [message #411001] |
Wed, 01 July 2009 08:18 |
aarti81
Messages: 235 Registered: December 2007 Location: USA
|
Senior Member |
|
|
Hi All,
In a mapping how can i convert the data, for example , i have a field 'CITY_CATEGORY" with values 1000,2000,3000,4000,5000,6000. My question is how can i convert them to :
1000 CITYA
2000 CITYB
3000 CITYC
4000 CITYD
5000 CITYE
6000 CITYF
Instead of the 1000,2000,3000,4000,5000,6000 i have to load the cities names into the target table, please any help will be great.
Thanks
|
|
|
Re: Data Conversion [message #411246 is a reply to message #411001] |
Thu, 02 July 2009 13:51 |
nandan.shahane
Messages: 3 Registered: July 2009
|
Junior Member |
|
|
Hi,
You can use a Enumeration table. See the example attached.. These kinda static tables are quite useful and offer minimum impact in case of database/code changes..
Once the table (& data) is in place, you can use the KEY LOOKUP functionality to look up the values 1000, 2000... and extract the actual City Names.. This will also help in extracting any other such cases you have..
Another way is to hardcode the values in an EXPRESSION.. In a CASE Statement.. Though this is something NOT recommended..
Hope this helps..
Nandan
|
|
|
|