Like Operation in TableIO

badda_bing

Well Known Member
Hello all,

I'm using the like operation within a Table IO Select on a business view within Find Button Clicked within an application. However when I view the SQL generated I can see no use of the like clause??? Can anybody tell me what I should be expecting ie wildcards at one or both ends of the string? and maybe why I am seeing neither? The SQL that is generated is as follows;

SELECT T0.MCDL01, T0.MCSY, T0.MCRT, T0.MCKY, T1.DRSY, T1.DRRT, T1.DRKY, T1.DRDL01, T1.DRDL02
FROM PS_DEV.TESTDTA.F5590001 T0,PS_DEV.TESTCTL.F0005 T1
WHERE ( T0.MCRT = '26' AND T0.MCSY = '01' AND T1.DRDL01 = 'CLEANING' ) AND ( T0.MCRT=T1.DRRT AND T0.MCKY=T1.DRKY )
ORDER BY T0.MCDL01 ASC,T0.MCSY ASC,T0.MCRT ASC,T0.MCKY ASC

A couple of things;
1) The field that I have used the like operation on is T1.DRDL01. T0.MCRT and T0.MCSY are displaying as expected ie I have used a simple = operation.
2) Just for clarification, this is a select on a business view, not a table - this seems to cause a separate bug in that the Alias, Description and Table Name columns are not populated within the IO dialog box but this not much more than an inconvenience - especially when a field exists on both tables!
3) The business view joins two tables in two different data sources ie Custom table in Business Data and F0005 in Control Tables.


TIA

Paul



8.11 (8.94.L1) Win2003 SQL2000
 
Hi Paul

The 'like' operation only works when the parameter you pass in contains a leading and/or trailing percentage sign. In other words you need to create your own like-string. Eg if you want to find a description containing the word 'Clean', you need to define a new variable (szLikeDsc1_DL01) and assign it the value '%Clean%'. This is the parameter you pass on in your fetch/select command whilst using the like (~) parameter.

Hope this helps
 
Thanks very much, works great. Don't know why I didn't think of that!
 
Trust me, you are not the first one to 'fall for this trap'. Once again one of those poorly documented JDE features/quirkies
 
Hi Sef,

Is there a way to do a LIKE search on a grid? I've tried several methods, but it seems that there is just no support for LIKE search:

1. Filtering on a field does not support LIKE operation
2. The System Function to Set Selection on a grid also does not support a LIKE operation.

Is there another way? All we are trying to accomplish is to perform a LIKE search on a couple of descriptions fields on a form.

Thank you for your help!

Will.
 
Back
Top