Solved

SQL question

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

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.
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now