OK, just a quick opinion round up as to whether I&#039;m doing this the right way. I need a way of allowing users to filter the information displayed to them dependant on time, according to schedules which they also set themselves. After a little head scratching, here&#039;s what I&#039;ve done:<BR><BR>Three tables: <BR>MyData (info the user wants to get)<BR>MyPrefs (User specific preferences where they set schedule etc)<BR>MyTimes (actual definition of time data)<BR><BR>MyTimes contains 3 fields - id (identity), name (varchar, for schedule name, such as 24-7, Office Hours, Out Of Hours etc), and timedata (char(168), one character for every hour of the week)<BR><BR>The timedata field contains a string of 1&#039;s and 0&#039;s, depending on whether data should be shown at that hour. I have a function to determine the hour of the week (1..168) from the current date/time. To choose whether to display, the query will go along the lines of:<BR><BR>SELECT Mydata.data FROM MyTimes <BR>INNER JOIN MyPrefs ON MyTimes.id = MyPrefs.Schedule<BR>INNER JOIN MyData ON MyPrefs.DataID = MyData.id<BR>WHERE (MyPrefs.UserID = @userid) AND SUBSTRING(MyTimes.Timedata, @HourOfWeek, 1) = 1)<BR><BR>For those who hate reading code, it picks the character of the current HourOfWeek from timedata, and if it&#039;s a 1, it displays the record. If not, it doesn&#039;t. <BR><BR>This seems to work OK, but I&#039;m just wondering if I&#039;m doing it right, or am I missing some amazing time-saving ultra simple trick designed just for this kind of thing? Any suggestions, optimisations, etc would be appreciated as always.<BR><BR>Oh yeah, if it matters - SQL Server 7 SP4 running on 2K Pro SP2.<BR><BR>Tim<BR>