Solved

Update on a Join Statement

Posted on 2014-04-10
2
174 Views
Last Modified: 2014-04-21
I'm having a hell of a time with a seemingly easy statement. I have verified all the tables and fields are correct

use pbj_2be

UPDATE ACH_1114b 
SET [Status] = 'en'
inner JOIN dbo.[tblBNK_GRP_ENT]
ON ACH_1114b.[account number] = tblBNK_GRP_ENT.ACCT 

WHERE ACH_1114b.[Status]='EN' AND tblBNK_GRP_ENT.GroupedPmts = 0 

Open in new window


the error i get is Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'inner'.
0
Comment
Question by:damixa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 39992783
UPDATE t1
SET [Status] = 'en'
FROM ACH_1114b AS t1
INNER JOIN dbo.[tblBNK_GRP_ENT] AS t2
ON t1.[account number] = t2.ACCT 
WHERE t1.[Status]='EN' AND t2.GroupedPmts = 0 

Open in new window

0
 

Author Closing Comment

by:damixa
ID: 40012668
Thanks
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql query help 15 55
removing rows from sql result set  where some column values are repeated 1 26
sql query 5 44
Delete old Sharepoint backups 2 24
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question