Skip to content

Instantly share code, notes, and snippets.

@nedgrady
Last active November 29, 2021 00:21
Show Gist options
  • Save nedgrady/e84ac24a9124beb009766ce90af6b336 to your computer and use it in GitHub Desktop.
Save nedgrady/e84ac24a9124beb009766ce90af6b336 to your computer and use it in GitHub Desktop.
SELECT B.Id,
B.Start,
B.Finish,
L1.Name,
L2.Name,
L3.Name
FROM Booking B
INNER JOIN Lookup L1 on L1.Id = B.RoomTypeId
INNER JOIN Lookup L2 on L2.Id = B.StatusId
INNER JOIN Lookup L3 on L3.Id = B.RoomeSizeId
WHERE B.Start BETWEEN GETDATE() AND GETDATE() + 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment