• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: smart LIKE?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smart LIKE?


  • Subject: Re: smart LIKE?
  • From: Ray Kiddy <email@hidden>
  • Date: Wed, 04 Feb 2015 11:15:07 -0800

On Wed, 04 Feb 2015 08:22:21 +0100
OC <email@hidden> wrote:

> Hello there,
>
> I've just bumped into a need to fetch based on a textual qualifier
> which I can't create. My records in one column contain tab-separated
> pairs of tags and text, like in
>
> "foo:foo value<TAB>bar:blahblah<TAB>bax:this is the value of bax"
>
> I need to fetch the rows whose value of given tag contains a string.
>
> If it were "begins with", the solution would be a simple LIKE, but
> with "contains", the problem is that e.g., "LIKE '%fooºx'" would
> select the sample row above, although the value for 'foo' is 'foo
> value' and does not contain 'bax' at all.
>
> Is there some trick to do this at fetch with some smart qualifier (in
> FrontBase)? Or is there no better approach than to fetch all "LIKE
> '%fooºx'" rows, and filter them further in memory e.g., using a
> regexp?
>
> Thanks a lot,
> OC
>

A few ideas.

MySQL has a regexp function that you can use in searches. Does
FrontBase also? If it is not too difficult to set up a qualifier using
that, it may work.

Also, it occurs to me that when I have had this problem, I sometimes
change the string to:

:foo:foo value<TAB>bar:blahblah<TAB>bax:this is the value of bax:

The the regexp becomes simpler. There are no edge cases for the first
and last key-value pair.

It is too bad you cannot break those tags up into a table for the tags
themselves. That would make it all much easier.

- ray
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >smart LIKE? (From: OC <email@hidden>)

  • Prev by Date: Re: ERD2WQueryDateRange ignores formatter??
  • Next by Date: Re: limiting popupbutton list with a fetchSpec
  • Previous by thread: smart LIKE?
  • Next by thread: Is there a D2W input length limiting component?
  • Index(es):
    • Date
    • Thread