Skip to end of banner
Go to start of banner

Medical Documents

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

Summary

The view shows Medical Documents for all the crew

Keywords

Medical Documents

Description

The view shows Medical Documents for all the crew

Selection

Shows all the crew that have at least one record in PW001P07 (Medical Documents).

SQL statement

--Medical Documents 08/08/2022
CREATE VIEW dbo.PW001SRV27 AS
SELECT 
P07.PIN,
P01.NAME,
P01.ALTERNATIVEPIN 'EMPLOYEE NR',
ORG.NAME 'EMPLOYMENT ENTITY',
C02.NAME RANK,
P07.CODE,
C24.TEXT MEDICAL,
p07.DATEISSUED,
P07.EXPIRYDATE,
P07.ISSUEDBY,
P07.COMMENTS,
P01.EMPLOYMENTSTARTDATE,
P01.EMPLOYMENTENDDATE,
P01.CLIENT NUMORGID
FROM PW001P07 P07
LEFT JOIN PW001P01 P01 ON P01.PIN=P07.PIN
LEFT JOIN PWORG ORG ON ORG.NUMORGID=P01.CLIENT
LEFT JOIN PW001C24 C24 ON C24.CODE=P07.CODE
LEFT JOIN PW001C02 C02 ON C02.CODE=P01.RANK
  • No labels