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

Manipulating Text Data Fields

Status
Not open for further replies.

bsagal

Technical User
Jul 17, 2003
35
CA
Hello,

I have 2 questions about manipulating text in data fields.

I have a field that contains records that are typical of the following:

FS32 T
NA5204 U
ZGT R

I wish to eliminate everything from after the first group of letters to the end, in other words i want

FS32
NA5204
ZGT

And my second question is how can i connect data from 2 fields and make them 1.

For example, if field 1 has

AZT3

and field 2 has

642

how can i get AZT3642?

Thanks for your help!
 
Use instr to strip off information after spaces:
left(FIELD,instr(FIELD," ")-1)

Use concatenation (& symbol )to join fields together:
FIELD1 & FIELD2

If you need a space or other character use quotes:
FIELD1 & " " & FIELD2
FIELD1 & "-" & FIELD2
 
Thanks very much brother, i appreciate your help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top