[Info-ingres] E_OP0897 Consistency Check?
Martin Bowes
martin.bowes at ndph.ox.ac.uk
Tue May 15 13:14:56 UTC 2018
Hi Adrian,
My first guess would be something like...
create procedure incrementprvcnt(
INOUT provcnt integer2 not null not default
)
as
begin
provcnt=2;
end;
create rule proccntpatch
before insert into driving_lic_cat referencing new as newcat
where newcat.dlc_audit_us = 'DRIVERWS' and newcat.dly_prov_cnt = 1
for each row execute procedure incrementprvcnt(provcnt = newcat.dly_prov_cnt)
If that doesn't work send me your table structure and I'll see what I can do.
Marty
From: Adrian Williamson [mailto:adrian.williamson at rationalcommerce.com]
Sent: 15 May 2018 14:06
To: info-ingres at lists.planetingres.org
Subject: [Info-ingres] E_OP0897 Consistency Check?
Hi,
My goto database ape (DBA) is off driving around Spain at the moment so I was hoping someone could shed some light on how I managed to get this lovely response after I created a rule fired procedure and then provoked it with an insert statement:
E_OP0897 Consistency Check: a query tree constant or resdom node uses a
source/destination type.
(Tue May 15 13:54:25 2018)
I've not written too many rules in the past, and the trouble is it was in the past. So I fully expect this to be user error somewhere.
This is syntax which I got the database to agree to:
create or replace procedure IncrementPrvCnt(provcnt = i2 not null) as begin provcnt = 2 ;end;\g
create rule PrvCntPatch before insert into driving_lic_cat referencing new as newcat
where newcat.dlc_audit_us = 'DRIVERWS' and newcat.dly_prov_cnt = 1
for each row execute procedure IncrementPrvCnt(provcnt = byref(newcat.dly_prov_cnt));
What have I done wrong?
i.e. could someone translate the error message into something useful?
Cheers
Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20180515/0c9bc103/attachment.html>
More information about the Info-ingres
mailing list