标签:ble val list 删除 sel set ror def default
开始判断系统科目
IF (EXISTS(SELECT * FROM atypecw WHERE typeid = @typeid AND sysrow<>0)) OR
(EXISTS(SELECT * FROM T_CW_SetAtypeList WHERE atypeid = @typeid))
BEGIN
SELECT @prm_ErrorMsg=‘此记录为系统会计科目‘
RETURN -5
END
DECLARE @TradeId INT
SELECT @TradeId = CAST(SubValue AS INT)
FROM dbo.T_GBL_SysDataCW
WHERE SubName = ‘TradeId‘
SELECT ProjectNameEn, atypeID, LEN(atypeID) AS ATypeLen
INTO #DefaultSubjectContrast
FROM dbo.T_CW_TradeSubjectContrast
WHERE TradeID = @TradeId AND IsVisible = 1
IF EXISTS (SELECT * FROM T_CW_SubjectContrast WHERE atypeid = @typeid AND IsVisible = 1 AND LEN(@typeid) < 15)
BEGIN
SELECT @prm_ErrorMsg=‘此记录为系统会计科目‘
RETURN -5
END
标签:ble val list 删除 sel set ror def default
原文地址:https://www.cnblogs.com/gzjsrj/p/12284478.html