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!

Combining expressions in query 1

Status
Not open for further replies.

hefly

Technical User
Feb 6, 2008
134
0
0
US
I am trying to strip the first and last character off of a four character string in a query. The following two expressions work, but I would like to combine expr1 and expr2 into one expression in a query:


T1: Left([T0],Len([T0])-1)
T2: Right([T1],Len([T1])-1)

Thank you for your help.

Hefly

 
Among other ways:
Code:
xxx: Right(Left([T0],Len([T0])-1),Len([T0])-2)

If it is always four characters:
Code:
xxx: mid([T0], 2, 2)

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Thank you traingamer!!!

Is it possible to strip a leading Zero (stored as text) from a string?

Thanks again!

Hefly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top