I would create a min and max columns in that same table or in a separate "index" table, and parse the value in advance so that the min column has the 1 and the max column the 3, then you can issue a normal query against the two columns. For single values max=min. I am sure that there are ways to write stored procedures for doing this inline within a query, but each query would trigger a table scan and perform poorly. I would love to know if I am wrong, as this is an issue that I will also need to resolve. Marco
On Apr 24, 5:15 am, Andrew Volozhanin <linuxhead...@gmail.com> wrote: > Hello everyone. > > I'm having a problem with filtering SELECT results. > I've got a table with a column "capacity" which contains values like "1-3 > kW", "5 kW"..etc > And i've got some filter search with user text input which submit the needed > capacity. (let's say '2') > So, i need to be able to obtain first entry (with '1-3 kW') as a result of > user's submission '2'. > In other words, how can i explain to the filter function that user's number > '2' contains in '1-3' range from the table. > > PS I hope you'll understand what i'm trying to say.) -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.