title: need the sql query format for previous 11 months data
body: <p>I am running the report i pass the paramater like this 'Jan-13' or 'May-13' or 'Jun-12' it may be any thing.</p>
  
  <pre><code>select CardName,CardCode ,DLN1.Quantity 
  from ODLN inner join DLN1 on odln.DocEntry = ODLN.DocEntry 
  where ODLN.DocDate = 'Jan-13' (this doc date is the datetime format) in report they will chose Jan-13 
  </code></pre>
  
  <p>I need the output like past 11 months of the quantity with the current month Jan-13</p>
  
  <pre><code>Cardname    CardCode  Jan-13 Dec-12 Nov-12 Oct-12 Sep-12  aug-12  jul-12   jun-12  may-12   Apr -12  mar-12 feb-12   
  EFIGLobal     A2       12     10      12      10    8       12      3       2        12       11       4      6
  </code></pre>