ISNULL in a CASE Statement
Q------------------
Hi,
Would someone please point out why the following is incorrect / not working, and how it should be achieved...
CASE [myRow]
WHEN 1 THEN 'True'
WHEN NULL THEN 'False' -- this line is my concern
ELSE 'FALSE'
END
I want to know how to detect for NULL in a CASE statement.
I know logically I can exclude the 'when null...' line as it will be captured by the ELSE statement.
Thanks,
Joe
A--------------------
You could change your case statement like:
CASE
WHEN [myRow] = 1 THEN 'True'
WHEN [myRow] IS NULL THEN 'False'
ELSE 'FALSE'
END
Andras
'온라인게임' 카테고리의 다른 글
1. SDL Tutorial Basics (0) | 2011.10.11 |
---|---|
3D 클라이언트 개발 (0) | 2011.10.11 |
기획 방법론 문제 해결 (0) | 2011.10.10 |
게임학(ludology)과 서사학(narratology) (0) | 2011.10.10 |
SDL 이미지 로딩하기 / 게임 (0) | 2011.10.10 |