Hi,
I tried the below syntax for converting decimal to string using modify stage.
Source column:CUST_ID/decimal/38/Key column
Modify stage Derivation:CUST_ID:string[2]=string_from_decimal[suppress_zero](CUST_ID)
Target column: CUST_ID/varchar/1
I am getting the below warning:
Error when checking operator:
When binding output schema variable "outRec": When binding output interface field "CUST_ID" to field "CUST_ID": Conversion from source type "decimal [38, 0]" to result type "string [2]": Not enough room in string for decimal [38, 0].
How can I convert using modify stage from decimal to string (38 to 2)?
Any help greatly appreciated.
Thanks and Regards,
Suri
mod stage
Moderators: chulett, rschirm, roy
How can you convert a number such as 537276302 into a string with a maximum length of 2 characters?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Then put it into a string of length 40 so the conversion cannot cause an error, and use strnig truncation to copy that into a length 2 column.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>