Jump to content

Exact search question

filter types decimal float double real search

  • Please log in to reply
1 reply to this topic

#1 judge



  • Members
  • Pip
  • 4 posts

Posted 23 March 2016 - 11:12 AM


I have some questions about searching. It looks like the code is hard-wired to perform 'like' searches rather than exact matches. This gives some counter-intuitive results when the column being searched is a number where, in my opinion, people are more likely to want to be able to perform an exact match e.g. 'show me all accounts where the balance is 0'.

So I was wondering how I would start looking at implementing such a feature, possibly by allowing the user to enter a search term into the search box, such as '< 0' or '> 0 and < 100'?

Which brings me to another question. When I search on a column displaying floating point numbers it seems to be treating those columns like text. For example, a database column containing a decimal number might be formatted in the table like 0.0000. When I search on that column it still performs a 'like' search, so if I enter 0, it will return any row where that column contains a zero anywhere, e.g. 4.3210 will be returned as well as 0.0000. Where is this number-to-text conversion taking place such that a 'like' search will actually work?

So finally one more question. If I delve into the source code I see various different field types, but none of them relate to real numbers. In fact the only numeric type is Integer. So how are real numbers treated?

#2 aflewel1



  • Members
  • Pip
  • 3 posts

Posted 21 November 2019 - 10:03 PM

Judge, did you find an answer to this?  I had the same question too.

Also tagged with one or more of these keywords: filter, types, decimal, float, double, real, search

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users