Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
CREATE VIEW dbo.PW001SRV279 as select P01.PIN, P01.client as numorgid, P01.employmentstartdate, P01.employmentenddate, P01.Name, case when exists (select ac.PIN from WEB_CP_ACCOUNT_EMPLOYEE AC where P01.PIN=AC.PIN ) then 'Y' else 'N' end 'Account active', -- P0U.EP as 'E-mail send out', email.TELENO as 'E-mail address' from PW001P01 P01 --left join PW001P0U P0U on P0U.pin = p01.pin LEFT JOIN PW001P0T email ON email.PIN = p01.PIN AND email.TELETYPE = 6 AND email.TELEPRIORITY IS NOT NULL AND NOT EXISTS ( SELECT 1 FROM PW001P0T t WHERE t.PIN = email.PIN AND t.TELETYPE = email.TELETYPE AND t.TELEPRIORITY IS NOT NULL AND ( t.TELEPRIORITY < email.TELEPRIORITY OR t.TELEPRIORITY = email.TELEPRIORITY AND t.SEQUENCENO < email.SEQUENCENO ) ) --where (P0U.EP IS NOT NULL or exists (select ac.PIN from WEB_CP_ACCOUNT_EMPLOYEE AC where P01.PIN=AC.PIN )) |
...
Column | Description/ Location in APM |
---|---|
| The PIN number from the Personal Details. |
| The ID of the person’s Employment Organization. |
| The Employment Start Date from the Personal Details. |
| The Employment End Date from the Personal Details. |
| The Name from Personal Details. |
| The column show in the person has an active account in the Employee Portal. |
| The column is disabled in the view. Can be activated, but the customised code value should be related to the one you have in your system. The column shows the date from the customised field in Perosnal Details of when the e-mail was supposed to have been sent out to the crew. |
| The e-mail address from the Personal Details that has highest priority. |
...