Re: [sqlalchemy] Re: "Select like" but the other way around

2011-11-07 Thread Michael Bayer
On Nov 7, 2011, at 9:16 AM, Paul wrote: > Michael Bayer zzzcomputing.com> writes: >> >> sure it does, if you convert it to a SQL token first: >> >> literal("C:\test\testfile.txt").like(Table.path + "%") >> >> or even >> >> literal("C:\test\testfile.txt").startswith(Table.path) > > Thanks fo

[sqlalchemy] Re: "Select like" but the other way around

2011-11-07 Thread Paul
Michael Bayer zzzcomputing.com> writes: > > sure it does, if you convert it to a SQL token first: > > literal("C:\test\testfile.txt").like(Table.path + "%") > > or even > > literal("C:\test\testfile.txt").startswith(Table.path) Thanks for the quick reply! One more quick question, how would I

[sqlalchemy] Re: SELECT LIKE

2007-04-13 Thread King Simon-NFHD78
Disrupt07 wrote > > @Simon > Thanks. But what is ? Is it SQLAlchemy or pure SQL? > It is a Query object, as described here: http://www.sqlalchemy.org/docs/datamapping.html If you haven't read them yet, I'd recommend working through a tutorial - I found this one really helpful: http://ww

[sqlalchemy] Re: SELECT LIKE

2007-04-13 Thread Disrupt07
@Simon Thanks. But what is ? Is it SQLAlchemy or pure SQL? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group,

[sqlalchemy] Re: SELECT LIKE

2007-04-13 Thread King Simon-NFHD78
Disrupt07 wrote: > > I have a table storing users' info. > table: userinfo > columns: name, surname, age, location, ... > > I need to query this table using SQLAlchemy's ORM methods (e.g. > select(), select_by(), get_by()). The query should be like >SELECT * FROM userinfo WHERE name LIKE 'B