Xfm,0: Numeric string expected for returned value from funct
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 68
- Joined: Wed Jan 10, 2007 11:24 pm
Xfm,0: Numeric string expected for returned value from funct
When I used TrimLeadingTrailing function for any any nullable column like TrimLeadingTrailing(toXfm.Employee_discripion) I got the below message.
"Xfm,0: Numeric string expected for returned value from function call 'substring_1'. Use default value."
This is not a warning message but why I am getting this?
Or please tell me where I should use TrimLeadingTrailing.TrimF,TrimB,Trim functions ?
Most of the time when column is nullable this is my approach in transformer
If TrimLeadingTrailing(toXfm.Employee_discripion)='' Then SetNull() Else TrimLeadingTrailing(toXfm.Employee_discripion).
This ok for you or should I need to change.
Thanks.
[/b]
"Xfm,0: Numeric string expected for returned value from function call 'substring_1'. Use default value."
This is not a warning message but why I am getting this?
Or please tell me where I should use TrimLeadingTrailing.TrimF,TrimB,Trim functions ?
Most of the time when column is nullable this is my approach in transformer
If TrimLeadingTrailing(toXfm.Employee_discripion)='' Then SetNull() Else TrimLeadingTrailing(toXfm.Employee_discripion).
This ok for you or should I need to change.
Thanks.
[/b]
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Re: Xfm,0: Numeric string expected for returned value from f
this message comes when the value passed by you in transformer is not appropriateKshitij Rawat wrote:When I used TrimLeadingTrailing function for any any nullable column like TrimLeadingTrailing(toXfm.Employee_discripion) I got the below message.
"Xfm,0: Numeric string expected for returned value from function call 'substring_1'. Use default value."
This is not a warning message but why I am getting this?
Or please tell me where I should use TrimLeadingTrailing.TrimF,TrimB,Trim functions ?
Most of the time when column is nullable this is my approach in transformer
If TrimLeadingTrailing(toXfm.Employee_discripion)='' Then SetNull() Else TrimLeadingTrailing(toXfm.Employee_discripion).
This ok for you or should I need to change.
Thanks.
[/b]
e.g. in transformer if you try to pass empty character or space to a numeric field it will be replaced by 0 by default
this results in to the message you got
the best way is to perform a comparison between source and target
and analyze the values that are replaced by 0 for string its null.
i think this will resolve your problem
Regards,
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Participant
- Posts: 68
- Joined: Wed Jan 10, 2007 11:24 pm
Re: Xfm,0: Numeric string expected for returned value from f
But if i used Trim function definitely it will remove space or any unwanted value so why I am getting this message?
ETL DEVELOPER
Watch The Time Cycle, You Will Have All Answers.
Watch The Time Cycle, You Will Have All Answers.
Your problem is not in the trim() you posted. It is somewhere else where you are performing a numeric operation on a value that is not numeric.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 334
- Joined: Fri Dec 01, 2006 5:17 am
- Location: Texas
You can use ISNotNull() function in transformer....
So your code will be like this...
This will remove the message...
So your code will be like this...
Code: Select all
IF
IsNotNull(toXfm.Employee_discripion)
THEN
TrimLeadingTrailing(toXfm.Employee_discripion)
ELSE
SetNull()
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 68
- Joined: Wed Jan 10, 2007 11:24 pm