我新建了两个表(huowei,huowei1),两个表都有同样的字段,stritemname(A),lngpositionid(I),strcustomname(A),strfullname(A),dblendstockquantity(I),pricid(I),
zizoid(I),在程序里利用query写sql语句,用update方法来用一个表更新另一个表的数据,
query2.SQL.Add('update huowei');
query2.SQL.Add('set huowei.pricid=huowei1.pricid,huowei.zizoid=huowei1.zizoid');
query2.SQL.Add('where huowei.stritemname=huowei1.stritemname and huowei.lngpositionid=huowei1.lngpositionid and huowei.strcustomname=huowei1.strcustomname and huowei.strfullname=huowei1.strfullname');
但程序运行的时候老是出现'invaild field name pricid'的错误,请问怎样解决???
zizoid(I),在程序里利用query写sql语句,用update方法来用一个表更新另一个表的数据,
query2.SQL.Add('update huowei');
query2.SQL.Add('set huowei.pricid=huowei1.pricid,huowei.zizoid=huowei1.zizoid');
query2.SQL.Add('where huowei.stritemname=huowei1.stritemname and huowei.lngpositionid=huowei1.lngpositionid and huowei.strcustomname=huowei1.strcustomname and huowei.strfullname=huowei1.strfullname');
但程序运行的时候老是出现'invaild field name pricid'的错误,请问怎样解决???
解决方案 »
- delphi cxgrid 如何用
- 拜求:如何从usb读取数据啊????
- 用mixer系列函数如何知道打开的混音器是录音设备,还是放音设备?
- 怎样根据文件后缀名来得到该类型文件的图标?
- 从SQL2000转移到Oracle8i上出现了查询语句的问题
- DelphiBBs上也无人答的题:如何实现IE右键启动我的程序(象NetAnts)
- ShellExecute要Uses哪个.pas单元中?for D5 和 for D6.
- SOS!!!SQL高手帮帮忙!!!
- 在速度上,ADO和BDE那个更好一点呢?
- 求帮助解决一下关于MATLAB2018a的simulink仿真中scope产生延时如何处理
- cross table怎样用图表的形式显示出来
- 怎样对扫描出的TIF格式的图片进行纠正歪斜,去污、去黑边的处理?
query2.SQL.Add('update huowei,huowei1');
query2.SQL.Add('update huowei');
query2.SQL.Add('set huowei.pricid=huowei1.pricid,huowei.zizoid=huowei1.zizoid');
query2.SQL.Add('from huowei1'); // <- 加上这句
query2.SQL.Add('where huowei.stritemname=huowei1.stritemname and huowei.lngpositionid=huowei1.lngpositionid and huowei.strcustomname=huowei1.strcustomname and huowei.strfullname=huowei1.strfullname');