[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Update on a Join Statement

Posted on 2014-04-10
2
Medium Priority
?
178 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 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

649 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