Subject | Re: Bizarre transaction/update behaviour |
---|---|
Author | hc3marx |
Post date | 2005-11-12T12:51:40Z |
When I delete a detail record (say one out of 4), all four detail
records are deleted or when I edit a detail record, all the other
detail records becomes identical to the edited record.
My update, Refresh and delete SQL is as follows:
UPDATE JOB_DETAIL
SET
FIN_YEAR = :FIN_YEAR,
CONTRACT_NO = :CONTRACT_NO,
ITEM_AMOUNT = :ITEM_AMOUNT,
PRICE = :PRICE,
WHERE
FIN_YEAR = :MAS_FIN_YEAR
and CONTRACT_NO = :MAS_CONTRACT_NO
and ITEM_AMOUNT = :OLD_ITEM_AMOUNT
and PRICE = :OLD_PRICE
DELETE FROM
JOB_DETAIL
WHERE
FIN_YEAR = :OLD_FIN_YEAR
and CONTRACT_NO = :OLD_CONTRACT_NO
and ITEM_AMOUNT = :OLD_ITEM_AMOUNT
and PRICE = :OLD_PRICE
SELECT
FIN_YEAR,
CONTRACT_NO,
ITEM_AMOUNT,
PRICE
FROM
JOB_DETAIL
WHERE( FIN_YEAR = :FIN_YEAR
and CONTRACT_NO = :CONTRACT_NO
) and ( JOB_DETAIL.FIN_YEAR = :OLD_FIN_YEAR
and JOB_DETAIL.CONTRACT_NO = :OLD_CONTRACT_NO
and JOB_DETAIL.ITEM_AMOUNT = :OLD_ITEM_AMOUNT
and JOB_DETAIL.PRICE = :OLD_PRICE
)
My master table contains FIN_YEAR and CONTRACT_NO as a primary key and
I use one transaction for this process. There is no trigger.
Like said this works well after restarting the server PC, but after a
while this behaviour happens again.
Corlien
records are deleted or when I edit a detail record, all the other
detail records becomes identical to the edited record.
My update, Refresh and delete SQL is as follows:
UPDATE JOB_DETAIL
SET
FIN_YEAR = :FIN_YEAR,
CONTRACT_NO = :CONTRACT_NO,
ITEM_AMOUNT = :ITEM_AMOUNT,
PRICE = :PRICE,
WHERE
FIN_YEAR = :MAS_FIN_YEAR
and CONTRACT_NO = :MAS_CONTRACT_NO
and ITEM_AMOUNT = :OLD_ITEM_AMOUNT
and PRICE = :OLD_PRICE
DELETE FROM
JOB_DETAIL
WHERE
FIN_YEAR = :OLD_FIN_YEAR
and CONTRACT_NO = :OLD_CONTRACT_NO
and ITEM_AMOUNT = :OLD_ITEM_AMOUNT
and PRICE = :OLD_PRICE
SELECT
FIN_YEAR,
CONTRACT_NO,
ITEM_AMOUNT,
PRICE
FROM
JOB_DETAIL
WHERE( FIN_YEAR = :FIN_YEAR
and CONTRACT_NO = :CONTRACT_NO
) and ( JOB_DETAIL.FIN_YEAR = :OLD_FIN_YEAR
and JOB_DETAIL.CONTRACT_NO = :OLD_CONTRACT_NO
and JOB_DETAIL.ITEM_AMOUNT = :OLD_ITEM_AMOUNT
and JOB_DETAIL.PRICE = :OLD_PRICE
)
My master table contains FIN_YEAR and CONTRACT_NO as a primary key and
I use one transaction for this process. There is no trigger.
Like said this works well after restarting the server PC, but after a
while this behaviour happens again.
Corlien