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

Finding Text After the first Space in field 1

Status
Not open for further replies.

crzycrystlgrl

Technical User
Nov 6, 2004
20
US
hello all
CR 9 -- - SQL/ODBC

does anyone know of a why to have crystal recognize the first space in a text field?
I am trying to figure out a way to extract just the street name from an address field...and since the street numbers are anywhere from 1-6 char long...I am not sure where to start.
if there was some kind of "opposite" key for the val function?
thanks
Cynthia


 
Try this

Code:
if isnull({table.field}) then
    "No Street"
Else If Instr({table.field}," ")>0 then
    Mid({table.field},(Instr({table.field}," ")+1))
Else
   {table.field}

-LW

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top