select (case status when 0 then '未审核' when 1 then '已经审核' when -1 then '作废单据' end) As Status from table
select case Status when '0' then '未审核' when '1' then '已经审核' else '作废单据' end Status from table
再建一个表用来保存Status与“已审核”等数据的对应关系。假设这个表名为Table1,包括两个字段StatusID、Status,StatusID对应于Table表中的Status字段,则查询语句为: select [table].[Field],…………,[table1].[Status] from [table] inner join [table1] on [table].[status]=[table1].[statusid] where …………
when 0 then '未审核'
when 1 then '已经审核'
when -1 then '作废单据'
end) As Status
from table
select [table].[Field],…………,[table1].[Status] from [table] inner join [table1] on [table].[status]=[table1].[statusid] where …………