"Rocco Castino" <[EMAIL PROTECTED]> writes: > I would like, for example, to get the records starting from row number 6 > (without, of course, working with the primary key, where the numbers could > not necessarily be sorted as here): > +------------+------------+-------+-----------+ > | id_example | x_uno | x_due | x_desc | > +------------+------------+-------+-----------+ > | 6 | 2004-01-02 | 3 | aaaaa | > | 7 | 2004-01-02 | 4 | aaaa | > | 8 | 2004-01-03 | 2 | 0 | > | 9 | 2004-01-03 | 5 | qqqq | > +------------+------------+-------+-----------+ > In fact, a select with the following syntax: > SELECT * FROM `example` where x_uno>=20040102 and x_due >= 3 ORDER BY x_uno > ASC, x_due ASC > does not return me row number 8 (as it is 2<3 on column x_due).
Another solution is a concatenation of the x_uno and x_due columns, something like: SELECT * FROM example where concat(x_uno,x_due) >= '200401023' If x_due is an integer that can be more than 1 digit in length, then you may need to be more creative in your concatenation. You might even do something like SELECT * FROM example where (100*x_uno + x_due) >= 2004010203 which will work only for values of x_due less than 100. - seb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]