Вход на сайт
sql stored procedure
232 просмотров
Перейти к просмотру всей ветки
saschka_net гость
в ответ Fleischmann 09.02.05 17:01
declare @text_value varchar(20)
set @text_value = ''
--set @text_value = null
SELECT COUNT(ID) FROM dbo.mf_type
WHERE apstatus = 'Passiv' AND
SpalteName =
case
when text_value is null and @text_value is null then 1
when text_value is null and @text_value is not null then 0
when text_value is not null and @text_value is null then 0
when text_value <> @text_value then 0
when text_value = @text_value then 1
end
Tablichka tvoja dolgna SpalteName imet' (int ili bit)
set @text_value = ''
--set @text_value = null
SELECT COUNT(ID) FROM dbo.mf_type
WHERE apstatus = 'Passiv' AND
SpalteName =
case
when text_value is null and @text_value is null then 1
when text_value is null and @text_value is not null then 0
when text_value is not null and @text_value is null then 0
when text_value <> @text_value then 0
when text_value = @text_value then 1
end
Tablichka tvoja dolgna SpalteName imet' (int ili bit)