select case cast(lendorret as varchar(1)) when 'T' then 1 else 'sss' end
,case cast(lendorret as varchar(1)) when'F' then 1 else 0 end,*
from lend_hst where lrdate>'2012-08-01 00:00' and lrdate<'2014-08-31 23:59' 且lendorret是bit类型
,case cast(lendorret as varchar(1)) when'F' then 1 else 0 end,*
from lend_hst where lrdate>'2012-08-01 00:00' and lrdate<'2014-08-31 23:59' 且lendorret是bit类型
bit类型的值不是只有1,0或者Null吗
你看看你的左边是否有空格