Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 9 of 9 total |
Filtering in EDB Manager |
Wed, Nov 29 2017 2:09 PM | Permanent Link |
Richard Harding Wise Nutrition Coaching | I have never mastered Filtering in EDB Manager. Perhaps someone can explain why the following works the way it does?
Case Insensitive set to True No Partial Matches set to False Shrt_Desc='CHEESE,BLUE' | Records returned = 1 | Valid result Shrt_Desc='CHEESE*' | Records returned = 100 | Valid result Shrt_Desc='*CHEESE*' | Records returned = 0 | Incorrect Shrt_Desc='*HEESE*' | Records returned = 0 | Incorrect Richard |
Thu, Nov 30 2017 3:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Richard
I assume you're asking about the filter rows ability for a table. No real idea without investigating but I'd guess EDBManager simply applies the supplied filter to a dataset filter. With ElevateDB that means pretty much the same as an sql filter (eg exclude joins & subselects). So using = the * is a valid suffix wildcard but not a valid prefix one (think back to DOS if you're old enough) To get what you want try Shrt_Desc LIKE '%CHEESE%' You could look at EDBManager's code and see. Roy Lambert |
Thu, Nov 30 2017 6:25 AM | Permanent Link |
Richard Harding Wise Nutrition Coaching | <So using = the * is a valid suffix wildcard but not a valid prefix one (think back to DOS if you're old enough)>
Yep - I am old enough to remember DOS and CP/M. Windows version of DOS allows * at beginning of filenames. I usually use SQL to search for rows in EDB Manager. Sometimes it would be easier to use filtering - you can turn filtering on and off. In my Delphi programs I use the following filtering options. It saves customers from using wildcards. * Exact match * Partial match at beginning * Partial match anywhere which works fine. Richard |
Thu, Nov 30 2017 7:03 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Richard
><So using = the * is a valid suffix wildcard but not a valid prefix one (think back to DOS if you're old enough)> > >Yep - I am old enough to remember DOS and CP/M. Windows version of DOS allows * at beginning of filenames. Ooops. I must be older than you cos I'd forgotten that >I usually use SQL to search for rows in EDB Manager. Sometimes it would be easier to use filtering - you can turn filtering on and off. > >In my Delphi programs I use the following filtering options. It saves customers from using wildcards. >* Exact match >* Partial match at beginning >* Partial match anywhere > >which works fine. I wrote a query generator and they can choose equals starts with ends with contains string has all words has some words same reason as you, plus its stops them trying to write queries. Roy |
Fri, Dec 1 2017 5:57 AM | Permanent Link |
Adam Brett Orixa Systems | Richard
I filter pretty regularly in EDB Manager when doing quick and dirty checks. In your case I would use the "%" wildcard. This allows any number of characters of unknown text at the start or end of a filter. I also tend to include UPPER() around my filter, rather than using the "ignore case" tick-box, but I only do this as it means the resulting code can be pasted into a SQL window and work without being rewritten. UPPER(<FieldName>) LIKE '%<search phrase>%' |
Fri, Dec 1 2017 5:59 AM | Permanent Link |
Adam Brett Orixa Systems | ALSO: I just noticed you are using "=" rather than the LIKE statement.
I am pretty sure that "=" does not allow wild-card searching, i.e., it would search for exactly what you have written, rather than taking "*" or "%" as wild-cards. |
Mon, Dec 4 2017 10:11 AM | Permanent Link |
Richard Harding Wise Nutrition Coaching | <<I am pretty sure that "=" does not allow wild-card searching, i.e., it would search for exactly what you have written, rather than taking "*" or "%" as wild-cards.>>
Hi Adam, I did not realise that you could use LIKE operator in the filter, so that is a good thing to know. Using the filter <Shrt_Desc='CHEESE*'> which returns 100 rows, the same result as the filter <shrt_Desc LIKE 'cheese%'>. Filtering with an * works as a suffix, but not as a prefix or in the middle of a string. I did read the EDB manual before I wrote the post. It says: You can additionally use the asterisk (*) wildcard character with the equality operator (=) or inequality operator (<>) in order to perform partial-length comparisons. However, this only works when the foNoPartialCompare element is not included in the FilterOptions property. Also, the Delphi manual in "Setting the Filter Property", states that "* is the wildcard for partial comparisons". Richard |
Mon, Dec 4 2017 12:42 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Richard,
<< I have never mastered Filtering in EDB Manager. Perhaps someone can explain why the following works the way it does? >> The asterisk wildcards are only processed at the *end* of filter constants. You need to use LIKE in order to perform more complex wildcard searches. Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 4 2017 9:18 PM | Permanent Link |
Richard Harding Wise Nutrition Coaching | Thanks Tim, Adam and Roy.
That cleared up a little mystery. I thought it must be the case but I have not seen it documented. I did not realise that you could use LIKE in a filter until Adam pointed it out. Richard |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |