It permits escaping of the wild LIKE characters _ and %. Say, for example, I have this column data: 1 larry_one 2 larry_two 3 larrysmall 4 larrybig 5 larry_small 6 larry_big
SELECT my_name FROM names WHERE my_name LIKE 'larry_%' would return all the rows; but using SELECT my_name FROM names WHERE my_name LIKE 'larry\_%' ESCAPE '\' see: http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0000751.htm would return not return rows 3 and 4 On 4/4/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > what is ESCAPE used for exactly (i.e. whats it going to do to that > \ ?) ? what DB is this ? can this same functionality be achieved via > bind parameters ? > > > On Apr 4, 2007, at 10:30 AM, Paul Kippes wrote: > > > > > Currently sqlalchemy doesn't support a query like this: > > > > SELECT my_name FROM names WHERE my_name LIKE 'larry\_%' ESCAPE '\' > > > > Could such a feature be added to be used in a similar way to the LIMIT > > feature? It looks like a simple enough patch for me to do. But I > > don't have knowledge of the array of databases necessary. > > > > Thanks, > > Paul > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---