index | search | no replies | posting guidelines | help | login | register |
Index » Programming Languages » SQL |
| |||||||
Oct 10 2003, 1:37 PM |
| ||||||
whichman from: Laurel, MD | To select multiple Fiscal years try this: SELECT *, 'FiscalYear' = CASE WHEN ([Reporting Month] < 10) THEN [Reporting Year]-1 ELSE [Reporting Year] END INTO #T1 FROM Visitation SELECT * FROM #T1 WHERE FiscalYear IN (1999,2000,2001,2002) ORDER BY FiscalYear DROP TABLE #T1 ------------------------- Master of the Game | ||||||
Pages: (1) [1] |