Hi I need some help please
I have several custom fields in a table and want to retrieve the records that match maybe two or three or four of these customised fields.
I have written the query as follows:
SELECT T0.[ItemCode], T0.[ItemName], T0.[U_Brand], T0.[U_BrandOwn], T0.[U_Product], T0.[U_Olfactive1], T0.[U_Olfactive2], T0.[U_Olfactive3], T0.[U_Desc1], T0.[U_Desc2]
FROM OITM T0
WHERE T0.[U_Brand] = $[OQUT.U_Brand] or T0.[U_BrandOwn] = $[OQUT.U_BrandOwn] or T0.[U_Product] = $[OQUT.U_Product] or T0.[U_Olfactive1] = $[OQUT.U_Olfactive1] or T0.[U_Olfactive2] = $[OQUT.U_Olfactive2] or T0.[U_Olfactive3] = $[OQUT.U_Olfactive3]
This returns all items where U_Brand is amber also all records where U_Olifactive1 = Fruity, what I want is only the records that match Amber and are Fruity. The or statement is cusing the problem, if I use the and statement then I must select something from each customised field.
Can anyone help me please