Hi,
Please help in converting a source field of datatype NVarchar(120) Nullable to target field of decimal(120) Not Nullable using a modify stage.
Thank you.
Modify Stage - Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What warnings are these?
Do you have a NOWARN specification in your Modify stage? (These are really about nullability warnings, so I doubt that they'd be legitimate here.)
Is there any reason you can't use NVarChar(8) as the input data type - possibly derived upstream using a substring operation?
Do you have a NOWARN specification in your Modify stage? (These are really about nullability warnings, so I doubt that they'd be legitimate here.)
Is there any reason you can't use NVarChar(8) as the input data type - possibly derived upstream using a substring operation?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
The warnings are telling you your code is not robust. You are converting NVARCHAR to decimal - what happens to non numerics in that field? You are converting nullable to NOT NULL which means you will lose rows if a null is encountered. I would convert this in a Transformer instead with a NullToValue followed by a Decimal check followed by the conversion and a reject link for those rows that do not work. Transformer will let you do validation in a stage variable and nested conversion in a cell.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: