```select (select d.dept_name
from com_department d
where d.dept_code = o.drug_dept_code) 药房名称,
o.drug_code 药品编码,
o.trade_name 药品名,
(select b.regular_name
from pha_com_baseinfo b
where b.drug_code = o.drug_code) 曾用名,
(select d.name
from com_dictionary d
where d.type = 'ITEMTYPE'
and d.code = o.drug_type) 药品类别,
(select d.name
from com_dictionary d
where d.type = 'DRUGQUALITY'
and d.code = b.drug_quality) 药品性质,
o.specs 规格,
(select c.fac_name
from pha_com_company c
where c.fac_code = b.producer_code
and c.company_type = '0'
and c.valid_flag = fun_get_valid) 生产厂家,
sum(o.out_num) 数量1,
nvl(o.min_unit, b.min_unit) 单位,
o.retail_price 零售金额,
sum(o.SALE_COST) 金额,
(select nvl(e.empl_name, '')
from com_employee e
where e.empl_code = :OperCode
and e.valid_state = fun_get_valid) 操作员,
b.spell_code 通用名拼音,
b.regular_spell 商品名拼音 ,
b.custom_code 自定义码,
decode(b.special_flag1,'1','是','否') as 是否基本药物,
decode(b.special_flag,'1','是','否') as 是否是省基本药物
from pha_com_output o, pha_com_baseinfo b
where o.drug_code = b.drug_code
and (o.drug_dept_code = :dept or 'ALL' = :dept)
and o.oper_date > :from_date
and o.oper_date <= :to_date
and (o.drug_type = :drugType or 'ALL' = :drugType)
and (b.drug_quality = :quality or 'ALL' = :quality)
and o.out_type in('Z1','Z2','M1','M1')
group by o.drug_code,
o.drug_dept_code,
o.trade_name,
o.drug_code,
o.drug_type,
o.min_unit,
b.drug_quality,
o.specs,
b.producer_code,
o.retail_price,
o.pack_qty,
b.min_unit,
b.spell_code,
b.regular_spell,
b.custom_code,
b.special_flag1,
b.special_flag
:OperCode = '0'
:dept = 'A'
:from_date = '2020-02-09 15:57:06'
:to_date = '2023-02-09 15:57:06'
:drugType = 'A'
:quality = 'A'
```sql
plsql15冒号部分提示ORA-00933:SQL命令未正确结束。
这里的语句存在问题,请确认是否必须,非必须直接删除,即可运行
这些是什么啊,都连接不上前边的sql