Home » SQL & PL/SQL » SQL & PL/SQL » if condition (oracle 10g)
if condition [message #411408] Fri, 03 July 2009 07:25 Go to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
hi i am having a query like this.

SELECT TRANSFER_TYPE from EMRTransferedPatients  WHERE TRANSFER_TYPE='Temporary' AND PATIENT_ID= 
 UNION SELECT TH.TRANSFER_TYPE from EMRTransferedPatientsHistory TH, 
 (SELECT PATIENT_ID,MAX(TRANSFER_DATE) as TRANSFER_DATE  FROM EMRTransferedPatientsHistory GROUP BY PATIENT_ID) TEMPTBL
WHERE TEMPTBL.PATIENT_ID=TH.PATIENT_ID AND TEMPTBL.TRANSFER_DATE=TH.TRANSFER_DATE
 AND TRANSFER_TYPE='Temporary' AND TH.PATIENT_ID = 


can ypu help me out as in using if condition with query is succesfull then returns 1or returning zero
Re: if condition [message #411412 is a reply to message #411408] Fri, 03 July 2009 07:39 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
If you could give us a sql which is working and syntatically correct (Prove it) only then we will be able to help you out. Until then happy learning sql

Regards

Raj
Re: if condition [message #411414 is a reply to message #411408] Fri, 03 July 2009 07:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
From your previous post among many:
Michel Cadot wrote on Fri, 03 July 2009 10:55
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).


Why are you so contemptous towards who help you?

Regards
Michel


Re: if condition [message #411418 is a reply to message #411408] Fri, 03 July 2009 07:56 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:
can ypu help me out as in using if condition with query is succesfull then returns 1or returning zero


Can you help us by explaining clearly and concisely, ideally with an example, what it is that you're trying to do.
Re: if condition [message #411423 is a reply to message #411408] Fri, 03 July 2009 08:26 Go to previous message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

I know my post won't help anything here ( as much true as OP's post)

Good Luck guyz !!
Previous Topic: Recreating the sequence in the trigger Oracle 10g
Next Topic: Character Function
Goto Forum:
  


Current Time: Sat Feb 15 11:03:49 CST 2025