Home » SQL & PL/SQL » SQL & PL/SQL » HOW DO I DO A COUNT ON PT ID (WIN XP)
HOW DO I DO A COUNT ON PT ID [message #330173] Fri, 27 June 2008 15:14 Go to next message
LOgle0917
Messages: 10
Registered: February 2008
Location: Tennessee
Junior Member
THIS IS MY CODE IT WORKS, I NEED A PT COUNT HOW DO I WRITE IT IN?

SELECT PAT_NBR,DT_OF_SERVICE,PERF_PHYS_NBR,DISPLAY_NM,DIAG_CD,DIAG_CD_DESC,PROC_CD,PROC_CD_DESC_1
FROM OI_CHARGES, PHYSICIAN,PC_DESC,DIAGNOSIS_CD
WHERE OI_CHARGES.PERF_PHYS_NBR=PHYSICIAN.PHYS_NBR
AND OI_CHARGES.DIAG_CD=DIAGNOSIS_CD.DIAGNOSIS_CD
AND OI_CHARGES.PROC_CD=PC_DESC.PC_PROC_CD
AND
AGC_CD = 'OBGYN' AND DT_OF_SERVICE BETWEEN '20070701' AND '20080630';
Re: HOW DO I DO A COUNT ON PT ID [message #330174 is a reply to message #330173] Fri, 27 June 2008 15:16 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above
Re: HOW DO I DO A COUNT ON PT ID [message #330175 is a reply to message #330174] Fri, 27 June 2008 15:25 Go to previous messageGo to next message
LOgle0917
Messages: 10
Registered: February 2008
Location: Tennessee
Junior Member
I put in my question that I use Windows XP, I am actually using Web Focus 7.6.2 Sql Editor, Is there something else I left off? Not sure why the previous email was sent to me I was not rude in my question. Caps were on because I was typing my code in all caps and it was just easier to leave them on. Can I please have an answer to my question? Thanks!
Re: HOW DO I DO A COUNT ON PT ID [message #330176 is a reply to message #330173] Fri, 27 June 2008 15:35 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
You can have it: Fast, Right or Cheap, pick 2 of the 3.
Fast + Right is Expensive
Fast + Cheap will be incorrect.
Right + Cheap will take a while.

By the way, exactly what is "A PT COUNT"?
Re: HOW DO I DO A COUNT ON PT ID [message #330178 is a reply to message #330176] Fri, 27 June 2008 15:43 Go to previous messageGo to next message
LOgle0917
Messages: 10
Registered: February 2008
Location: Tennessee
Junior Member
So then is it going to cost on this site to get an answer? Pt Count is Patient Count I need the total number of patients normally I can get that by doing a count all on pt number in Business Objects but I am trying to redo the report in Sql and not sure how to do the count. Anyway, if it does cost I can't choose any, I am so broke I'm bent. If that is the case I will try to find a forum that can help me minus the money.

Thanks!
Re: HOW DO I DO A COUNT ON PT ID [message #330181 is a reply to message #330173] Fri, 27 June 2008 16:00 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>Pt Count is Patient Count
Not exactly intuitively obvious to a casual observer.

OK, I give up.
What is the relationship between the SQL orginally posted & patient count?
Re: HOW DO I DO A COUNT ON PT ID [message #330182 is a reply to message #330181] Fri, 27 June 2008 16:06 Go to previous messageGo to next message
LOgle0917
Messages: 10
Registered: February 2008
Location: Tennessee
Junior Member
The SQL Script originally typed works, meaning it brings up all my column and row information. But I need the total count on the Pat_NBR Column. All I was trying to do was find out how to take the same script and add to the code to get a Total Count on Patient Number. I will try another site it is much to complicated to ask a question here. Sorry to have wasted your time.

Thanks!
Re: HOW DO I DO A COUNT ON PT ID [message #330185 is a reply to message #330173] Fri, 27 June 2008 16:15 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
I apologize for the fact that my mind reading skills are deficient,
but I contend that your skills to clearly state the problem & desired results could be improved too.
Re: HOW DO I DO A COUNT ON PT ID [message #330187 is a reply to message #330185] Fri, 27 June 2008 16:34 Go to previous messageGo to next message
registereduser
Messages: 52
Registered: June 2008
Location: Toronto
Member
Are you talking about count(*)?
Re: HOW DO I DO A COUNT ON PT ID [message #330192 is a reply to message #330185] Fri, 27 June 2008 18:40 Go to previous message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
to anacedent:
thanks guy, i learned again something from your english =)

http://dictionary.reference.com/search?q=contend
Previous Topic: one-time-only Procedure
Next Topic: Calculating absent days
Goto Forum:
  


Current Time: Thu Dec 08 18:40:03 CST 2016

Total time taken to generate the page: 0.08088 seconds