1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| CREATE OR REPLACE VIEW VIEW1 ( INSCRI,
YEAR_ID, LNAME, FNAME, CODE,
GENDER, BIRTHDAY, NAME, ID,
FAC, RESPONSIBLE, TITLE, AVERAGE,
OBSERVATION, MARKS_SESSION, AN, CODE_MAT,
MATIERE, TITRE, SC_L, SC_F,
ADDRESS, BEN_COEF, PERIODE, DIP,
CODE_POSTAL, REGION, NAME_1 ) AS SELECT DISTINCT
i."ID" inscri, i."YEAR_ID",
s."LNAME", s."FNAME", s."CODE", s."GENDER", s."BIRTHDAY",
c."NAME",
e."ID", e."NAME" fac, e."RESPONSIBLE", e."TITLE",
m."AVERAGE", m."OBSERVATION", m."MARKS_SESSION",
y."NAME" an,
be."CODE" code_mat, be."NAME" matiere,
sc."TITLE" titre, sc."LNAME" sc_l, sc."FNAME" sc_f, sc."ADDRESS",
sm."BEN_COEF",
pe."CODE" periode,
d."NAME"dip ,
p."CODE" code_postal, p."NAME" region,
e2."NAME" name_1
FROM
inscription i, marks_det m, student_marks sm, student s , std_contact sc, benefit be, clas c, class_type ct, entities e, entities e1, entities e2, diploma d , postal_code p , period pe , year y, studies st
WHERE
m.inscription_id=i.id and sm.id=m.student_marks_id and s.id=i.student_id and be.id =m.ben_id and i.clas_id=c.id and c.class_type_id=ct.id and e1.id=ct.entity_id and e1.entity_id=e2.id and e.id=i.entity_id and st.id=m.studies_id and d.id(+)=ct.diplom_id and pe.code =m.periode_id and i.year_id =y.id and st.period_code=m.periode_id and s.id=sc.student_id(+) and sc.relation='T' and p.id(+)=sc.pc_id and i.year_id=2007 and s.code = 200750330 |
Partager