Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties

Summary

This SQL selection finds all the people that are missing Department references in the booking request.

Keywords

Flight Booking, Crewlink

Category

SQL Statement

Description

This SQL selection finds all the people that are missing Department references in the booking request. It picks up the Department from the person's activity linked to that booking.

Selection

Crew members missing Department references in the booking request

SQL statement

Expand
titleSQL statement
Code Block
select arr.PIN,
		arr.BOOKING_STATUS,
		arr.travelRequestID,
		org.NAME as 'Department Name'
from PWCCMCHANGECREWLIST CR 
left join PW001P03 P03 on p03.SEQUENCENO=cr.nextact or p03.SEQUENCENO=cr.CURRENTACT and p03.PIN=cr.pin
right join PWCCMFLIGHTARRANGEMENTS arr on arr.SEQNOM=CR.SEQNO and arr.PIN=cr.PIN
left join PWORG org on org.NUMORGID=dbo.ad_scanorgtree(p03.NuMORGID, 4)
order by PIN

Field Specification

Field

Description

PIN

From the Personal Details

Booking_Status

The status of the booking from PWCCMFLIGHTARRANGEMENTS .

travelRequestID

The Travel Request ID of the booking from PWCCMFLIGHTARRANGEMENTS .

Department Name

The name of the department from activity to which the booking request is linked to.

...