Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String is Non- Numeric

Status
Not open for further replies.

jonav

Programmer
Nov 14, 2011
69
US
Hi,

Tried with the search and didn;t found a solution and posting the code to see if someone can help me out.

Below is the code I'm trying and it is a string.I'm getting a String is Non-numeric error.
Pls advice

if isnull({ZGCB_M01_ZBOBJ_ZGCB_M01_QFIN_ANLSIS1_V7.[0FISCYEAR]-[20FISCYEAR]}) or
then
0
else
tonumber(ToText({ZGCB_M01_ZBOBJ_ZGCB_M01_QFIN_ANLSIS1_V7.[0FISCYEAR]-[20FISCYEAR]}[4 to 7])
 
In addition to the null check, you will want to do an isnumeric check:

if isnull({ZGCB_M01_ZBOBJ_ZGCB_M01_QFIN_ANLSIS1_V7.[0FISCYEAR]-[20FISCYEAR]}) or not (isnumeric({ZGCB_M01_ZBOBJ_ZGCB_M01_QFIN_ANLSIS1_V7.[0FISCYEAR]-[20FISCYEAR]}))

then
0
else
tonumber(ToText({ZGCB_M01_ZBOBJ_ZGCB_M01_QFIN_ANLSIS1_V7.[0FISCYEAR]-[20FISCYEAR]}[4 to 7])


-jcrawford-

Not in word only, but in deed also... 1Jn3:18
 
Thank you Crawford,

Still facing the issue.

Somehow managed it with Mid function.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top