账务登账过程中,系统提示:“外键出错”
A问题解答
问题分析:
subject表中,个别记录的是否明细标志字段detailflag,存在错标现象
解决方法:
A、update subject set detailflag = T where not exists(select 1 from subject b where b.subid like subject.subid +_%)
/*通过以上语句,把subject表所有最明细科目的detailflag更新为’T’,exists在数据库里是指超出指定范围,其中的’1’和’b’都是一个赋值,其中的