Datadictionary OpenWave 3.1.11
Previous topic Chapter index Next topic

View: vwbi_handhcontactadressen

 

 

Schema

public

 

Owner

waveuser005

 

Descriptions

View van alle contactadressen van de tabel tbcontactadressen die verbonden zijn aan een handhavingszaak. In de kolom dvcodeadressoort staat in welke rol zij verbonden zijn, bijvoorbeeld als primaire contactpersoon en/of klager etcetera.

 

Fields

Name

Data type

Description

dnkeyhandhavingen

integer

De primary key van de handhavingszaak waaraan het contactadres is verbonden. Zie vwbi_handhaving.dnkey. Voorbeeld: 2345678

dvcodeadressoort

char(3)

De codering van de rol die het adres speelt bij de handhaving. Voorbeeld: HPC of EIG of KLA etctera

dvomsadressoort

varchar(30)

De omschrijving van de rol. Voorbeeld: Handhaving primaire contactpersoon, eingenaar of klager etcetera

dnkeycontactadressen

integer

De primary key van het contactadres. Voorbeeld: 23456

dvbriefaanhef

varchar(50)

Briefaanhef. Voorbeeld: Geachte mevrouw Van Gelder

dvbedrijf

varchar(200)

Bedrijfsnaam. Voorbeeld: Architectenbureau Wouters

dvvoorletters

varchar(10)

Voorletters. Voorbeeld: T.J.

dvvoorvoegsel

varchar(10)

Voorvoegsel. Voorbeeld: van

dvachternaam

varchar(200)

Achternaam. Voorbeeld: Gelder

dvtav

varchar(238)

t.a.v. Voorbeeld: Mevrouw T.J. van Gelder

dvhuisnummer

varchar(5)

Huisnummer. Voorbeeld: 17

dvhuisletter

char(1)

Huisletter. Voorbeeld: b

dvhuisnummertoevoeging

varchar(4)

Huisnrtoevoeging. Voorbeeld: -III

dvstraatnaam

varchar(80)

Straatnaam. Voorbeeld: Steenstraat

dvpostcode

varchar(10)

Postcode. Voorbeeld: 1087 HJ

dvwoonplaats

varchar(80)

Woonplaats. Voorbeeld: Amsterdam

dvbsn

varchar(10)

BSN-nummer. Voorbeeld: 123456789

dvbin

varchar(10)

KvK-nummer (8-cijferig) uit het handelsregister

dvemail

varchar(320)

Email. Voorbeeld: msnelders@rem.nl

dvtav2

varchar(238)

t.a.v. met de heer of mevrouw zonder hoofdletter. Voorbeeld: mevrouw T.J. van Gelder

dvtav3

varchar(440)

t.a.v. met eventuele bedrijfsnaam met de heer of mevrouw zonder hoofdletter. Voorbeeld: Architectenbureau Wouters, mevrouw T.J. van Gelder

 

Rules

Name

Event

Instead

Condition

Description

_RETURN

SELECT

 

 

 

Definition

CREATE VIEW public.vwbi_handhcontactadressen (
   dnkeyhandhavingen,
   dvcodeadressoort,
   dvomsadressoort,
   dnkeycontactadressen,
   dvbriefaanhef,
   dvbedrijf,
   dvvoorletters,
   dvvoorvoegsel,
   dvachternaam,
   dvtav,
   dvhuisnummer,
   dvhuisletter,
   dvhuisnummertoevoeging,
   dvstraatnaam,
   dvpostcode,
   dvwoonplaats,
   dvbsn,
   dvbin,
   dvemail,
   dvtav2,
   dvtav3)
AS
SELECT
tbhandhcontactennn.dnkeyhandhavingen,
   tbhandhcontactennn.dvcodeadressoort,
   tbadressoort.dvomschrijving AS dvomsadressoort,
   tbcontactadressen.dnkey AS dnkeycontactadressen,
   tbcontactadressen.dvbriefaanhef,
   tbcontactadressen.dvbedrijfsnaam AS dvbedrijf,
   tbcontactadressen.dvvoorletters, tbcontactadressen.dvvoorvoegsel,
   tbcontactadressen.dvachternaam,
   
((((
       CASE
           WHEN
tbcontactadressen.dvgeslacht = 'M'::bpchar THEN 'De heer'::text
           WHEN tbcontactadressen.dvgeslacht = 'V'::bpchar THEN 'Mevrouw'::text
           ELSE 'De heer/mevrouw'::text
       END ||
       CASE
           WHEN
tbcontactadressen.dvvoorletters IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvvoorletters::text)
           ELSE ''::text
       END) ||
       CASE
           WHEN
tbcontactadressen.dvvoorvoegsel IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvvoorvoegsel::text)
           ELSE ''::text
       END) ||
       CASE
           WHEN
tbcontactadressen.dvachternaam IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvachternaam::text)
           ELSE ''::text
       END))::character varying(238) AS dvtav,
   tbcontactadressen.dvhuisnummer, tbcontactadressen.dvhuisletter,
   tbcontactadressen.dvhuisnummertoevoeging, tbcontactadressen.dvstraatnaam,
   tbcontactadressen.dvpostcode,
   tbcontactadressen.dvwoonplaatsnaam AS dvwoonplaats,
   tbcontactadressen.dvsofinummer AS dvbsn, tbcontactadressen.dvbin,
   tbcontactadressen.dvemail,
   
((((
       CASE
           WHEN
tbcontactadressen.dvgeslacht = 'M'::bpchar THEN 'de heer'::text
           WHEN tbcontactadressen.dvgeslacht = 'V'::bpchar THEN 'mevrouw'::text
           ELSE 'de heer/mevrouw'::text
       END ||
       CASE
           WHEN
tbcontactadressen.dvvoorletters IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvvoorletters::text)
           ELSE ''::text
       END) ||
       CASE
           WHEN
tbcontactadressen.dvvoorvoegsel IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvvoorvoegsel::text)
           ELSE ''::text
       END) ||
       CASE
           WHEN
tbcontactadressen.dvachternaam IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvachternaam::text)
           ELSE ''::text
       END))::character varying(238) AS dvtav2,
   
((((
       CASE
           WHEN
rtrim(tbcontactadressen.dvbedrijfsnaam::text) IS NOT NULL AND
               rtrim(tbcontactadressen.dvachternaam::text) IS NULL THEN tbcontactadressen.dvbedrijfsnaam::text
           WHEN tbcontactadressen.dvgeslacht = 'M'::bpchar THEN
           CASE
               WHEN
rtrim(tbcontactadressen.dvbedrijfsnaam::text) IS NULL THEN ''::text
               ELSE tbcontactadressen.dvbedrijfsnaam::text || ', '::text
           END || 'de heer'::text
           WHEN tbcontactadressen.dvgeslacht = 'V'::bpchar THEN
           CASE
               WHEN
rtrim(tbcontactadressen.dvbedrijfsnaam::text) IS NULL THEN ''::text
               ELSE tbcontactadressen.dvbedrijfsnaam::text || ', '::text
           END || 'mevrouw'::text
           ELSE
           CASE
               WHEN
rtrim(tbcontactadressen.dvbedrijfsnaam::text) IS NULL THEN ''::text
               ELSE tbcontactadressen.dvbedrijfsnaam::text || ', '::text
           END || 'de heer/mevrouw'::text
       END ||
       CASE
           WHEN
tbcontactadressen.dvvoorletters IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvvoorletters::text)
           ELSE ''::text
       END) ||
       CASE
           WHEN
tbcontactadressen.dvvoorvoegsel IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvvoorvoegsel::text)
           ELSE ''::text
       END) ||
       CASE
           WHEN
tbcontactadressen.dvachternaam IS NOT NULL THEN
               rtrim(' '::text || tbcontactadressen.dvachternaam::text)
           ELSE ''::text
       END))::character varying(440) AS dvtav3
FROM tbhandhcontactennn
  JOIN tbcontactadressen ON tbhandhcontactennn.dnkeycontactadressen =
      tbcontactadressen.dnkey
  JOIN tbadressoort ON tbhandhcontactennn.dvcodeadressoort = tbadressoort.dvcode;

COMMENT ON VIEW public.vwbi_handhcontactadressen
IS 'View van alle contactadressen van de tabel tbcontactadressen die verbonden zijn aan een handhavingszaak. In de kolom dvcodeadressoort staat in welke rol zij verbonden zijn, bijvoorbeeld als primaire contactpersoon en/of klager etcetera.';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dnkeyhandhavingen
IS 'De primary key van de handhavingszaak waaraan het contactadres is verbonden. Zie vwbi_handhaving.dnkey. Voorbeeld: 2345678';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvcodeadressoort
IS 'De codering van de rol die het adres speelt bij de handhaving. Voorbeeld: HPC of EIG of KLA etctera';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvomsadressoort
IS 'De omschrijving van de rol. Voorbeeld: Handhaving primaire contactpersoon, eingenaar of klager etcetera';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dnkeycontactadressen
IS 'De primary key van het contactadres. Voorbeeld: 23456';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvbriefaanhef
IS 'Briefaanhef. Voorbeeld: Geachte mevrouw Van Gelder';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvbedrijf
IS 'Bedrijfsnaam. Voorbeeld: Architectenbureau Wouters';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvvoorletters
IS 'Voorletters. Voorbeeld: T.J.';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvvoorvoegsel
IS 'Voorvoegsel. Voorbeeld: van';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvachternaam
IS 'Achternaam. Voorbeeld: Gelder';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvtav
IS 't.a.v. Voorbeeld: Mevrouw T.J. van Gelder';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvhuisnummer
IS 'Huisnummer. Voorbeeld: 17';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvhuisletter
IS 'Huisletter. Voorbeeld: b';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvhuisnummertoevoeging
IS 'Huisnrtoevoeging. Voorbeeld: -III';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvstraatnaam
IS 'Straatnaam. Voorbeeld: Steenstraat';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvpostcode
IS 'Postcode. Voorbeeld: 1087 HJ';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvwoonplaats
IS 'Woonplaats. Voorbeeld: Amsterdam';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvbsn
IS 'BSN-nummer. Voorbeeld: 123456789';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvbin
IS 'KvK-nummer (8-cijferig) uit het handelsregister';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvemail
IS 'Email. Voorbeeld: msnelders@rem.nl';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvtav2
IS 't.a.v. met de heer of mevrouw zonder hoofdletter. Voorbeeld: mevrouw T.J. van Gelder';

COMMENT ON COLUMN public.vwbi_handhcontactadressen.dvtav3
IS 't.a.v. met eventuele bedrijfsnaam met de heer of mevrouw zonder hoofdletter. Voorbeeld: Architectenbureau Wouters, mevrouw T.J. van Gelder';

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 22-2-2017 10:50
Previous topic Chapter index Next topic