title: sql query to join 3 tables using joins
body: <p>I wanted to display the column values of 3 tables(datalogging,temprature,pressure) as shown below and my query also shown below but here temprature values are repeating,i want all the corresponding values for particular date how can i do it? can anybody help me please?</p>
  
  <p>Tables are </p>
  
  <ol>
  <li><p>datalogging5</p>
  
  <pre><code>name     shift name   operator   id   date                     plant   line   machi
  -------  -----------  ---------  ---  -----------------------  ------  -----  -----
  ashwini  shift1(7-3)  Operator1  102  2011-06-07 00:00:00.000  Plant1  Line1  mc1
  pradeep  shift1(7-3)  Operator1  101  2011-06-06 00:00:00.000  Plant1  Line1  mc1
  ...
  </code></pre></li>
  <li><p>temprature</p>
  
  <pre><code>temprature  time                     date
  ----------  -----------------------  -------------------
  27          1900-01-01 15:45:41.000  2011-06-06 00:00:00
  27.3        1900-01-01 15:50:41.000  2011-06-06 00:00:00
  ...
  </code></pre></li>
  <li><p>pressure</p>
  
  <pre><code>temprature  time                     date
  ----------  -----------------------  -------------------
  0.5         1900-01-01 15:45:41.000  2011-06-06 00:00:00
  0.7         1900-01-01 15:50:41.000  2011-06-06 00:00:00
  ...
  </code></pre></li>
  </ol>
  
  <p>my sql query is </p>
  
  <pre><code>select Date=convert(varchar(12),(t1.date),101), t1.time, operatorname, 
      machine, line, t2.time, Temprature, Pressure
  from datalogging5 t 
  inner join temprature t1 on t1.date=t.date 
  inner join pressure t2 on t.date=t2.date  order by t.date
  </code></pre>