entity_net_temp.sql 773 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
-- Query which generated the table contact_temp used in the
-- creation step of the simmctic database
-- for details check simmctic/database/create/data/003-load_data_entity.sql
-- and simmctic/database/create/data/entity_net_temp.csv
-- WARNING: Some telecenters were inserted without id_onid. Such telecenters
-- cannot be identifyed unically (without id_point) and are removed of this
-- query.


10
COPY(
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
SELECT
    c.city_code
    , e.access_point_id
    , e.access_point_type
    , en.net
    , en.gateway
    , en.service_vlan
    , en.service_name
FROM
    point p
    INNER JOIN entity e ON p.id = e.id_point
    INNER JOIN city c ON p.id_city = c.id
    INNER JOIN entity_net en ON p.id = en.id_point
WHERE
    p.is_active
26
) TO STDOUT WITH CSV HEADER DELIMITER ';';