with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add( 'sjtj set sjks=cxgc_c2.imin, sjjx=cxgc_c2.imax from sjtj (select min(sjbh),max(sjbh) from CXGZ where sjbh like '12%' ) ');
open;
begin
close;
sql.Clear;
sql.Add( 'sjtj set sjks=cxgc_c2.imin, sjjx=cxgc_c2.imax from sjtj (select min(sjbh),max(sjbh) from CXGZ where sjbh like '12%' ) ');
open;
什么意思啊,语法都不对阿,你想做什么
有这样的语句么?
begin
close;
sql.Clear;
sql.Add( 'sjtj set sjks=cxgc_c2.imin, sjjx=cxgc_c2.imax from sjtj (select min(sjbh),max(sjbh) from CXGZ where sjbh like ''12%'') ');
open;
sql.Add( 'update sjtj set sjks=cxgc_c2.imin, sjjx=cxgc_c2.imax from sjtj (select min(sjbh),max(sjbh) from CXGZ where sjbh like ''12%'') ');
在SQL Server 查询分析器中写下面的语句出错:出错提示是:服务器: 消息 208,级别 16,状态 1,行 1
对象名 'sjtj' 无效。
是什么原因?update sjtj set sjks=cxgc_c2.imin, sjjx=cxgc_c2.imax from sjtj
select min(sjbh),max(sjbh) from CXGZ where sjbh like '12%'