为了账号安全,请及时绑定邮箱和手机立即绑定

sql server 两表表合并

sql server 两表表合并

Helenr 2018-12-07 11:25:39
我是查询出来的两张数据表,现在需要合并为一张表方便使用,请看sql语句 SELECT  A.User_Name  ,A.PhoneNo  ,A.OICQ  ,C.RoleCode  ,D.Value AS RoleName  ,G.CompanyName  ,G.Address AS CompanyAddress  ,G.Telephone AS CompanyTel,F.PropertyInstance_Value FROM  Base_UserInfo A LEFT JOIN  Base_UserRole B ON  A.User_ID = B.User_ID LEFT JOIN  Base_Roles C ON  B.Roles_ID = C.Roles_ID LEFT JOIN  TMSTCommonData D  ON C.RoleCode = D.Code AND D.CodeKey = 'ChatUserRole',  TMSTCompany G,Base_AppendPropertyInstance F WHERE A.CompanyCode = G.CompanyCode   AND (A.User_ID=F.PropertyInstance_Key  AND F.Property_Control_ID='QrWeChatPath')  AND A.User_Account = '18381091656'    SELECT F.PropertyInstance_Value as Usercode from Base_UserInfo A,Base_AppendPropertyInstance F where A.User_Account='18381091656' and A.User_ID=F.PropertyInstance_Key  AND F.Property_Control_ID='PromotionCode' 有人私下帮我解决下更好,我可以给你发图详细看
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 401 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号