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!

Converting String to Numeric 2

Status
Not open for further replies.

kscearce

IS-IT--Management
Jun 24, 2002
10
0
0
US
I reviewed a June 14 post on this site, that briefly explained how to change a text string to numeric values.

Either I didn't understand the brief explanation or I'm not entering the formula correctly in the right spot in my report.

I need to convert each record in my data from a string to a numeric value, so that I can manipulate the data for averages, etc. If someone could help out a rookie, I'd appreciate it.

Thanks! :0
 
Create a formula:

Menu: Insert->Formula->Field Object

Enter: val({YourTable.YourField})

Now you can use this field in all calculations in lieu of the string field in the database.

You can improve performance by using a SQL Expression if you're using an appropriate database and it's a concern.

-k kai@informeddatadecisions.com
 
I must need the Guide for dummies, because it's not accepting the String=Numeric.

Here's exactly what I'm typing into the formula box.

Val {View - Open by Issue Number.Open (Hours)}
String = Numeric

When I check the forumla, it gives me an error saying that the remaining text does not appear to be a part of the formula. I've tried putting in ( ) in a couple of spots to close off the formula, but I haven't done this type of work for about six years, and I'm VERY rusty. Thanks for your time and patience. Kathi
 
Thanks! That works, but now I'll have to figure out why the formula won't work in the report. The formula is correct, but I think it's a data problem. Really appreciate all your help.

Regards, Kathi
 
Sounds like you may have non-numeric data. You can test by using the IsNumeric (or NumericText) function:

if isnumeric({field}) then val({field}) else 99999


This will give you a big number "flag" if the data is not a number. Mike

 
That's a definite yes, but thanks for the tip on how to check other fields I've got in the DB Kathi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top