JorgeLedo
Feb 3rd, 2000, 07:09 AM
I'm :confused: ,
I'm making a DB app to an hospital and there is a question that is intrigging me.
I've to make a report (currently using Crystal RDC 6.0) with the amount of exams (severall kinds of exams) made by a department. The DB only gives me the exams by patient so I've to make an SQL like:
SQL = "Select * from tableX WHERE exam = '" & examKind & "' AND department = '" & departmentName & "'"
There are many kinds of exams so I need to do serveral re-calls of that SQL (it takes me to long. Is there an easy way ? I've tried:
SQL = "SELECT * from tablex WHERE department = '" & departmentName & "'"
and from there count record by record (rs.movenext) the kind of exam and add it to an array. TOO SLOW ...
Is there a simpler way ?
I know that every time in the past something like this appened to me there was allways a simpler way...
Thank in advance,
------------------
Jorge Ledo
j_ledo@hotmail.com
Portugal
I'm making a DB app to an hospital and there is a question that is intrigging me.
I've to make a report (currently using Crystal RDC 6.0) with the amount of exams (severall kinds of exams) made by a department. The DB only gives me the exams by patient so I've to make an SQL like:
SQL = "Select * from tableX WHERE exam = '" & examKind & "' AND department = '" & departmentName & "'"
There are many kinds of exams so I need to do serveral re-calls of that SQL (it takes me to long. Is there an easy way ? I've tried:
SQL = "SELECT * from tablex WHERE department = '" & departmentName & "'"
and from there count record by record (rs.movenext) the kind of exam and add it to an array. TOO SLOW ...
Is there a simpler way ?
I know that every time in the past something like this appened to me there was allways a simpler way...
Thank in advance,
------------------
Jorge Ledo
j_ledo@hotmail.com
Portugal