index | search | no replies | posting guidelines | help | login | register |
Index » Programming Languages » SQL |
| |||||||
Oct 10 2003, 12:23 PM |
| ||||||
whichman from: Laurel, MD | Try this: DECLARE @FiscalYear INT SELECT @FiscalYear = 2002 SELECT * FROM Visitation WHERE ([Reporting Year] = @FiscalYear AND [Reporting Month] > 9) OR ([Reporting Month] < 10 AND [Reporting Year] = (@FiscalYear + 1)) ORDER BY [Reporting Year],[Reporting Month] ------------------------- Master of the Game | ||||||
Pages: (1) [1] |