?
Solved

SQL question

Posted on 2013-01-04
4
Medium Priority
?
276 Views
Last Modified: 2013-01-04
How do I structure this SQL to update a record?

UPDATE IHPS_case_note SET safety_plan_revision_request = 'xxxxxxxx'

 INNER JOIN ihps_case ON ihps_case.ID = ihps_case_note.fk_caseID
 INNER JOIN ihps_create_log ON ihps_create_log.ID = ihps_case.FK_createlogID
 WHERE DHS_evaluationID = 11111 AND ihps_create_log.incremental = 1
0
Comment
Question by:HLRosenberger
[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
4 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 1000 total points
ID: 38745386
UPDATE IHPS_case_note
SET safety_plan_revision_request = 'xxxxxxxx'
FROM IHPS_case_note
    INNER JOIN ihps_case ON ihps_case.ID = ihps_case_note.fk_caseID
    INNER JOIN ihps_create_log ON ihps_create_log.ID = ihps_case.FK_createlogID
WHERE DHS_evaluationID = 11111 AND ihps_create_log.incremental = 1
0
 
LVL 27

Assisted Solution

by:Chris Luttrell
Chris Luttrell earned 1000 total points
ID: 38745387
Like this:
UPDATE IHPS_case_note 
SET safety_plan_revision_request = 'xxxxxxxx'
FROM IHPS_case_note 
 INNER JOIN ihps_case ON ihps_case.ID = ihps_case_note.fk_caseID 
 INNER JOIN ihps_create_log ON ihps_create_log.ID = ihps_case.FK_createlogID
 WHERE DHS_evaluationID = 11111 AND ihps_create_log.incremental = 1

Open in new window

0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 38745435
Thank so much!
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 38745446
Thanks for the split.  Good luck with your project. -Jim
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

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?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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 UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

770 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