El día 8 de abril de 2009 12:43, Cesar Erices <[email protected]> escribió:
>
>
>> > cod_concepto character varying(6) NOT NULL, -- Código del concepto según
>>
>>
>> cod_concepto es integer, tenés que castearlo para que funcione el
>> substring.
>> substring(cod_concepto::text,offset,cantidad)
>
>
> Emanuel cod_concepto es character varying(6), creo que no es lo indicado
>
Tenés razón, gracias Cesar.
create table tabla1 (u character varying(6));
inserts...
ubuntu=# select substring(u,2,2) from tabla1;
substring
-----------
01
(...)
Funciona.
--
Emanuel Calvo Franco
Sumate al ARPUG !
(www.postgres-arg.org -
www.arpug.com.ar)
ArPUG / AOSUG Member
Postgresql Support & Admin
--
TIP 4: No hagas 'kill -9' a postmaster