concadinate one string with numaric
Moderators: chulett, rschirm, roy
concadinate one string with numaric
Hi,
I have one quick question, I want to genarate sequence of numbers for example PART1,PART2.... USING key genarate next value.
How can I add the the string PART , to the numaric number .
Please suggest me, Thanks in advance...
we are using 7.1 server
Regards
Deva
I have one quick question, I want to genarate sequence of numbers for example PART1,PART2.... USING key genarate next value.
How can I add the the string PART , to the numaric number .
Please suggest me, Thanks in advance...
we are using 7.1 server
Regards
Deva
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
concadinating string with numaric
Hi,paddu wrote:concatenate them as below in the transformer .
"PART":KeyMgtGetNextValue('ID').
Thanks for your reply. I need some other information on this. If I want query on this key column, how can I do that?
let say If I need rage of values between PART10 AND PART30, how to get those rage of values, because of the concadination result is stored as string.
can you advise on this please. Thanks in advance..
Deva,
I truly did not follow your requirement.
Where did you store the result of the concatenation at first place(PART1,PART2....) ???
Is this result set source to another logic ? Where are you trying to achieve range of values between PART10 and PART30.
Please give some details of how and what should your result set look like.
If you want certain range of values only to be loaded in your target or fetch from the source , you can use tranformer constraint to restrict the data or simple use oracle between function in the oracle stage.
As Dsguru2B suggested you can substring the value and give compare condition to get specific range of values.
I truly did not follow your requirement.
Where did you store the result of the concatenation at first place(PART1,PART2....) ???
Is this result set source to another logic ? Where are you trying to achieve range of values between PART10 and PART30.
Please give some details of how and what should your result set look like.
If you want certain range of values only to be loaded in your target or fetch from the source , you can use tranformer constraint to restrict the data or simple use oracle between function in the oracle stage.
As Dsguru2B suggested you can substring the value and give compare condition to get specific range of values.
concadinating sting with numaric
Hi,
Thanks for your reply, My question is, I need to genarate sequence of numbers. The formate of the number is 'PART1'.
The columbn datatype is varchar.
I can concadinate the "PART:KEY GENARATE NEXT VALUE"
If I did as above , it is loaded as string. If I want query on this column I can't.
My requirement is I want query this column result as like numaric.
Thanks In advance...
Thanks for your reply, My question is, I need to genarate sequence of numbers. The formate of the number is 'PART1'.
The columbn datatype is varchar.
I can concadinate the "PART:KEY GENARATE NEXT VALUE"
If I did as above , it is loaded as string. If I want query on this column I can't.
My requirement is I want query this column result as like numaric.
Thanks In advance...
paddu wrote:Deva,
I truly did not follow your requirement.
Where did you store the result of the concatenation at first place(PART1,PART2....) ???
Is this result set source to another logic ? Where are you trying to achieve range of values between PART10 and PART30.
Please give some details of how and what should your result set look like.
If you want certain range of values only to be loaded in your target or fetch from the source , you can use tranformer constraint to restrict the data or simple use oracle between function in the oracle stage.
As Dsguru2B suggested you can substring the value and give compare condition to get specific range of values.
Not possible. You have to choose.
If you want it as PART1, PART2 ...., then it needs to be stored as a varchar and you need to substring the numeric part for numeric range queries.
Or create another column in your target, that holds just the numeric part.
You cannot get into water and demand not to get wet.
If you want it as PART1, PART2 ...., then it needs to be stored as a varchar and you need to substring the numeric part for numeric range queries.
Or create another column in your target, that holds just the numeric part.
You cannot get into water and demand not to get wet.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.