gadfly and SQL-LIKE

Discussion in 'Python' started by Patrick W. Fraley, Sep 3, 2003.

  1. Hi Everybuddy,

    I am having a little problem I can not find a solution for.

    I am trying to use the SQL-LIKE statement in gadfly. After googling
    around I found out that it is not supported, and that on is supposed to
    use a regular expression. All great, but there is nowhere a reference
    to be found on how to do this. No examples, no nothing, just the
    comment to use regular expressions.

    Could someone here point me into the right direction?

    TIA
    Patrick W. Fraley
     
    Patrick W. Fraley, Sep 3, 2003
    #1
    1. Advertising

  2. "Patrick W. Fraley" <> wrote in message news:<>...
    > Hi Everybuddy,
    >
    > I am having a little problem I can not find a solution for.
    >
    > I am trying to use the SQL-LIKE statement in gadfly. After googling
    > around I found out that it is not supported, and that on is supposed to
    > use a regular expression. All great, but there is nowhere a reference
    > to be found on how to do this. No examples, no nothing, just the
    > comment to use regular expressions.
    >


    As it currently stands what you need to do is evaluate the query
    using gadfly, pull the query out into "normal" python, and then use
    a python loop and string operations (such as regular expressions) to
    choose the results you want (and throw out the others).

    This will work for analogues of simple positive queries such as

    select a,b
    from t
    where c like '%this%'

    but may not for fancy queries involving "not in" and so forth -- which
    would require a proper implementation of "like" in gadfly. Sorry.

    Probably the "right" way to fix this is to allow the importation of an
    arbitrary function into gadfly from python, which wouldn't be too hard
    but isn't trivial.
    -- Aaron Watters

    ps: my copy of MSAccess doesn't support "like" properly either, fwiw...

    ===
    to do is to be -- Sartre
    to be is to do -- Marx
    do be do be do -- Sinatra
     
    Aaron Watters, Sep 3, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Istvan Albert

    gadfly gfplus error

    Istvan Albert, Sep 8, 2003, in forum: Python
    Replies:
    0
    Views:
    425
    Istvan Albert
    Sep 8, 2003
  2. Brian O. Bush

    Gadfly DB in python standard library?

    Brian O. Bush, Nov 14, 2003, in forum: Python
    Replies:
    4
    Views:
    327
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=
    Nov 16, 2003
  3. R.Marquez
    Replies:
    3
    Views:
    345
    R.Marquez
    Dec 8, 2003
  4. Ian Pellew

    Gadfly Q

    Ian Pellew, Feb 20, 2004, in forum: Python
    Replies:
    1
    Views:
    408
    Ross M Karchner
    Feb 20, 2004
  5. Fuzzyman

    Gadfly ????

    Fuzzyman, Mar 4, 2004, in forum: Python
    Replies:
    4
    Views:
    507
    Frithiof Andreas Jensen
    Mar 5, 2004
Loading...

Share This Page