HI,
i have source varchar2(20) like HS2002156817161-1 AND MY TARGET IS
Number(20)(fk) it should be 2002156817161-1 how can i do ir and my target is fk is that conversation possible. pl advise.
Thanks,
Bobby
substring from varchar to number (fk)
Moderators: chulett, rschirm, roy
The whole point is to get down to something that will load into a numeric field. That makes the 'right' conversion MCN in this particular case because the dash would need to come out. Note that the DIGITS transform (which would make it a little more obvious what is going on) uses the OConv function with MCN.
I don't think the issue is so much the how as it is the what. Bobby needs to explain what an "fk" (foreign key reference) has to do with his question. You can't create a foreign key relationship using only part of a field, so unless his source isn't directly involved in the fk relationship, I don't see how it will work. If it will work for his situation, then at least he's got several means to his ends now.
I don't think the issue is so much the how as it is the what. Bobby needs to explain what an "fk" (foreign key reference) has to do with his question. You can't create a foreign key relationship using only part of a field, so unless his source isn't directly involved in the fk relationship, I don't see how it will work. If it will work for his situation, then at least he's got several means to his ends now.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers