From: Kiran <kumar.m.kiran@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Best Fit SQL query statement
Date: Mon, 06 Aug 2007 01:57:07 -0700
Message-ID: <1186390627.045596.148460@j4g2000prf.googlegroups.com> (raw)
All,
Could anyone help me in writing Best Fit SQL statement.
Suppose we have table t1 with coloumn t1 (text) with following rows.
98456
98457
9845
9846
984
985
98
99
and if I query on 98456 the result must be 98456,
However if I query on 98455 the result must be 9845
and If I query 9849 the result must be 984
Regards,
Kiran
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: kumar.m.kiran@gmail.com
Subject: Re: Best Fit SQL query statement
In-Reply-To: <1186390627.045596.148460@j4g2000prf.googlegroups.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