Question : Computed Column - Adding to current code

I currently have a computed column that checks for youth that turn 18 during the month.  I have the code below as you can see.  If a youth turns 18 the computed column returns a value of 3.

However, I need to ADD more to this code.  Each student in the table also has a column called "TotalHours" and "Month"  Every month of the year there is a new record for every student.  January through December.  And each of those records should have hours in the "TotalHours" column.  

If a student has 0 hours for three months in a row, then the computed column should return a value of 3 also for this case.

Is this possible?  Can I do it in an OR statement below?
Code Snippet:
1:
2:
3:
4:
5:
6:
( case when ( datediff( month, dateadd(year,(-18),getdate()), [Text7] ) <= 0 )
then (3) else [Combo1] end )

OR

'code for the 3month check goes here...

Answer : Computed Column - Adding to current code

Sounds like Num locks is on. On a laptop the numbers are on top of some of the keys and with nums on it gives you the number. Hit the Fn and the numlock key to turn it off.
Random Solutions  
 
programming4us programming4us