Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Error 7628 happened in TRANSACTION mode whiling trying to insert a table that has "WITH CHECK OPTION" foreign key≈ - forum topic by zhiyanshao

$
0
0

Please let me know how to fix this error. How does the CHECK OPTION work in TRANSACTION mode?
Here is my scenario,
1. Say booking_number in table B is defined as foreign key which is the primary key of table A.
2. In my stored procedure, the same booking record is inserted into A and then B.
3. There is no error if the stored procedure is called without TRANSACTION mode.
4. There is also no error if the stored procedure is called with TRANSACTION mode and the foreign key was defined as "WITH NO CHECK OPTION"
5. The error only happens in TRANSACTION mode and  the foreign key is defined as "WITH CHECK OPTION". It looks like in TRANSACTION mode, the booking_number was not considered already inserted into A so the CHECK failed while the booking_number is being inserted into B.
Thanks!

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>