USP_SIMPLEDATALIST_RESERVATION_ITINERARY

Lists all itineraries associated with a reservation.

Parameters

Parameter Parameter Type Mode Description
@RESERVATIONID uniqueidentifier IN

Definition

Copy


            create procedure dbo.USP_SIMPLEDATALIST_RESERVATION_ITINERARY
            (
                @RESERVATIONID uniqueidentifier
            )
            as

                select 
                    ID as VALUE
                    case
                        when NAME = '' then
                            (select CONSTITUENT.NAME from dbo.CONSTITUENT where CONSTITUENT.ID = ITINERARY.LEADERID)
                        else 
                            NAME
                    end as LABEL
                from dbo.ITINERARY
                where 
                    RESERVATIONID = @RESERVATIONID
                order by ID