【发布时间】:2014-09-02 05:31:17
【问题描述】:
如何在查询运行时在 select 语句中实现布尔逻辑?
SELECT t.[Key]
,t.[Parent_Key]
,t.[Parent_Code]
,t.[Code]
,t.[Desc]
,t.[Point]
,[isChild] -- If Point > 2, then true, if Point == 1 Then false
,t.[By]
,t.[On]
FROM [db].[stats] t WHERE t.[Parent_Key]= @tmpParameter
我想做一些逻辑来根据 t.[Point] 确定 [isChild] 布尔值
【问题讨论】:
标签: sql-server-2008 sql