77 lines
1.7 KiB
SQL
77 lines
1.7 KiB
SQL
---------------------------------------------------------
|
|
-- Viewuri pentru ROAOFERTA v 1.0.0 --
|
|
-- Created by marius.atanasiu on 4/05/2006, 9:15:00 AM --
|
|
---------------------------------------------------------
|
|
|
|
spool viewuri.log
|
|
|
|
|
|
|
|
prompt
|
|
prompt Creating view CRM_VPOLITICI_PRETURI
|
|
prompt ===================================
|
|
prompt
|
|
create or replace view crm_vpolitici_preturi as
|
|
select a.id_pol,
|
|
a.nume,
|
|
a.datai,
|
|
a.datas,
|
|
a.id_valuta,
|
|
a.id_util,
|
|
a.dataora,
|
|
b.nume_val,
|
|
c.utilizator
|
|
from crm_politici_preturi a
|
|
left join nom_valute b on a.id_valuta=b.ID_VALUTA
|
|
left join syn_utilizatori c on a.id_util=c.id_util
|
|
where a.sters=0
|
|
/
|
|
|
|
prompt
|
|
prompt Creating view CRM_VPOLITICI_PRET_ART
|
|
prompt ====================================
|
|
prompt
|
|
create or replace view crm_vpolitici_pret_art as
|
|
select a.id_pol_art,
|
|
a.id_pol,
|
|
a.id_art,
|
|
a.pret,
|
|
a.um,
|
|
a.id_valuta,
|
|
a.id_util,
|
|
a.dataora,
|
|
b.denumire as nume_articol,
|
|
b.codmat,
|
|
c.nume_val,
|
|
d.utilizator
|
|
from crm_politici_pret_art a
|
|
left join nom_articole b on a.id_art = b.id_articol
|
|
left join nom_valute c on a.id_valuta = c.id_valuta
|
|
left join syn_utilizatori d on a.id_util = d.id_util
|
|
where a.sters = 0
|
|
/
|
|
|
|
|
|
prompt
|
|
prompt Creating view VNOM_ARTICOLE_CRM
|
|
prompt ===============================
|
|
prompt
|
|
create or replace view vnom_articole_crm as
|
|
select A.ID_ARTICOL,
|
|
A.CODMAT,
|
|
A.DENUMIRE,
|
|
A.UM,
|
|
A.COMISION,
|
|
A.INACTIV,
|
|
A.CODBARE,
|
|
A.IN_STOC,
|
|
A.IN_CRM,
|
|
A.ID_CATEG,
|
|
C.DENUMIRE AS DEN_CATEG
|
|
from NOM_ARTICOLE A
|
|
JOIN VCRM_CATEG_ARTICOLE C ON C.ID_CATEG = A.ID_CATEG
|
|
where A.STERS = 0
|
|
and in_crm = 1
|
|
/
|
|
|
|
spool off; |