Solved

SQL question

Posted on 2013-01-04
4
272 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 65

Accepted Solution

by:
Jim Horn earned 250 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 26

Assisted Solution

by:Chris Luttrell
Chris Luttrell earned 250 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 65

Expert Comment

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

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

734 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