Calculation at database level

0 pts.
Tags:
Database
DB2
Development
Oracle
Security
Software Quality Assurance
Software testing
Hi! Please take a look at few rows of one table . MBRNO Readmit READMIT DATE READMIT Readmit Seq. NO DISCHARGE date NO. of days 121 1 20030101 20030105 5 2 20030105 20030115 10 3 20030202 20030218 3 4 20030218 20020220 0 The measure is count of cases. I do not want to calculate the case with readmit no of days = '0'. Also, discharge date of seq # 1 is same as readmit date of seq # 2. So I need to count first or 2nd row. So actual count of cases for this member is 2 ( though it appears as 4). How will I achieve it at database level? I will appreciate the help.
ASKED: June 11, 2005  3:47 PM
UPDATED: June 13, 2005  12:47 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,
You will have to specify that condition in the “Having” clause of the select statement.

Prashanth.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following