CREATE VIEW v
AS
select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end as COL1,col2,col3 from testYN
AS
select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end as COL1,col2,col3 from testYN
create view v1
as
select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end,col2,col3 from testYN
在试图页里面,也可以用语句呀。CREATE VIEW V_Test
AS
select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end as COL1,col2,col3 from testYN Go
就可以了。
没有什么问题的
报错信息:查询设计器不支持 CASE SQL 构造。