开发者

Find a value in a field based on matching a different field in the table with that in another table

I am trying to do something really simple but am having a lot of trouble. I have two tables one structured with the following fields

member开发者_JS百科.tx_nickname var(100)
member.accountnumber int

memtransactions.accountnumber (FK uniqueidentifier)

what I want to do is lookup member table and find the nickname in the member table for the record where member.accountnumber = memtransactions.accountnumber

I have tried a few but i keep getting errors with field type conflicts

Thank you


Try this:

SELECT member.tx_nickname
FROM member m
JOIN memtransactions mt ON m.accountnumber = mt.accountnumber
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜