During development a useful couple of lines of code are, assuming you've been through your repeat for each col_name loop to create your query with it's many OR conditions:
put tQuery into tTemp replace comma with cr in tTemp replace " OR " with cr & " OR " in tTemp --replace " AND " with cr & " AND " in tTemp -- if appropriate put tTemp into fld "tempDisplay" -- or MSG What this does is takes your single very long line query: SELECT 1Col,2Col,3Col,4Col,...,xCol FROM table WHERE (1Col LIKE '%or%' OR 2Col LIKE '&or%' OR 3Col LIKE '%or%' OR 4Col LIKE '%or%' OR ... LIKE '%or%' OR xCol LIKE '%or%') and makes it easier to debug the important bits: SELECT 1Col 2Col 3Col 4Col ... xCol FROM table WHERE (1Col LIKE '%or%' OR 2Col LIKE '&or%' OR 3Col LIKE '%or%' OR 4Col LIKE '%or%' OR ... LIKE '%or%' OR xCol LIKE '%or%') All the column names should be all lined up so it makes tracking down spelling or formatting errors so much easier. HTH _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode