Hello, I have a SQL database that I am trying to run and narrow it down quite a bit.
The database is for a calendar, and for a school district, on the main district homepage, I want to display events from all four high schools, but only the NEXT one in line.
Right now, my code is
Each school is given a unique two digit character, and the district is 00
East = 21
Central = 23
North = 22
West = 24
The only thing I'm missing is getting it so that only the next event will appear for each school so the homepage does not show 5 events for one school.
Hope this makes sense!
SELECT TOP 5 date,event,school,location,monthnm,datenm,colors FROM calendar where date > GetDate() AND school = '00' ORDER BY date ";