业务伙伴主数据-联系人
小于 1 分钟
已将对应字段和导入代码对应,直接复制表即可导入,注意删除第一行标题
- 示例代码
SELECT N'ParentKey' AS '业务伙伴代码', N'LineNum' AS '行号', N'Name' AS '联系人姓名', N'Address' AS '地址', N'Phone1' AS '电话 1'
, N'Phone2' AS '电话 2', N'MobilePhone' AS '移动电话', N'Fax' AS '传真', N'E_Mail' AS '电子邮件'
UNION ALL
SELECT N'业务伙伴代码' AS '业务伙伴代码', N'行号' AS '行号', N'联系人姓名' AS '联系人姓名', N'地址' AS '地址', N'电话 1' AS '电话 1'
, N'电话 2' AS '电话 2', N'移动电话' AS '移动电话', N'传真' AS '传真', N'电子邮件' AS '电子邮件'
UNION ALL
SELECT T0.[CardCode], CAST(ROW_NUMBER() OVER (PARTITION BY T0.[CardCode] ORDER BY T0.[CardCode]) - 1 AS nvarchar) AS '行号', T0.[Name], T0.[Address], T0.[Tel1]
, T0.[Tel2], T0.[Cellolar], T0.[Fax], T0.[E_MailL]
FROM OCPR T0