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!

ToNumber({?Parameter}) not allowed ? 1

Status
Not open for further replies.

mulema

Technical User
Nov 16, 2002
32
US
Hi all,
My database field "Invoice_No" is a string (Varchar2 ).
I want to convert this string to number.

My Select Expert formula is :
{Table.Invoice_no} = {Invoice#}

How can I correctly use the TONUMBER function here?
I tried using {Table.Invoice_no} = TONUMBER({Invoice#}), also TONUMBER({Table.Invoice_no}) = TONUMBER({Invoice#})
but got the error " A string is required here"

What am I doing wrong?

Thanks,
Mulema.
 
hi

try

tonumber({your field})
then you will be able to pass it as a number

pg
 
Create formula
@TONumberInvoice

tonumber({InvoiceNumber})

 
Pg,
Thanks for the quick fix.

Mulema.
 
*************
I tried using {Table.Invoice_no} = TONUMBER({Invoice#}), also TONUMBER({Table.Invoice_no}) = TONUMBER({Invoice#})
*************

In the first case...you cannot assign a value to a database field....and in the second case...your field{Table.Invoice_no} is probably a numeric field so ToNumber won't work on it since it needs a string

I assume {Invoice#} is your string parameter(shud be written {?Invoice#} so we can easily recognize that)



Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top