Re: duda con trigger....

From: Emanuel Calvo Franco <postgres(dot)arg(at)gmail(dot)com>
To: Cesar Erices <caerices(at)gmail(dot)com>
Cc: Virginia <mavir78(at)gmail(dot)com>, Ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: duda con trigger....
Date: 2009-04-08 15:56:00
Message-ID: f205bb120904080856j3fcca98avdcc2f120bdfe90b0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

El día 8 de abril de 2009 12:43, Cesar Erices <caerices(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Cesar Erices 2009-04-08 16:00:48 Re: duda con trigger....
Previous Message Cesar Erices 2009-04-08 15:43:05 Re: duda con trigger....