问题sql语句:
select distinct pa.class_id from prod_class As pa,prod_class As pb,sale_area where pb.class_id in(select sale_area.class_id from sale_area where sale_area.gonghao=<param>) and pa.class_id like pb.class_id||'%'
with temp_class_id( class_id,class_name)
(
select pc.class_id,pc.class_name from prod_class pc
where pc.class_id in (select sale_area.class_id from sale_area
where sale_area.gonghao=<param>)
union
select pc.class_id,pc.class_name from prod_class pc,
temp_class_id tc
where pc.parent_id = tc.class_id)
select * from temp_class_id;