Ryan Mahoney wrote:
> 
> Is it possible to select rows from a field based on the length of the data
> in a varchar field?

length works fine in a select on a varchar field.
        select a from b where length(a)=5;
You didn't ask for this, did you?

Grabbing different columns depending on values of another another column
can be done with "case":

select
        case
                when length(col_var)<5 then col_a
                when length(col_var)>5 then col_b
                else col_5
        end
from
        tbl
;

With kind regards / Mit freundlichem Gruß
    Holger Klawitter
--
Holger Klawitter
[EMAIL PROTECTED]                             http://www.klawitter.de


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to