•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 402,904 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,121 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums
Views: 869 | Replies: 0
![]() |
•
•
Join Date: Jul 2006
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Hi you wonderful helpers who generously give your time away to help the less competent 
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:
Am I completely off here?

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:
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 = 0Am I completely off here?
![]() |
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Basic PHP Includes (PHP)
- updating records using php and mysql (PHP)
- Refresh a table (Java)
- VisualFox Pro ClassLibrary (VB.NET)
- Table Update Problem (JSP)
- Error connecting to database (ASP.NET)
- Add an attribute to existing table (Database Design)
- updating 2 HTML tables on one PHP page (PHP)
- Table of Contents Script (Java)
Other Threads in the MS SQL Forum
- Previous Thread: Getting error when trying to install MS SQL 2000 on XP
- Next Thread: need query help


Linear Mode