See PresenceDetails: Presence Code Lookup Data
CREATE VIEW vwpresencedetails AS (
SELECT pd.id,
pd.systempresence,
pd.orgpresence,
pd.deactivated,
pd.type,
CASE
WHEN ((pd.divisionid)::text = '*'::text) THEN dd.id
ELSE pd.divisionid
END AS divisionid
FROM (presencedetails pd
LEFT JOIN divisiondetails dd ON (((pd.divisionid)::text = '*'::text)))
)
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
id | varchar(50) | true | Primary Key | |||
systempresence | varchar(255) | true | Presence System Presence Name | |||
orgpresence | varchar(255) | true | Presence Organisation Presence Name | |||
deactivated | bit(1) | true | Presence Active ? | |||
type | varchar(50) | true | Presence Type | |||
divisionid | varchar(50) | true | Presence Division ID |
Name | Columns | Comment | Type |
---|---|---|---|
public.presencedetails | 7 | Persence Code Lookup Data | BASE TABLE |
public.divisiondetails | 4 | BASE TABLE |