34,594
社区成员
发帖
与我相关
我的任务
分享
;with a as
(select ID,Name,MyCol,tmp=dbo.GetContent(Substring(MyCol,8,2))from MyTable)
select ID,Name,MyCol,case when tmp>=128 then tem-128 else tem end as tem from a
select
ID,Name,MyCol,
case when tmp>=128 then '每'+cast(Tmp-128 as varchar(10)) else Cast(tmp as varchar(10)) end
from
(select *, tmp=dbo.GetContent(Substring(MyCol,8,2)) from MyTable )t
select ID,Name,MyCol,
case
when tmp>=128 then '每'+cast(Tmp-128 as varchar(10))
else Cast(tmp as varchar(10))
end
from (select *, tmp=dbo.GetContent(Substring(MyCol,8,2)) from MyTable )aa
SELECT
ID,NAME,MYCOL,TEM,
case
when tmp>=128 then '每'+cast(Tmp-128 as varchar(10))
else Cast(tmp as varchar(10))
end AS COL
FROM
(
select ID,Name,MyCol,
tmp=dbo.GetContent(Substring(MyCol,8,2))
from MyTable
) AS T