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

Selecting partial data in a string... Please Help!! 2

Status
Not open for further replies.

malk

MIS
Dec 12, 2000
84
US
I have a string "xxx12345", and I want the Conditional Select Statement to pick up just the 4'th character thru the 5'th character for a comparison. In other words i am looking to Select based on the "12" in my string. Can this be done in the Selct Expert in CR 8? If yes, How?
 
You can use the "Mid" function starting with the 4th character and for a length of 2-basically this is just substringing the string or you can use the "Like Pattern" (under the "Operators", "Pattern") "???12???". Hope this helps!
 
My preference is to use the subscripting operator which would look like this:


{fieldname} [ 4 to 5 ]


You tell it where to start and where to stop in the string. It assumes that the characters are in the same numeric position in every record. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top