Search Postgresql Archives

Re: Trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/25/20 12:01 AM, Sonam Sharma wrote:
I have a trigger, like many other triggers that fire after

update and checks a field of the OLD set. For some reason this trigger throw this error:

ERROR: record "old" has no field "ivo_sts_cd" CONTEXT: SQL statement

if exc_count = 0 then

UPDATE pps.T8071_CAI_IVO_HDR SET IVO_STS_CD = 1 where T616_VBU_NBR=old.T616_VBU_NBR and T617_FNC_TYP_CD=old.T617_FNC_TYP_CD and

T8071_CAI_IVO_ID=old.T8071_CAI_IVO_ID and T8071_ADD_DM= old. T8071_ADD_DM and old.ivo_sts_cd != 10 and old.ivo_sts_cd != 3;

Realized I went through the above to quickly. I do not see a SET, nor am I clear what table you are trying to UPDATE.


end if;

RETURN NEW;

END

$function$;


Can someone please help where I am missing ..


Thanks,

Sonam



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux