need in oracle [message #425425] |
Fri, 09 October 2009 02:11 |
rajasekhar857
Messages: 500 Registered: December 2008
|
Senior Member |
|
|
Update EMRLabResultsDetails
Set LAB_PROFILE_ID = b.LAB_PROFILE_ID
From EMRLabResultsDetails a,
(
SELECT DISTINCT ELRD.LAB_REQUEST_ID,ELRD.LAB_PROFILE_ID,ELRDS.TEST_ID,ELRDS.LAB_RESULT_ID,ELRDS.LAB_RESULT_DETAILS_ID
FROM EMRLabRequest ELR
INNER JOIN EMRLabRequestDetails ELRD ON ELR.LAB_REQUEST_ID=ELRD.LAB_REQUEST_ID AND LAB_PROFILE_ID IS NOT NULL
INNER JOIN EMRLabResults ELRS ON ELRS.LAB_REQUEST_ID=ELR.LAB_REQUEST_ID
INNER JOIN EMRLabResultsDetails ELRDS ON ELRDS.LAB_RESULT_ID=ELRS.LAB_RESULT_ID
INNER JOIN EMRLabTestProfileLkup ELTPL ON ELTPL.LAB_PROFILE_ID=ELRD.LAB_PROFILE_ID
INNER JOIN EMRTestProfiles ETP ON ETP.LAB_PROFILE_ID=ELTPL.LAB_PROFILE_ID
WHERE ELR.STATUS=1 AND ELRD.LAB_PROFILE_ID=ETP.LAB_PROFILE_ID AND ETP.TEST_ID=ELRDS.TEST_ID
) b
Where a.LAB_RESULT_ID = b.LAB_RESULT_ID
GO
hi need in oracle please
|
|
|
|
|
Re: need in oracle [message #425437 is a reply to message #425428] |
Fri, 09 October 2009 02:46 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Once more do NOT post in UPPER case, split your lines to 80 characters, read SQL Reference for UPDATE syntax and try to do something instead of Always relying on others to do your work and find a more meaningful title than that "need in oracle" you found (of course you need something in Oracle otherwise you didn't post here).
Regards
Michel
[Updated on: Fri, 09 October 2009 02:47] Report message to a moderator
|
|
|