请教专家:
我在外部数据源中链接了2个数据源:MES_DBS 和 ERP_DBS
如:物料信息在ERP_DBS库的Item_base 表中,
而产品扫码出库记录在MES_DBS库的DeliveryHistory
针对一下查询方法,如何在一个语句组中查询到2个数据源中的信息? 'Dim cmd As New SQLCommand
' cmd.ConnectionNa me = "MES_DBS" '----请教这数据源语句应该如何写?
' cmd.Comma ndText = "Se lect * fr om {Item_base} As a inner join {DeliveryHistory} As b on a.Item_code = b.Item_code "
' cmd.Comma ndText += "where a.Item_Code='" & Vars("_Fnumber") & "' order by b.Deliver_date desc "
Dim dDTb01 As DataTable = cmd.ExecuteReader()
先谢谢专家!
[此贴子已经被作者于2023/12/15 20:53:32编辑过]