SQL联接表 - 加入最后四位列数
我正在尝试在SQL中加入两个桌子。我想将电话号码的最后四位数字与第二列的A列一起加入,其中仅显示最后四位数。
From ExcelSheet1 E
Join Walkers W
ON W.Lastname = E.LNAME
AND W.Firstname = E.FNAME
and W.PhoneNum like '%'+E.MEMBER_NUM
I'm trying to join two tables in SQL. I want to join on the column with the last four digits of a phone number with the a column from a second column where only the last four digits are shown.
From ExcelSheet1 E
Join Walkers W
ON W.Lastname = E.LNAME
AND W.Firstname = E.FNAME
and W.PhoneNum like '%'+E.MEMBER_NUM
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将变量成员_num作为varchar施放后,我得到了我正在寻找的结果
after casting the variable MEMBER_NUM as a varchar i got the result i was looking for