extracted objects
This commit is contained in:
38
docs/views/GET_PREL_BY_EVT.md
Normal file
38
docs/views/GET_PREL_BY_EVT.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# GET_PREL_BY_EVT
|
||||
|
||||
## Colonne
|
||||
|
||||
| Colonna | Tipo |
|
||||
|---------|------|
|
||||
| ID_EVENTO | NUMBER |
|
||||
| COD_TIPO | VARCHAR2(10) |
|
||||
| DESCRIZIONE_TIPO | VARCHAR2(1000) |
|
||||
| COD_CATEG | VARCHAR2(10) |
|
||||
| DESCRIZIONE_CATEGORIA | VARCHAR2(1000) |
|
||||
| COD_RELATIVO | VARCHAR2(10) |
|
||||
| COD_ARTICOLO | VARCHAR2(10) |
|
||||
| DESCRIZIONE_ARTICOLO | VARCHAR2(4000) |
|
||||
| ORDINE | NUMBER |
|
||||
|
||||
## Definizione
|
||||
|
||||
```sql
|
||||
CREATE OR REPLACE VIEW GET_PREL_BY_EVT AS
|
||||
select
|
||||
e.id as id_evento,
|
||||
m.cod_tipo,
|
||||
m.descrizione as descrizione_tipo,
|
||||
a.cod_categ,
|
||||
g.descrizione as descrizione_categoria,
|
||||
a.cod_relativo,
|
||||
a.cod_articolo,
|
||||
trim(a.descrizione) || ' - ' || trim(d.note) as descrizione_articolo,
|
||||
d.ordine
|
||||
from eventi e
|
||||
join eventi_det_prel d on e.id = d.id_evento
|
||||
join articoli a on a.cod_articolo = d.cod_articolo
|
||||
join tb_codici_categ g on g.cod_categ = a.cod_categ
|
||||
join tb_tipi_mat m on m.cod_tipo = g.cod_tipo
|
||||
where g.show_print = 1
|
||||
order by d.ordine
|
||||
```
|
||||
Reference in New Issue
Block a user