View: office.office_scrud_view
Schema | office |
Materialized View Name | office_scrud_view |
Owner | postgres |
Tablespace | DEFAULT |
Description | |
CREATE OR REPLACE VIEW office.office_scrud_view
AS
SELECT offices.office_id,
offices.office_code,
offices.office_name,
offices.nick_name,
offices.registration_date,
((currencies.currency_code::text || '('::text) || currencies.currency_name::text) || ')'::text AS currency,
offices.po_box,
offices.address_line_1,
offices.address_line_2,
offices.street,
offices.city,
offices.state,
offices.zip_code,
offices.country,
offices.phone,
offices.fax,
offices.email,
offices.url,
offices.registration_number,
((parent_office.office_code::text || '('::text) || parent_office.office_name::text) || ')'::text AS parent_office
FROM office.offices
JOIN core.currencies ON offices.currency_code::text = currencies.currency_code::text
LEFT JOIN office.offices parent_office ON offices.parent_office_id = parent_office.parent_office_id;