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!

Need something like an "endswith"

Status
Not open for further replies.

tyrahat

Technical User
Apr 23, 2003
9
0
0
US
I need something like an "endswith" (opposite of "startswith") to parse out list names with a "z" or "Z" at the end, hopefully under Record Selection.

My lists (for example)

Ln11p
ln11p (yes lower case "L" on this one)
Lq11z
lq11Z
x111w4
s223zq


I want to be able to pull the lists ends with with "z" or "Z". I have tried doing like statements with wildcards but no dice, I can't get them to work.

Thanks for the help!!
 
what version of crystal are you using? and what type of db?
 
have you used

right({myfield},1) in ('Z','z')

?

Probably won't be very fast, unless you have another condition preceeding this which will cut down on having to parse every value in the table.
 
Yes, tried that and then copy/pasted yours and getting the same error, it doesn't like the IN statement, keeps stating that an ")" is missing. I've tried every combination of a range and the RIGHT and still can't get it to show.

I'm ok with the processing time, I usually don't have that many lists that I need to use this for, maybe a total of 20 or so, but I need it to appear on a report by itself, so manually doing it isn't going to cut it.

I'm feeling pretty stupid at this point....

Thanks

Tyra
 
WHOO HOOO!! Just got it, needed the [] not () around my range data.

Thanks a bunch fo the quick reply!!
 
Oh, yeah! I always get those confused; sorry I didn't warn you! Glad it worked :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top