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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| select distinct
code_famille AS code ,
null as label,
0 as active ,
0 as demonstration,
0 as possible_trial,
0 as generate_coupon ,
0 as multi_order,
999999 as gamme_idfk,
'UNKNOW' as politique_resiliation,
'UNKNOW' as politique_migration_ascendante,
'UNKNOW' as politique_migration_descendante,
null as mail_template,
null as creation_date,
null as desactivation_date,
45 as grace_period,
15 as duree_de_vie_commande,
null as descriptif_commercial ,
0 as besoin_signature,
null as condition_trial,
null as short_label,
null as ordre,
'XXX' as system,
0 as integrated_base_price,
0 as integrate_isp,
0 as install_incluse,
date_insert_ods AS ladatedujour
from les_services
where code_famille not in (select code
from offres_du_catalogue)
and libelle not like '%test%'
UNION
select distinct code ,
label,
active,
demonstration,
possible_trial,
generate_coupon ,
multi_order,
gamme_idfk,
politique_resiliation,
politique_migration_ascendante,
politique_migration_descendante,
mail_template,
creation_date,
desactivation_date,
grace_period,
duree_de_vie_commande,
descriptif_commercial ,
besoin_signature,
condition_trial,
short_label,
ordre,
system,
integrated_base_price,
integrate_isp,
install_incluse,
now() as ladatedujour
from offres_du_catalogue
where label not like '%test%'
order by gamme_idfk asc ; |
Partager