From: Tony Capobianco <tcapobianco@prospectiv.com>
To: pgsql-sql@postgresql.org
Subject: compare table names
Date: Mon, 09 Jan 2012 11:12:18 -0500
Message-ID: <1326125538.1983.12.camel@tony1.localdomain> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tcapobianco@prospectiv.com
Subject: Re: compare table names
In-Reply-To: <1326125538.1983.12.camel@tony1.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox