以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  加载数据  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=142614)

--  作者:表叔
--  发布时间:2019/11/1 11:52:00
--  加载数据
 将B表中某列不重复的值添加到A表中,添加到A表的值和A表原来的值不重复 

--  作者:有点蓝
--  发布时间:2019/11/1 12:05:00
--  
dim lst as new List(of string) = DataTables("B表").SQLGetValues("某列","某列 not in(select 某列 from A表)")

dim r as row
for each s as string in lst
    r = Tables("A表").addnew
r("某列") = s
next

--  作者:表叔
--  发布时间:2019/11/1 17:57:00
--  回复:加载数据
表A列名:产品代码,表B列名:易飞品号
dim lst as new List(of string) = DataTables("B表").SQLGetValues("易飞品号","易飞品号 not in(select 产品代码 from A表)")
dim r as row
for each s as string in lst
    r = Tables("A表").addnew
r("产品代码") = s
next
代码编辑器报错,保存不了。

--  作者:有点蓝
--  发布时间:2019/11/1 20:22:00
--  
dim lst as List(of string) = DataTables("B表").SQLGetValues("易飞品号","易飞品号 not in(select 产品代码 from A表)")
--  作者:表叔
--  发布时间:2019/11/5 10:42:00
--  回复:加载数据
系统提示语法错误:“产品编码”运算符后缺少操作数。
--  作者:有点蓝
--  发布时间:2019/11/5 10:54:00
--  
内部表?

dim lst as List(of string) = DataTables("B表").SQLGetValues("易飞品号","易飞品号 not in(select 产品代码 from {A表})")