StringToDecimal
Posted: Tue Sep 27, 2005 8:07 am
Hi All,
I am getting the below error while converting from string to decimal.
Case 1:
APT_CombinedOperatorController,1: A numeric string was expected, got " "; using Decimal, the default value.
String Data Type: Char[6]
Decimal Data Type: Decimal[11,2]
I am getting this warning only when there is blank in the Data, Also i am using setnull() if value is blank using below expr.
If (Len(Trim(Field_Name))=0) Then SetNull()
Else
StringToDecimal(Trim(Field_Name));
Also in another case i am using the same function there i am getting diffrent problem.
Case 2:
Source Data Type: Char[9] data looks like this +999.9999
Target data Type : Decimal[7,4]
Here also i am using same logic to set the blank values to null, But if blank is there i am getting it has 0 in the target.
Please do the needful.
Regards,
Madhu
Regards,
Madhu
I am getting the below error while converting from string to decimal.
Case 1:
APT_CombinedOperatorController,1: A numeric string was expected, got " "; using Decimal, the default value.
String Data Type: Char[6]
Decimal Data Type: Decimal[11,2]
I am getting this warning only when there is blank in the Data, Also i am using setnull() if value is blank using below expr.
If (Len(Trim(Field_Name))=0) Then SetNull()
Else
StringToDecimal(Trim(Field_Name));
Also in another case i am using the same function there i am getting diffrent problem.
Case 2:
Source Data Type: Char[9] data looks like this +999.9999
Target data Type : Decimal[7,4]
Here also i am using same logic to set the blank values to null, But if blank is there i am getting it has 0 in the target.
Please do the needful.
Regards,
Madhu
Regards,
Madhu