setup age groups in a table

I am putting together an activities table that will correspond relationally from another table. I am trying to figure out how to label predetermined age groups and all I can think of is to put them in the following columns. Since there can be more than one age group, for each activity, I figure setup 5 different columns for the age groups. Do you see any concerns doing it this way?

Generally age is always stored in a single column, and the fancy T-SQL is reserved for reports.

In your case, with those ranges, you could try this..

SELECT activity_name, case
when age <= 7 then 'Ages 0-7'
when age <= 12 then 'Ages 8 to 12'
when age <= 17 then 'Ages 13 to 17'
when age <= 20 then 'Ages 18 to 20'
else '21 and over' end as age_ranges
FROM tblOrgActivities

In that case, choices are...
* The ranges as you have them in the form. Probably the easiest choice.
* Have the 'Option Group' a single value, and in your form handle writing multiple values into an single value. Handy, but also a lot of UI work.
* Having a 'one to many' table to contain the age range selections. Might not be that useful.

The first one is by far the easiest. The problem lies if someone wants to change up the ranges that they're hard-coded. Also, make sure there is a textbox that stores the current date, as two years from now these age ranges will mature, for lack of better word..

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…