Solved

SQL question

Posted on 2013-01-04
4
270 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
  • 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
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.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

792 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