Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtash-0006UL-R6 for pgsql-admin@arkaria.postgresql.org; Tue, 12 Feb 2019 16:26:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtasg-0003tL-IU for pgsql-admin@arkaria.postgresql.org; Tue, 12 Feb 2019 16:25:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtasf-0003oq-Hu for pgsql-admin@lists.postgresql.org; Tue, 12 Feb 2019 16:25:58 +0000 Received: from sonic304-11.consmr.mail.bf2.yahoo.com ([74.6.128.34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtasc-00056T-9q for pgsql-admin@lists.postgresql.org; Tue, 12 Feb 2019 16:25:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1549988752; bh=ipan2o5P8CWPeOaoRmlie8dDd1+KNS3IbQjobaCKlAM=; h=Date:From:Reply-To:To:Cc:Subject:References:From:Subject; b=SjPO/jYaZFlzeTA+FYEygWdNgJRn15llC3oRcfY5NJRaPm/mf5g/SQ1FeEewiAdh2b7HNaxducN3ItPC51BFzHWB6Yqpz8tmV4tqaB7XspEiIwkMcQTJqu+LKTvnixQEeI1fkJz9nasbKyfJ9i4x7cw77M2sfVGjMkALHUHaHFAp1bm9zT6Qa73C5J9BM0PDOgkKqfSnkTkD2JzWT5Mb7ofMB7vXrSTJ5URf1otDo+9klJFqgg/K2A/IVomhx59BXhh4EWpoEFlxERE1u8ZH6mFwu0X6c7tv9RvSFUXKvv4RrQYp36BQWwQ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.xAWp5V0CeBa2mjpEnp2q3._rdsfx gGRvWOf9A9d9S5hnd9UJ3VRWsOkFIZ8HTE5OZMYqhs_SA7LJxffuFeuyTWamuzNiESYg- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Tue, 12 Feb 2019 16:25:52 +0000 Date: Tue, 12 Feb 2019 16:25:48 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: "David G. Johnston" Cc: Pgsql-admin Message-ID: <1990155251.2422933.1549988748913@mail.yahoo.com> Subject: Re: insert data with invalid input syntax for integer:"42P01" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2422932_1118950482.1549988748910" References: <1990155251.2422933.1549988748913.ref@mail.yahoo.com> X-Mailer: WebService/1.1.13027 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Content-Length: 17958 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2422932_1118950482.1549988748910 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I just test out to remove " E' " to see it work because in the near future = the syntax convert the data insert into Postgres will be without " E' " I gave exact code converted from Oracle via Ora2pg without changing any.=C2= =A0 I just worked around to change the data type to see it work unfortunate= ly, it didn't work :( .=C2=A0 The insert is working with function but as so= on as I put the trigger in, I get an error.=C2=A0=C2=A0 the original from Oracle is: CREATE OR REPLACE EDITIONABLE TRIGGER "CIDR_STAGING"."TR_STG_ADJUDICATIVE_S= TATUS_INS"before inserton cidr_staging.stg_Adjudicative_Statusreferencing n= ew as new old as oldfor each rowdeclare=C2=A0 =C2=A0v_seq=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 number :=3D0;=C2=A0 =C2=A0v_ErrorCode=C2=A0 =C2=A0= =C2=A0 number;=C2=A0 =C2=A0v_ErrorMsg=C2=A0 =C2=A0 =C2=A0 varchar2(512);= =C2=A0 =C2=A0v_Module=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0varchar2(32) :=3D 'T= R_STG_ADJUDICATIVE_STATUS_INS';begin=C2=A0 =C2=A0select sq_staging.nextval = into v_seq from dual;=C2=A0 =C2=A0----=C2=A0 =C2=A0-- this is used to contr= ol the insert process into the database=C2=A0 =C2=A0----=C2=A0 =C2=A0if :ne= w.mig_seq is null then=C2=A0 =C2=A0 =C2=A0 :new.mig_seq :=3D v_seq;=C2=A0 = =C2=A0end if; =C2=A0 =C2=A0----=C2=A0 =C2=A0-- This just ensures that the filename is not= null=C2=A0 =C2=A0----=C2=A0 =C2=A0if :new.mig_filename is null then=C2=A0 = =C2=A0 =C2=A0 :new.mig_filename :=3D 'Unknown';=C2=A0 =C2=A0end if; ------ Exception error handler----exception=C2=A0 =C2=A0when others then=C2= =A0 =C2=A0 =C2=A0 v_ErrorCode :=3D SQLCODE;=C2=A0 =C2=A0 =C2=A0 v_ErrorMsg= =C2=A0 :=3D SQLERRM; =C2=A0 =C2=A0 =C2=A0 insert into cidrmgmt.errorlog(=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0tstamp, os_user,host,module,errorcode,errormsg)=C2=A0 =C2=A0 =C2= =A0 values=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(systimestamp, sys_context('use= renv','session_user'),=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys_context('useren= v','host'), v_Module, v_ErrorCode, v_ErrorMsg );end;/ALTER TRIGGER "CIDR_ST= AGING"."TR_STG_ADJUDICATIVE_STATUS_INS" ENABLE; v/r,=C2=A0 Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success=20 On Monday, February 11, 2019 4:29 PM, David G. Johnston wrote: =20 On Mon, Feb 11, 2019 at 2:02 PM Pepe TD Vo wrote: > the script was transferred/decoded from Oracle objects via Ora2pg.=C2=A0 =