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

Convert text to number

Status
Not open for further replies.

MicroZealous

IS-IT--Management
Joined
Dec 5, 2003
Messages
56
Location
US
We use Key 4 to define "employee size". Some imported records have numbers that are stored as text. We want to convert these strings to number format and populate another user defined field. How can this be done within GM, or if not, with an external SQL query?

GMPE 8.03.80716
SQL Server 8.03.80716

Thanks, Mike Roselius
 
Use the global replace wizard to update the numeric field with a dbase expression like val(contact1->key4)

Keep in mind that values like "BIG!" or "10-25" in key4 will cause the process to fail. Use a filter to limit the records affected by the wizard to make sure you don't run into that sort of thing.

Doug Castell
Castell Computers
 
Actually:

val([BIG!]) returns 0
val([10-25]) returns 10

I don't see any problem with doing your Global Replace.

DJ Hunt
Phone: (978)2-3333
WebSite:
- The Hacker's Guide to GoldMine Premium
- One-on-One GoldMine Technical Support ( Fee Based )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top