Thank you for your reply, Lester.
I came across CTE during my research, but wasn't sure it was the right thing
for this case. Looked more detailed into it and came up with this:
with TOTAL_STOCKS as (
select PRODUCTID,
STORAGE_AREA_ID_SOURCE,
sum(AMOUNT) as TOTAL_STOCK
from
Greetings,
I've the following table:
CREATE TABLE STOCK_RECORDS
(
ID INTEGER NOT NULL,
LOCATION SMALLINT,
INSERTUSER SMALLINT DEFAULT 0,
<-- FOREIGN KEY
Greetins all,
I'm dealing with a customer database (FB 2.5.2), which seems to be missing
several system triggers for foreign key constraints.
He has been receiving the ISC ERROR CODE:335544466 with the message
--
violation of FOREIGN KEY constraint "XXX" on table
Hi guys,
thanks for the suggestions and ideas, it helped to track it down.
It was not directly another trigger or procedure updating the record in
question, but something similar :
I had altered an existing trigger. There was an if-block checking a field A for
being not null and executing
> Use "IS DISTINCT" instead of "<>".
I've tried this too already - still no difference...
Some other comparisons with other fields in the same trigger seem to work fine
even with '<>', this one doesn't...
Hello,
shouldn't the values of new.somefield and old.somefield be different in an
after update trigger, when the value of that field has definitely changed?
For some reason they both have the new value and I can't figure out why. If I
didn't misread all the articles, I've found, completely,
[...]
if (PROCESSED_AMOUNT_INVOICES is null) then begin
PROCESSED_AMOUNT_INVOICES = 0;
end
PROCESSED_AMOUNT_INVOICES = PROCESSED_AMOUNT_INVOICES +
TempTargetAmount;
end
else begin
PROCESSED_AMOUNT_INVOICES =
Hello,
any attempt to do a search ends with the screen
Oops!
Polls feature not enabled
for some reason, so I have to ask directly:
Is it correct, that a commit is required after some contraints have been
removed, before I can do some data changes which would violate those
constraints?
Hello Martijn,
thank you very much for the quick response.
Best regards,
Patrick
Hello,
I hope the title says more or less what I would like to achieve. For a better
overview I've made two screenshots.
That's the given structure (3 tables):
http://www.pic-upload.de/view-24012442/01_given_structure.png.html
http://www.pic-upload.de/view-24012442/01_given_structure.png.html
10 matches
Mail list logo