请大家帮忙看一下,这,错在哪里了?
现在有table1,Sid为其主键,Sid长度为9位,现在我要通过query查询tabl1中前6位为Edit1中的值的记录,然后把这些记录写入动态生成的表table2中,我如下写法错误:
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * ');
query1.SQL.Add('into table2');
query1.SQL.Add('from table1 group by sid');
query1.SQL.Add('where strleft(sid,6)='+edit1.Text +'');
query1.Open;
错误是:table2没有定义。
请问这是为什么?(用的是paradox)
谢谢回答!!