Range of caracters - Mailing list pgsql-sql

From Wilton Wonrath
Subject Range of caracters
Date
Msg-id 603019.54350.qm@web34314.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Range of caracters  (Ragnar <gnari@hive.is>)
List pgsql-sql
Hello,

I have a doubt about a query using a range of caracters. Example:

    Data Table

Inicial                              -------------  Final
9C2HB02107R008000                         9C2HB02107R008200           
FAIXA1                                                FAIXA100

I´m doing the following query:

SELECT recallfxchassi.* FROM recallfxchassi
LEFT JOIN recall ON recallfxchassi.idrecall = recall.id WHERE
('FAIXA2' BETWEEN chassiinicial AND chassifinal);

This is not returning anything. I believe that is because it´s check´s caracter by caracter and 2 is bigger than 1. But in a real situation  I will need that return something (FAIXA2 is between FAIXA1 and FAIXA100).

Does anyone knows if exists some way or command in PostgreSQL that could solve this "problem" ?

Thanks.

Alertas do Yahoo! Mail em seu celular. Saiba mais.

pgsql-sql by date:

Previous
From: Ranieri Mazili
Date:
Subject: Restricting columns by users
Next
From: Michael Eshom
Date:
Subject: Adding NOT NULL columns in PostgreSQL 7.4?