minori

6 views
Skip to first unread message

Ene Toma - ORCTDB

unread,
Jun 2, 2015, 7:55:43 AM6/2/15
to onr...@googlegroups.com


select cui,cod_inmatriculare codj,persoana.cod cnp,
                                      nvl(persoana_fizica.data_nastere, to_date('27-05-1600','dd-mm-yyyy')) datn,  
                                      nvl(persoana.denumire, ' ') nume, round(actionar.coef_particip_beneficii,2) vcoef, substr(n_sex.descriere,1,10) vsex,
                                      nvl(persoana_fizica.loc_nastere,' ') locn, substr(firma.denumire,1,100) denfirma
                               from persoana,actionar_persoana,actionar,firma,persoana_fizica,n_sex
                               where firma.id=actionar.id_firma
                                    and actionar.id=actionar_persoana.id(+)
                                    and actionar_persoana.id_persoana_asoc=persoana.id
                                    and actionar_persoana.id_persoana_asoc=persoana_fizica.id(+)
                                    and persoana_fizica.sex=n_sex.id(+)                         
                                    and not exists(select 1 from stare_firma,n_stare_firma
                                                         where stare_firma.id_firma=firma.id
                                                               and stare_firma.id_stare_firma=n_stare_firma.id
                                                               and n_stare_firma.cod = 1084 )
and trunc((to_number(to_char(sysdate,'yyyymmdd'))-to_number(to_char(nvl(persoana_fizica.data_nastere, to_date('1600-05-27','yyyy-mm-dd')),'yyyymmdd')))/10000) < 18                                                               
                               order by cnp
Reply all
Reply to author
Forward
0 new messages