From: superboy143 (sent by Nabble.com) <lists@nabble.com>
To: pgsql-sql@postgresql.org
Subject: query
Date: Tue, 7 Feb 2006 01:45:50 -0800 (PST)
Message-ID: <2798161.post@talk.nabble.com> (raw)
Hello,
I have a table in which I have a field with format like 100101. It has many values like 100101, 100102, 100103, 100201, 100202, 100301. I have to write a query such that I have to get only distinct values such that they contain only the substring I need. If I give 10 as substring, then it should return only 100101 or 100102 but not both i.e if the last two characters are not same it should not return both of them. It should return only values starting with 10 the middle two values should be distinct and the last two characters may be anything.
--
View this message in context: http://www.nabble.com/query-t1074932.html#a2798161
Sent from the PostgreSQL - sql forum at Nabble.com.
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: lists@nabble.com
Subject: Re: query
In-Reply-To: <2798161.post@talk.nabble.com>
* 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