OLE DB问题,请高手指点
在使用OLE DB引入SQL数据时如何使用单元格值做为查询条件?以下是我在Microsoft Query 中的语句,条件以前的语句可以直接在OLE DB中使用但是条件不知如何引入,请问如何将条件引入OLE DB将查询条件替换为c2、c3、c4、c5、c6、c7单元格的值?
SELECT convert(varchar(9),DocNum)+convert(varchar(3),LineNum) AS '销售订单行号', FORQC.U_SOID AS '原订单号', FORQC.CardName AS '客户名称', convert(varchar(100),isnull(U_Model,''))+convert(varchar(100),isnull(U_Partcode,'')) AS '客户货号', FORQC.Quantity AS '数量', FORQC.WhsCode AS '仓库', FORQC.OnHand AS '库存', FORQC.DelivrdQty AS '已交货数量', FORQC.ShipDate AS '订单行日期', FORQC.CardCode AS '客户编号', FORQC.DocDate AS '订单日期', FORQC.DocNum AS '订单编号', FORQC.ItemCode AS '物料编号', FORQC.ItemName AS '物料描述', FORQC.U_Quality AS '客户用纸', FORQC.Length AS '长', FORQC.Width AS '宽', FORQC.Height AS '高', FORQC.U_Model AS '产品型号', FORQC.U_Partcode AS '产品名称', FORQC.U_Dimension AS '生产尺寸', FORQC.LineNum AS '行号', FORQC.U_Flute AS '楞型', FORQC.DelivrdQty AS '已交货数量', FORQC.Code AS '原料编号', FORQC.CItemName AS '原料名称', FORQC.U_CustomWeight, FORQC.U_WL_OUWght, FORQC.U_WL_INWght, FORQC.U_WL_WgFW AS '标准重量', FORQC.U_Prodtype AS '原料类型', FORQC.U_SOTEXT, FORQC.SalPackUn AS '包装数量', FORQC.SalPackMsr AS '包装单位', FORQC.U_TCName AS '易做图分类', FORQC.FreeTxt AS '自由文本', FORQC.U_SOLINE AS '原订单行'
FROM VCN04.dbo.FORQC FORQC
WHERE (FORQC.CardName Like ?) AND (FORQC.ItemName Like ?) AND (FORQC.ShipDate Between ? And ?) AND (FORQC.DocNum Between ? And ?)
补充:企业软件 , ERP/CRM