• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

WW and "LIKE" in Data Selections

ssolberg

VIP Member
WW and \"LIKE\" in Data Selections

I swear I've done this before but now I can't seem to get it to work and hoping someone can verify for me. In my example, I am looking for any part # that ends in a "C". The selection would therefore be LIKE '%C' to accomplish this but it doesn't find anything. I used the LIKE operand using '%C%' (anything with a C in the field) as well as 'C%' (anything that starts with a C) and it find tons of stuff correctly. Yes, I am positive I have parts that end in a "C"... I am sure I have done this on (possibly) prior cumes of World and there is a SAR (3495766) that sort of touches on the LIKE operand but that is something fixed in cume 12. Can someone verify if '%something' works in some other cume level other than 11? Use your favorite file and field, it shouldn't matter...

Programmer/Developer/Anything-They-Give-Me
World A7.3 11 (quite stable and usually happy)
Attempting CO with Xe, AS/400, SP14.2 V4R5 (not happy)
 

jgbrich

Member
RE: WW and \"LIKE\" in Data Selections

This works for us in cum 8. '%C %'

Leave a space after the c and remember it is case sensitive.
 

scott_parker

Reputable Poster
RE: WW and \"LIKE\" in Data Selections

I use the Like operand A LOT and it works just fine.

JDE Version 8.1.2

Scott Parker
Grote Industries, LLC
mailto:scott.parker@grote.com





Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 

CatD

Active Member
RE: WW and \"LIKE\" in Data Selections

I tried using like '%o' for alpha name in address book and it works fine.
Are you sure you have a 'C' in the last position of the field?
 

ssolberg

VIP Member
Re: RE: WW and \"LIKE\" in Data Selections

Thanks for the work around. Yes, putting an extra space after my C and the % at the end allowed me to get what I wanted. JDE claims it works fine for them so stuck in a odd spot here... Thanks for the posts. If anyone DOES find it not working for them, I would still be interested.

Programmer/Developer/Anything-They-Give-Me
World A7.3 11 (quite stable and usually happy)
Attempting CO with Xe, AS/400, SP14.2 V4R5 (not happy)
 

dkahn

Active Member
Re: RE: WW and \"LIKE\" in Data Selections

Sannan, it’s working as specified. Ending your search string with a 'C' means that the last position of the part number field has also to be a 'C': the last position of the field, not the last position of the part number.

Specifying LIKE '%C %' indicates you want part numbers that have the string 'C ' anywhere in them. Because your part numbers do not have embedded blanks you are effectively now asking for part numbers that end in 'C' but are shorter than the field that contains them. If your part numbers are always shorter than the field this is fine, but if they can fill the field you will need to search for numbers that are LIKE '%C %' OR LIKE '%C'.


Dave Kahn (World A7.3 cum 10)
=========
 

ssolberg

VIP Member
Re: RE: WW and \"LIKE\" in Data Selections

Thanks for the refresher! It's amazing what your mind will "misplace" when you need it the most. It makes perfect sense that it works that way and can't believe I didn't notice before. My previous use was probably with a fixed length field and the character WAS at the end of the field... Or as Homer Simpson would say... "Dohhh!"

Programmer/Developer/Anything-They-Give-Me
World A7.3 11 (quite stable and usually happy)
Attempting CO with Xe, AS/400, SP14.2 V4R5 (not happy)
 
Top