I have these 3 tables: tablename -------------------- tmp_staging0109 tmp_staging1229 tmp_staging0108
I'd like this query: select tablename from pg_tables where tablename like 'tmp_staging%' and tablename < 'tmp_staging1230'; To return this result: tablename -------------------- tmp_staging1229 However, I'm receiving: tablename -------------------- tmp_staging0109 tmp_staging1229 tmp_staging0108 How can I write this correctly? Thanks. Tony -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql