Ian Robson
Ian Robson

Reputation: 1

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.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

Upvotes: 0

Views: 159

Answers (1)

bobs
bobs

Reputation: 22184

Try this:

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

Upvotes: 1

Related Questions