1)SQL server 中的 case,以及限制查询出的长度并加"......".主要用于Gridview。
SELECT
[
SupportID
]
,
[
IDQuestion
]
,
left
(
[
Question
]
,
20
)
+
'
......
'
as
Question,
case
status
when
'
0
'
then
'
no use
'
when
'
1
'
then
'
no answer
'
when
'
2
'
then
'
answered
'
end
as
Sort_status
FROM
[
CD_HC_Question
]