Skip to Content
0
Former Member
Jan 07, 2011 at 02:47 PM

Advanced item search

73 Views

Hello,

I created a query to find an article using a short code (we are using the field SWW for that). For example when entering a short code in a UDF this query finds, by using FMS, the corresponding item code.

SELECT T0.ItemCode FROM dbo.OITM T0
WHERE T0.SWW = $[QUT1.U_Vartcode] OR T0.CodeBars = $[QUT1.U_Vartcode] OR T0.U_PRX_KWrD LIKE $[QUT1.U_Vartcode]

The problem with this query is, that when there are two or more equal short codes, the first item in the database is selected. So is doesn't show me a list of items which contain this short code.

Is this possible? If yes, what would be the query.

The other thing is, that I have a field which contains keywords. I added this field to the query as well. As there can be many keywords (e.g. phone can also be cellphone, telephone etc.) I used the LIKE formula, but is doesn't work.

What do I have to alter to get this part working. It also should give me a list of items when the keyword is the same for more then one item.

Maybe this is more a SDK solution. If so, please let me know.

Tim