hello!
I was pointed to this forum after posting in an SQL one by mistake...hope I am in the right place now...
I am using Oracle 8i and am having a problem with an SQL query I wrote to be used in Crystal Reports 9...
The error message that I am getting is Oracle error: 'ORA-00920' which I think means that I have an invalid operator somewhere...unfortunately I can not find it...any help would be appreciated!
Thanks again for any help you can provide!
Boni

Boni J. Rychener
Hammerman Associates, Inc.
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
800-783-2269
I was pointed to this forum after posting in an SQL one by mistake...hope I am in the right place now...
I am using Oracle 8i and am having a problem with an SQL query I wrote to be used in Crystal Reports 9...
The error message that I am getting is Oracle error: 'ORA-00920' which I think means that I have an invalid operator somewhere...unfortunately I can not find it...any help would be appreciated!
Code:
select
ch.company_id company,
substr(phys.last_name || ', ' || phys.first_name,1,25) physician,
phys.short_name physician_short,
phys.phys_id physician_idnum,
substr(p.last_name || ', ' || p.first_name,1,25) patient ,
p.patient_number pat_num,
substr(f.last_name || ', ' || f.first_name,1,25) guarantor,
'CHG' type,
ch.post_fromdate dos,
substr(substr(cp.procedure_code,1,5) || ch.Proc_modifier,1,9) cpt,
cp.proc_desc description,
ch.charge_amount charge_amount,
ch.remain_amount remain_amount,
ch.Date_entered entered,
substr(wu.last_name || ', ' || wu.first_name,1,20) user_name,
fc.description fin_class,
'1' transtype
from patient p, physician phys,family f, charge_history ch,
company_procedure cp,westland_user wu,financial_class fc
where ch.company_id = {?Company}
and {?DateRangeType} >= {?StartDate}
and {?DateRangeType} < ( {?EndDate} + 1)
and cp.procedure_id = ch.procedure_id
and phys.phys_id = ch.physician_id
and p.patient_id = ch.patient_id
and p.active_yn = 'Y'
and p.company_id = ch.company_id
and f.family_id = p.family_id
and f.company_id = p.company_id
and wu.user_id = ch.Last_mod_user_id
and fc.financial_class_id = ch.financial_class_id_1
order by physician, patient,pat_num,dos,transtype
Boni

Boni J. Rychener
Hammerman Associates, Inc.
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
800-783-2269