Hey sql newb here, I have this problem which I am suppose to create a view which contains the information of different bookings of a product between a certain time frame (march - April)
I came up with this, but instead of displaying the specific time frame it's just showing everything
CREATE VIEW sailors_view1
AS
SELECT sailors.sid, sname, rating
FROM sailors, reserves
WHERE start_date BETWEEN '8 March, 2007' AND '14 April, 2007'
With Check Option
GO
and I'm using this to test: SELECT * From sailors_view1
Update: table definitions
CREATE TABLE sailors
(sid CHAR(5),
fname VARCHAR(10), sname VARCHAR(10),
street_address VARCHAR(20),
suburb VARCHAR(20),
rating INT, age INT, phone CHAR(3))
CREATE TABLE dbo.reserves
(sid CHAR(5),
bid CHAR(3),
start_date DATETIME,
end_date DATETIME,
rname VARCHAR(10))