I thought this would be an easy task but I'm not an advanced SQL guy and don't know how to use an inner join, which apparently I need to use.
I have two tables
tblEmp
fname (text)
lname (text)
balance (money)
beginning_balances
fname (text)
lname (text)
balance (money)
I want to update the balances from beginning_balances to tblEmp.
Here's my attempt to recreate the example I was tyring to follow which yeilded zero results although I know that there are exact fname and lname matches:
Expand|Select|Wrap|Line Numbers
- Update tblemp
- Set tblemp.balance = beginning_balances.balance
- From tblemp
- Inner Join beginning_balances
- On tblemp.fname = beginning_balances.fname
- And tblemp.lname = beginning_balances.lname
- Where tblemp.balance = 0