with adoquery1 do
begin
close;
sql.Clear;
sql.add('update A');
sql.add('set 现状态=''已租'' ');
sql.Add('where 现状态=''空置'' and 单元编码 in');
sql.add('select A.单元编码 from A,B');
sql.add('where A.单元编码=B.单元编码');
execsql;
end;
提示有问题。
换成
with adoquery1 do
begin
close;
sql.Clear;
sql.add('update A');
sql.add('set 现状态=''已租'' ');
sql.Add('where 现状态=''空置'' and 单元编码 in');
sql.add('select .单元编码 from B');
execsql;
end;
也不行。