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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to convert text to numbers

Status
Not open for further replies.

crumpm

Technical User
Mar 29, 2010
31
GB
Progress database with Crystal Reports 2008


I have a table where the key indexes are stored as text instead of numbers (which they are in every other table in the DB)

I need an SQL expression to speed up the conversion as the report often fails when there are a large number of transactions.

e.g transaction.client_number (text)

which I need to link to file.client_number (number)

I'm trying to use {fn CONVERT("transaction"."clinet_number"), xxxx}

but I don't know what to put for xxx and can't find a list anywhere.

Thanks


 

Try:

{fn CONVERT("transaction"."client_number",sql_varchar)}

-LB
 
I have not used Progress but I read somehere that syntax was similar to Oracle, in which case it would be

to_number(transaction.Client_number)

Ian
 
Sorry, I thought you were converting in the other direction. Try:

{fn CONVERT("transaction"."client_number",sql_integer)}

I don't have access to Oracle right now so couldn't test this though.

-LB
 
Thanks, I will try the integer as I think is what I'm looking for.

 
Great, that did the trick. Thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top