Hi I have a stored proc that takes a 2nd param that contains value '0','BLANDFORD','BOURNEMOUT','CENTRAL'.
Not sure what the syntax of the 2nd param should be in calling the sp.
Call GetSchedApp(0,'0,BLANDFORD,BOURNEMOUT,CENTRAL')
CREATE PROCEDURE GetSchedApp
(
IN :sPaLocation char(10),
IN :sLocations char(250)
)
RETURNS (
diAgIDno integer,
etc...
);
BEGIN
SELECT DISTINCT diAgIDno,diLocation,diResORAgr, diCRSRes ,RsResRef,RsStartDate,RsStartTime, RsEndDate , RsEndTime,RsVehicleGroup,RsVehicleRegno,RsBookingS tatus,HiSurname,HiForename,RsLikelyToExtend,RsExtr aDays,RsAccountCode as AgAccountCode,RsEndDate as AgEndDate,RsEndTime as AgEndTime,1 as AgAgIdItem FROM WorkSchedule INNER JOIN Reservation ON diagIdNo= rsAgIDNo and diLocation=rsAgIdLoc INNER JOIN Hirer ON HiAgIdNo=rsAgIDNo AND HiAgIdLoc=rsAgIdLoc AND HiLicenceNumber= RsLicenceNumber WHERE diLocation IN (SELECT LcLocationRef FROM LocationRM WHERE LcOwningLocRef=:sPaLocation) AND diDiaryNo IN (SELECT SrLastSrNo FROM SerialNo WHERE srlocation IN (:sLocations) AND SrIDType='L') AND RsQuoteReservationFl=0 AND diAgStatus<>'REMOVE' ORDER BY diLocation,RsVehicleGroup,RsVehicleRegno;
END;