Login
sql stored procedure
232 просмотров
Перейти к просмотру всей ветки
надеюсь ла здесь по теме. Проблема такая:
у меня ошибка если я пытаюсь протолкнуть следуещеe
SELECT COUNT(id) FROM dbo.mf_type WHERE ... AND case
when text_value is null and @text_value is null then true
when text_value is null and @text_value is not null then false
when text_value is not null and @text_value is null then false
when text_value <> @text_value then false
when text_value = @text_value then true
end
AND
...
алтернативой может быть ISNULL() но ето не подходит.
есть у кого нибудь какие нибудь предложения?
у меня ошибка если я пытаюсь протолкнуть следуещеe
SELECT COUNT(id) FROM dbo.mf_type WHERE ... AND case
when text_value is null and @text_value is null then true
when text_value is null and @text_value is not null then false
when text_value is not null and @text_value is null then false
when text_value <> @text_value then false
when text_value = @text_value then true
end
AND
...
алтернативой может быть ISNULL() но ето не подходит.
есть у кого нибудь какие нибудь предложения?