From: Wilton Wonrath <wrwonrath@yahoo.com.br>
To: pgsql-sql@postgresql.org
Subject: Range of caracters
Date: Tue, 7 Aug 2007 10:07:42 -0700 (PDT)
Message-ID: <603019.54350.qm@web34314.mail.mud.yahoo.com> (raw)
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 em http://br.mobile.yahoo.com/mailalertas/
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: wrwonrath@yahoo.com.br
Subject: Re: Range of caracters
In-Reply-To: <603019.54350.qm@web34314.mail.mud.yahoo.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