title: sql query for year part of date
body: <p>Can someone help me out with a sql query? I have a column with dates in it, and a column with years. I want to be able to pull the dates column based on the selection from the year column. For example if the date is 08/2/2006 then, when the user selects year 2006 from a drop that record and all records from 2006 will be pulled? If the user selects 2011 then only the records from 2011 will be pulled. Here is my statement but it doesn't pull any records.</p>
  
  <pre><code>SELECT [O_Adj_Key]
    ,[O_Adj_AMOUNT]
    ,[O_Adj_APPRV_D]
    ,[O_Adj_COMMENT]
    ,[O_Adj_Initials]
    ,[F_Year]
  
  FROM [NAOLI].[dbo].[O_AdjustBudgetTbl], [NAOLI].[dbo].[codeFiscalYearTbl]
  where f_year = o_adj_apprv_d
  </code></pre>