语句是这样的,高手解答下,谢谢
sql.Add('update chewei set panduan=0 where cwid=(select cwid from lscw where cpid=:id and panduan=1) ');
sql.Add('update chewei set panduan=0 where cwid=(select cwid from lscw where cpid=:id and panduan=1) ');
解决方案 »
- 请教DateTimePicker1的问题?
- ComboBox与输入法之间的问题!
- 中国农历日历控件(支持二十四节气)
- 用DBGrid显示存储过程的查询结果,可是......给点技术支持吧
- 30分钟结帖!帮我修改一下吧,读取文本到memo1
- 谁能告诉我sql中对有小时,分,秒的datetime类型如何只取年月日
- select 语句的写法问题,在线给分(简单)
- 请问各位大侠!~~~~~~~~怎样使用JSP,我有安装了可是用不了呀 这是为什么呢!
- Delphi7中TMNUDP空间的位置
- 请帮忙,很容易!!
- 动态创建的WEBBROWSER 显示后 不响应鼠标键盘的操作
- delphi 如何判断excel的某一列中某一合并单元格中有多少行,怎么取得单元格中的内容呢?
sqlstr:='select cwid from lscw where cpid=:id and panduan=1';
sql.Add('update chewei set panduan=0 where cwid=sqlstr);
unit2.DataModule2.ADOQuery1.Parameters.ParamByName('id').Value:=edit2.Text;
update chewei set panduan=0 where cwid in (select cwid from lscw where cpid=1 and panduan=1)
with adoquery1 do
begin
Close;
SQL.Clear;
SQL.Add('update chewei set panduan=0 where cwid=(select cwid from lscw where cpid=:id and panduan=1)');
ExecSQL;end
update chewei set panduan=0 where cwid=(select cwid from lscw where cpid=001 and panduan=1)
可以把chewei表里的panduan=0但是我在DLEPHI中写这条代码
sql.Add('update chewei set panduan=0 where cwid=(select cwid from lscw where cpid=id and panduan=1) ');
unit2.DataModule2.ADOQuery1.Parameters.ParamByName('id').Value:=edit2.Text;
id我也定义了(要求输入)
当我输入001的时候就会出错,而且当我把in代替=的时候也出错,高手来解答下啊
错误提示:子查询返回值多余一个,当子查询跟在=,!=,。。后,或子查询用做表达式时,这种情况不允许。
多谢各位!!!