我正在SQL Server中编写一个触发器,就像这样
include config.mk
config.mk:
@echo 'Configuration file $@ not found. Creating...'
@printf 'Value to set for FST_DIR: '; IFS= read -r dir && [ -n "$$dir" ] && printf 'FST_DIR=%s\n' "$$dir" > $@
我的问题是,当@ exon,@ datedeb,@ datefin不为空且catcomp = 4时,会出现raiserror,它不应该出现 我试图通过例如len(@EXON)= 0 el空isnull,在这种情况下,如果值为null,那么raiserror不会出现
答案 0 :(得分:1)
删除所有这些标量变量都是一样的。
IF EXISTS
(
SELECT *
from inserted
where N_CATCompta = 4
AND
(
ISNULL([Exon N°], '') = ''
OR
ISNULL([Date début], '') = ''
)
)
RAISERROR('false',11,1)