sql 语句如下:
select *
from kaohe
where nian=:nian
and cast(renyuanid as char(20)) in
(select cast(renyuanid as char(20))
from renyuan
where cast(departmentid as char(20))=(
select cast(departmentid as char(20))
from department
where department=:department))
这个语句我在sql explore中试过了,如不带参数,没有一点问题,能运行。
但我这样写在程序中却不行。为什么,我后来没有用参数, 直接把参数值加了进去,成功了,不过感觉不爽。为什么会这样呢
select *
from kaohe
where nian=:nian
and cast(renyuanid as char(20)) in
(select cast(renyuanid as char(20))
from renyuan
where cast(departmentid as char(20))=(
select cast(departmentid as char(20))
from department
where department=:department))
这个语句我在sql explore中试过了,如不带参数,没有一点问题,能运行。
但我这样写在程序中却不行。为什么,我后来没有用参数, 直接把参数值加了进去,成功了,不过感觉不爽。为什么会这样呢
解决方案 »
- 我想了解一下,人家做的客户端防火墙拦截的时候,提示的是DNS请求
- TXT文本怎么删除行~帮我看看吧
- MDI程序,建立登陆界面时出现问题!
- 问两个小问题,急!100分求教!!
- 新手请教一个问题,参与者有分,论功行赏,谢谢!
- Filter的问题
- 用ADOTable和ADOQuery怎样建表!!
- 谁有是用delphi发送手机短信的资料?
- 在编译Delphi5工程时候,提示找不到***.dcu,请问为什么?
- 请问我要显示一段文字(多行)。我用TStaticText。可是我刚把它的形状调好后,关闭重来那又成了一行了,怎么办?或者有没有别的方法?
- 借问一下,如何获得NT系统的当前CPU占有率???
- 大侠请指教:chm文件的制作流程是怎么样的?(急!!!)
從表設為ftFisedChar