0

table product, colunm record_no contains 11,112,3412,116,234,678

select distinct(record_no)
from product.

When i search a value 11 in the form, it returns 11,112,116 instead of only 11. How do i make it returns value 11 only? Thanks in advance

2
  • Your query has no search criteria so it is unclear what you are doing. Aug 8, 2020 at 12:58
  • Select * from product where record_no = search_number ... may be it can help you :)
    – rockstar
    Aug 8, 2020 at 13:03

2 Answers 2

2

Looks like an interactive report, not a form. Is it? If so, and if you used the "search" field, then - what it does - is to search rows for occurrence of the search term in all rows. Something like

select * 
from product
where record_no like '%11%'

and yes - it returns all those values (11, 112, 116).

If you want to find exactly 11, then go to "Actions" button and set a Filter where

  • record_no
  • is equal to
  • 11
0

SELECT DISTINCT(record_no) FROM product WHERE one_of_your_fields = 11

?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.