X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 961868BA1B0 for ; Mon, 31 Jan 2005 19:01:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35950-09 for ; Mon, 31 Jan 2005 19:01:20 +0000 (GMT) Received: from rs25s3.datacenter.cha.cantv.net (rs25s3.datacenter.cha.cantv.net [200.44.33.4]) by svr1.postgresql.org (Postfix) with ESMTP id D20BD8BA0E5 for ; Mon, 31 Jan 2005 18:59:40 +0000 (GMT) Received: from tgusta2 (dC9F37969.dslam-14-24-3-06-01-02.fsl.dsl.cantv.net [201.243.121.105]) by rs25s3.datacenter.cha.cantv.net (8.13.0/8.13.0/3.0) with SMTP id j0VIxLqF019438 for ; Mon, 31 Jan 2005 14:59:26 -0400 X-Matched-Lists: [] Message-ID: <009901c507c7$01d882e0$1400a8c0@tgusta2> Reply-To: "Ing. Jhon Carrillo" From: "Ing. Jhon Carrillo" To: Subject: error in function!! Date: Mon, 31 Jan 2005 14:59:12 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0096_01C507A5.6CE19AD0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: ClamAV 0.80/682/Mon Jan 24 14:53:43 2005 clamav-milter version 0.80j on rs25s3.datacenter.cha.cantv.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200502/12 X-Sequence-Number: 20123 This is a multi-part message in MIME format. ------=_NextPart_000_0096_01C507A5.6CE19AD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi,=20 i have a problem with the following sentence: CREATE OR REPLACE FUNCTION tschema.sp_actualizar_contacto(p_idpers text, p_nombre text, p_apellido = text, p_titulo text, p_fecnac text, p_codedociv = integer,=20 p_sexo = text,=20 p_codpais = integer, p_pw text,=20 p_empr text,=20 p_cargo text, = =20 p_pwempr text, p_aniv text, =20 p_prof text,=20 p_trab text,=20 p_fecgen text, = =20 p_fecing text, p_fuente text, p_codupload = integer, cli_codigo = integer ) RETURNS text as ' DECLARE c_codigo integer; c_sinc varchar; c_idpers ALIAS for $1; c_nombre ALIAS for $2; c_apellido ALIAS for $3; c_titulo ALIAS for $4; c_fecnac ALIAS for $5; c_codedociv ALIAS for $6; c_sexo ALIAS for $7; c_codpais ALIAS for $8; c_pw ALIAS for $9; c_empr ALIAS for $10; c_cargo ALIAS for $11; c_pwempr ALIAS for $12; c_aniv ALIAS for $13; c_prof ALIAS for $14; c_trab ALIAS for $15; c_fecgen ALIAS for $16; c_fecing ALIAS for $17; c_fuente ALIAS for $18; c_codupload ALIAS for $19; cli_Codigo ALIAS for $20; BEGIN select nextval(''seq_tbu_contacto_cont_codigo'') into c_codigo; Insert into tbu_contacto (cont_codigo, = cont_idpers,cont_nombre,cont_apellido,cont_titulo,cont_fecnac,cont_codedo= civ,cont_sexo,cont_codpais,cont_pw,cont_empr,cont_cargo,cont_pwempr,cont_= aniv,cont_prof,cont_trab,cont_fecgen,cont_fecing,cont_fuente,cont_sinc,co= nt_codupload) values = (c_codigo,c_idpers,c_nombre,c_apellido,c_titulo,to_timestamp(c_fecnac,''Y= YYY-mm-dd = HH:MM:SS''),c_codedociv,c_sexo,1,c_pw,c_empr,c_cargo,c_pwempr,c_aniv,c_pr= of,c_trab,to_timestamp(c_fecgen,''YYYY-mm-dd = HH:MM:SS''),to_timestamp(CURRENT_TIMESTAMP,''YYYY-mm-dd HH:MM:SS'') = ,c_fuente,''S'',c_codupload); =20 return ''OK:''||c_codigo;=20 END; ' LANGUAGE 'plpgsql' this is the error in pgadmin III on windows (postgresql 8.0): ERROR: function tschema.sp_actualizar_contacto(integer, "unknown", = "unknown", "unknown", "unknown", "unknown", "unknown", integer, = "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", = "unknown", "unknown", "unknown", "unknown", "unknown", integer, integer) = does not exist HINT: No function matches the given name and argument types. You may = need to add explicit type casts. I need to know if the "insert sentence" was sucesfull, how do i do? help me with this please, thanks!! ------=_NextPart_000_0096_01C507A5.6CE19AD0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
i have a problem  with the = following=20 sentence:
 
 
CREATE OR REPLACE FUNCTION=20 tschema.sp_actualizar_contacto(p_idpers=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_nombre=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_apellido=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_titulo=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_fecnac=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_codedociv integer,=20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_sexo       text,=20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_codpais   =20 integer,
          &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;          =20 p_pw text,=20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_empr text,=20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_cargo  text, =20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_pwempr=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_aniv text, =20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_prof text,=20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_trab  text,=20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_fecgen text, =20
           &nb= sp;           &nbs= p;            = ;            =          =20 p_fecing=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_fuente=20 text,
          &nbs= p;            = ;            =             &= nbsp;         =20 p_codupload=20 integer,
          &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;          =20 cli_codigo integer ) RETURNS text as '
 
DECLARE
  =20 c_codigo        =20 integer;
  =20 c_sinc          =20 varchar;
  =20 c_idpers         ALIAS for=20 $1;
   = c_nombre        =20 ALIAS for $2;
   = c_apellido      =20 ALIAS for $3;
  =20 c_titulo         ALIAS for=20 $4;
   = c_fecnac        =20 ALIAS for $5;
   c_codedociv      = ALIAS=20 for $6;
  =20 c_sexo           ALIAS = for=20 $7;
   c_codpais        = ALIAS=20 for $8;
  =20 c_pw           &nb= sp;=20 ALIAS for $9;
  =20 c_empr           ALIAS = for=20 $10;
  =20 c_cargo          ALIAS for=20 $11;
   = c_pwempr        =20 ALIAS for $12;
  =20 c_aniv           ALIAS = for=20 $13;
  =20 c_prof           ALIAS = for=20 $14;
  =20 c_trab           ALIAS = for=20 $15;
   = c_fecgen        =20 ALIAS for $16;
  =20 c_fecing         ALIAS for=20 $17;
   = c_fuente        =20 ALIAS for $18;
   c_codupload      = ALIAS=20 for $19;
   cli_Codigo       = ALIAS=20 for $20;
BEGIN
   select =20 nextval(''seq_tbu_contacto_cont_codigo'')  into =20 c_codigo;

   Insert  into  tbu_contacto  = (cont_codigo,=20 cont_idpers,cont_nombre,cont_apellido,cont_titulo,cont_fecnac,cont_codedo= civ,cont_sexo,cont_codpais,cont_pw,cont_empr,cont_cargo,cont_pwempr,cont_= aniv,cont_prof,cont_trab,cont_fecgen,cont_fecing,cont_fuente,cont_sinc,co= nt_codupload)=20 values=20 (c_codigo,c_idpers,c_nombre,c_apellido,c_titulo,to_timestamp(c_fecnac,''Y= YYY-mm-dd=20 HH:MM:SS''),c_codedociv,c_sexo,1,c_pw,c_empr,c_cargo,c_pwempr,c_aniv,c_pr= of,c_trab,to_timestamp(c_fecgen,''YYYY-mm-dd=20 HH:MM:SS''),to_timestamp(CURRENT_TIMESTAMP,''YYYY-mm-dd HH:MM:SS'')=20 ,c_fuente,''S'',c_codupload);       &n= bsp;  =20
   return ''OK:''||c_codigo;
END;
' LANGUAGE 'plpgsql'
 
 
this is the error in pgadmin = III on windows=20 (postgresql 8.0):
 
ERROR:  function=20 tschema.sp_actualizar_contacto(integer, "unknown", "unknown", "unknown", = "unknown", "unknown", "unknown", integer, "unknown", "unknown", = "unknown",=20 "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", = "unknown",=20 "unknown", integer, integer) does not exist
HINT:  No function = matches=20 the given name and argument types. You may need to add explicit type=20 casts.
 
 
I need to know if the "insert sentence" = was=20 sucesfull, how do i do?
 
 
help me with this please,
 
thanks!!
------=_NextPart_000_0096_01C507A5.6CE19AD0--