June 15, 2003 at 9:56 am
Two prblms: When I insert via a begin tranx block, one of my tbls t_report is not getting their record inserted. (Note, this happens to about one / 1000 records per day, also no error is reported. This in turn is creating my other problem; which is when I am trying to select a record from t_account, and the corresponding fk is missing; the behavior is as if the record does not exist.
t_acct has a PK key which corresponds to the FK in t_report. Note, the original programmer set this relationship up, which does not seem to be needed.
I would like to remove this relationship; I currently have @ 300k records created with this relationship. Can I remove the FK property?
June 17, 2003 at 2:20 pm
quote:
Two prblms: When I insert via a begin tranx block, one of my tbls t_report is not getting their record inserted. (Note, this happens to about one / 1000 records per day, also no error is reported. This in turn is creating my other problem; which is when I am trying to select a record from t_account, and the corresponding fk is missing; the behavior is as if the record does not exist.t_acct has a PK key which corresponds to the FK in t_report. Note, the original programmer set this relationship up, which does not seem to be needed.
I would like to remove this relationship; I currently have @ 300k records created with this relationship. Can I remove the FK property?
1st problem:
do u do inserts on the two tables in one tran block? verify whether ur rollback stmt is placed correctly.
use outer join if you want to see values from a table joined to another table without matching keys.
2nd problem:
you can remove your FK by altering the table, but i dont think thats a good idea.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply