Skip to content

Commit

Permalink
Simplified username in parent user accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
neurotech committed Mar 3, 2017
1 parent a5a35fd commit 646a75c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sql/_views/view_parent_user_accounts.sql
Expand Up @@ -244,10 +244,7 @@ all_carers_unique_flag AS (
all_carers_usernames AS (
SELECT
all_carers_unique_flag.carer_contact_id,
(CASE
WHEN sys_user.username IS NOT null THEN sys_user.username
ELSE (all_carers_unique_flag.username || (CASE WHEN unique = 1 THEN '' ELSE CAST((unique - 1) AS CHAR) END))
END) AS "USERNAME",
all_carers_unique_flag.username || (CASE WHEN unique = 1 THEN '' ELSE CAST((unique - 1) AS CHAR) END) AS "USERNAME",
all_carers_unique_flag.unique,
all_carers_unique_flag.status,
(CASE WHEN current_staff.contact_id IS NOT null THEN 'staff' ELSE 'carer' END) AS "TYPE"
Expand Down

0 comments on commit 646a75c

Please sign in to comment.