Hi All,
The input is string ( the format is in within double quote "2006") and i need an output in integer( example: 2006).
How can we do it in Datastage Designer?
Please do help me to solve this....
Thanks and regards
Subbu
String to Integer
Moderators: chulett, rschirm, roy
Re: String to Integer
subbuvp wrote:Hi All,
The input is string ( the format is in within double quote "2006") and i need an output in integer( example: 2006).
How can we do it in Datastage Designer?
Please do help me to solve this....
Thanks and regards
Subbu
Use basic functions, (check in transformer) to strip the quotes and then use stringtoDecimal fucntion
DSGuru79
Re: String to Integer
First use Trim function to remove leading and trailing spaces and then apply String To Decimal function.
HI
-
- Participant
- Posts: 34
- Joined: Fri Sep 22, 2006 10:59 pm
- Location: India
Subbu,
What is your source, If it is Sequential file set the Field Default-->Quote as Double. Then Datastage only takes the data only within quotes(2006).
To convert the string in to Integer, you can use the function "AsInteger".
This function treats the given input as integer.
Hope this will help you.
What is your source, If it is Sequential file set the Field Default-->Quote as Double. Then Datastage only takes the data only within quotes(2006).
To convert the string in to Integer, you can use the function "AsInteger".
This function treats the given input as integer.
Hope this will help you.
Regards,
Balaji.
Balaji.