select TO_TIMESTAMP(vr,'dd/mm/yyyy hh24:mi:ss') as v1,text,tim,ris,podp,nazv,sodr,url,url_nam,cat,cun, c_name, c_prf from (select lang,text || ' ' || tim as vr,ris,podp,nazv,sodr,url,url_nam,text,tim,cat,cun, c_name, c_prf from( (select cun, cat,lang,lnk from (select id_cuc as id,utl_raw.cast_to_varchar2(cuc_value) as cat,id_cun as cun,id_lang as lang,id_cuc_lnk as lnk from rusitc.CUC where (id_cun in (select id_cun from rusitc.cun where id_us=2048 and cun_transltd=1 and cun_descript<>'delete')and id_sgn=1705)) where cat='G' or cat='M') a left join (select utl_raw.cast_to_varchar2(cuc_value) as text,ID_cuc_lnk as lnk from rusitc.CUC where id_cun in (select id_cun from rusitc.cun where id_us=2047) and cuc_transltd='0'and id_sgn=329) b on a.lnk=b.lnk left join (select utl_raw.cast_to_varchar2(cuc_value) as tim,ID_cuc_lnk as lnk from rusitc.CUC where id_cun in (select id_cun from rusitc.cun where id_us=2047) and cuc_transltd='0'and id_sgn=1554) c on a.lnk=c.lnk left join (select utl_raw.cast_to_varchar2(cuc_value) as ris,ID_cuc_lnk as lnk from rusitc.CUC where id_cun in (select id_cun from rusitc.cun where id_us=2047) and cuc_transltd='0'and id_sgn=821) d on a.lnk=d.lnk left join (select podp,cun2 from (select utl_raw.cast_to_varchar2(cuc_value) as podp,id_cun as cun2 from rusitc.CUC where (id_cun in (select id_cun from rusitc.cun where id_us=2048)and id_sgn=682))) e on a.cun=e.cun2 left join (select nazv,cun2 from (select utl_raw.cast_to_varchar2(cuc_value) as nazv,id_cun as cun2 from rusitc.CUC where (id_cun in (select id_cun from rusitc.cun where id_us=2048)and id_sgn=332))) f on a.cun=f.cun2 left join (select sodr,cun2 from (select utl_raw.cast_to_varchar2(cuc_value) as sodr,id_cun as cun2 from rusitc.CUC where (id_cun in (select id_cun from rusitc.cun where id_us=2048)and id_sgn=3258))) g on a.cun=g.cun2 left join (select utl_raw.cast_to_varchar2(cuc_value) as url,ID_cuc_lnk as lnk from rusitc.CUC where id_cun in (select id_cun from rusitc.cun where id_us=2047) and cuc_transltd='0'and id_sgn=1604) h on a.lnk=h.lnk left join (select url_nam,cun2 from (select utl_raw.cast_to_varchar2(cuc_value) as url_nam,id_cun as cun2 from rusitc.CUC where (id_cun in (select id_cun from rusitc.cun where id_us=2048)and id_sgn=1603)) ) k on a.cun=k.cun2 left join (select id_cun, id_cunpar as id_cat from rusitc.enc where id_cunpar in (select id_cun from rusitc.cun where id_us=? )) encc on a.cun=encc.id_cun left join (select id_cun, cun_name as c_name, cun_descript as c_prf from rusitc.cun where id_us=?) cn on id_cat=cn.id_cun)where lang=?) where cun in (select id_cun from rusitc.ENC where id_cunpar=?) ORDER BY v1 DESC, cat asc
select ns, cun, vr, date_r, ris, podp, nazv, sodr,url,url_nam, time_r from (select rownum as ns, cun, vr, date_r, ris, podp, nazv, sodr,url,url_nam, time_r from (select cun, TO_TIMESTAMP(date_r || ' ' || time_r,'dd/mm/yyyy hh24:mi:ss') as vr, date_r, ris, podp, nazv, sodr,url,url_nam, time_r from (select id_cuc as id,utl_raw.cast_to_varchar2(cuc_value) as cat,id_cun as cun,id_lang as lang,id_cuc_lnk as lnk from rusitc.CUC where (id_cun in (select id_cun as n_id from rusitc.cun where id_us=2048 and cun_transltd=1) and id_sgn=1705)) a left join (select utl_raw.cast_to_varchar2(cuc_value) as date_r,id_cuc_lnk from rusitc.CUC where id_sgn=329) b on lnk=b.id_cuc_lnk left join (select id_cuc_lnk, utl_raw.cast_to_varchar2(cuc_value) as time_r from rusitc.CUC where id_sgn=1554) t on t.id_cuc_lnk=lnk left join (select utl_raw.cast_to_varchar2(cuc_value) as ris,ID_cuc_lnk as lnk from rusitc.CUC where id_sgn=1482) d on a.lnk=d.lnk left join (select utl_raw.cast_to_varchar2(cuc_value) as podp, id_cun from rusitc.CUC where id_sgn=682) e on a.cun=e.id_cun left join (select utl_raw.cast_to_varchar2(cuc_value) as nazv,id_cun from rusitc.CUC where id_sgn=332) f on a.cun=f.id_cun left join (select utl_raw.cast_to_varchar2(cuc_value) as sodr,id_cun as cun2 from rusitc.CUC where id_sgn=3258) g on a.cun=g.cun2 left join (select utl_raw.cast_to_varchar2(cuc_value) as url,ID_cuc_lnk as lnk from rusitc.CUC where id_sgn=1604) h on a.lnk=h.lnk left join (select utl_raw.cast_to_varchar2(cuc_value) as url_nam,id_cun as cun2 from rusitc.CUC where id_sgn=1603) k on a.cun=k.cun2 where date_r is not null and cun in (select id_cun from rusitc.ENC where id_cunpar=?) order by vr desc)) where ns>? and ns<=?
Кэш id=4681e9beaa29ea0c8c922faa404e034d, Время создания кэша:18/03/2016 16:00:51.701, Время обновления:25/03/2016 16:00:51.701