--On jeudi 19 septembre 2002 13:20 +0200 Thorbjörn Eriksson
<[EMAIL PROTECTED]> wrote:

> Hello,
> 
> I've encountered a strange behavior in postgres 7.2.1 regarding how psql
> handles strings ending with space characters.
> 
> If I want to search for records where the first column (artnrgrpmtrln_1)
> begins with
> '201901  ', our system that uses the database creates the following SQL
> statement:
> 
> select artnrgrpmtrln_1 from sr where (artnrgrpmtrln_1>='201901  ' and
> artnrgrpmtrln_1<='201901  ˙'

and why not 
select artnrgrpmtrln_1
from sr
where substr(artnrgrpmtrln_1, 0, 9) = '201901  '


-- 
Mathieu Arnold

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to