Hi, the comma after 'STU_A' gives me an error but I don't understand why. Can anyone help?
SELECT
BookRef,
SourceSiteId,
BookingStatus AS Status,
RoomTypeCode AS Decsription,
MarketSegment AS MARKSEG,
DateArrive,
DateDepart,
PackageCode,
DATENAME(month, DateArrive) AS Month,
Year(DateArrive) ArrivalYear,
ChargeTotalNett AS TOTALAccomREV
FROM SyncReservations
WHERE (CreatedTimestamp < '2020-08-01' AND DateArrive BETWEEN '2020-09-01' AND '2022-07-31')
or (PackageCode NOT LIKE
'STU_A' ,
'STU_B',
'STU_C',
'STU_D' ,
'STU_A_2' ,
'STU_B_2',
'STU_C_2'
)
Order BY MarketSegment