你的 as a2 和 where 中的a2冲突,可以改成这样:
select a1,case when len(a2)-len(@a)>0 then '001' else '000' end as aa2 (或者别的名都可以)
from aaa where a2='001'
select a1,case when len(a2)-len(@a)>0 then '001' else '000' end as aa2 (或者别的名都可以)
from aaa where a2='001'
解决方案 »
- button、bitbtn、speedbutton的疑问,望解决
- with do的问题求教
- ParamStr,setstring怎么用?详细一点,谢谢!
- 很简单:单元应用的问题
- 欢迎大家QQ联盟!!
- 装了IE6和OFFICE XP后还用得着装MDAC(Microsoft Data Access Components) Ver2.7吗?
- coolbar 控件的用法:我怎么控制其上的控件的大小呢?
- 在新的项目中,采用了B/S结构,通过javascript调用Activex,控制客户端的硬件设备,有做过这方面的高手指教!
- TDBLabel控件的Caption属性改变时,会触发哪个事件?
- 高手快来,安装程序制作
- 询问DELPHI中的一个函数,紧急
- 动态生成按钮问题
select a1,case when len(a2)-len(@a)>0 then '001' else '000' end as a3
from aaa where a3='001'
一运行就出现:列名 'a3' 无效
select a1,case when len(a2)-len(@a)>0 then '001' else '000' end as a3
from aaa where when len(a2)-len(@a)>0 then '001' else '000' end='001'
select a1,case when len(a2)-len(@a)>0 then '001' else '000' end as a3
from aaa
having a3='001'
from aaa
group by a1
having (case when len(a2)-len(@a)>0 then '001' else '000' end)='001'