Home » SQL & PL/SQL » SQL & PL/SQL » need in oracle (oracle 10g)
need in oracle [message #425425] Fri, 09 October 2009 02:11 Go to next message
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 #425427 is a reply to message #425425] Fri, 09 October 2009 02:15 Go to previous messageGo to next message
soni_7
Messages: 33
Registered: July 2005
Member
Hi,

Could you please elaborate your question??


Regards
Soni
Re: need in oracle [message #425428 is a reply to message #425427] Fri, 09 October 2009 02:18 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
HI MINE IS A MSSQL QUERY AND WANT IT IN ORACLE PLEASE
Re: need in oracle [message #425437 is a reply to message #425428] Fri, 09 October 2009 02:46 Go to previous message
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

Previous Topic: Flashback Truncated Table
Next Topic: round
Goto Forum:
  


Current Time: Fri Dec 06 14:03:00 CST 2024