inner join calendar_t cal on cal.week_id = wh.week_period inner join fiscal_year_t fy on fy.fiscal_year_id = wh.fiscal_year_id and fy.fiscal_year = cal.fiscal_year ...
I have to write a query on a positively atrocious table (this is with MSSQL 2005). Basically, multiple "lists" are stored in a single gigantic table called "UserData". I'm building the SQL statement ...