title: How To Get Data From Multiple Tables Without Duplications
body: <p>I have two tables <code>tbl_Enquiry_Items</code> and <code>tbl_Estimation_Items</code> contains Enquiry and Estimations
  Respectively</p>
  <p><a href="https://i.stack.imgur.com/u9BuY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u9BuY.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/rkXQ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rkXQ2.png" alt="enter image description here" /></a></p>
  <p>I am Fetching Data from <code>Tbl_Estimation_Items</code> Using Query</p>
  <pre><code>Select * from tbl_Estimation_Items Where Estimation_Id= 1  
  </code></pre>
  <p>returning data Set of 5 Records. How can i get 6th row also Present in <code>tbl_Enquiry</code> as Well without duplication.</p>
  <p>There is No Foreign key Between Them..
  There is Another tables Which Contains <code>Enquiry_id</code> namely <code>Tbl_Estimation</code>
  <a href="https://i.stack.imgur.com/SzvEY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SzvEY.png" alt="enter image description here" /></a></p>
  <p>query i tried is</p>
  <pre><code> 
  DECLare @EnquiryId int
  Select @EnquiryId= Enquiry_Id from tbl_Estimation where  Estimation_Id= 1
  
  Select   Estimation_Id, Rfx_Item_No , Material_No ,RTRIM( LTRIM(Description)) as Description , Quantity,Principal_Unit_Price, Total,Li_Discount_Percent,
  Li_Discount_Amount ,Li_Principal_Total,Li_Principal_Currency,Li_Petromar_Unit_Price, Li_Petromar_Total,Li_Exchange_Currency,Li_Exchange_Rate,
  Li_Petromar_Unit_Price_Fc,Li_Petromar_Total_Fc
  
  into #temp from(
  Select    a.Estimation_Id, a.Rfx_Item_No , a.Material_No ,a.Description , a.Quantity,a.Principal_Unit_Price, a.Total,a.Li_Discount_Percent,
  a.Li_Discount_Amount ,a.Li_Principal_Total,a.Li_Principal_Currency,a.Li_Petromar_Unit_Price, a.Li_Petromar_Total,a.Li_Exchange_Currency,a.Li_Exchange_Rate,
  a.Li_Petromar_Unit_Price_Fc,a.Li_Petromar_Total_Fc
  from tbl_Estimation_Items a
  left outer join tbl_Estimation b on a.Estimation_Id = b.Estimation_Id
  left outer join tbl_Enquiry c on  b.Enquiry_Id = c.Enquiry_Id
  where a.Estimation_Id= 1
  
  Union
  
  Select  1 as Estimation_Id, Rfx_Item_No ,  Material_No , Description , 
  0.00 as Quantity, 0.00 as Principal_Unit_Price, 0.00 as Total, 0.00 as Li_Discount_Percent,
  0.00 as Li_Discount_Amount ,0.00 as Li_Principal_Total, 0.00 as Li_Principal_Currency,0.00 as Li_Petromar_Unit_Price, 0.00 as Li_Petromar_Total,0.00 as Li_Exchange_Currency, 0.00 as Li_Exchange_Rate,
  0.00 as Li_Petromar_Unit_Price_Fc,0.00 as Li_Petromar_Total_Fc
  
  from
  
  tbl_Enquiry_Items  where Enquiry_Id =@EnquiryId  
  ) tt
  
  select *from #temp  
  
  drop table #temp
  
  </code></pre>
  <p>but giving me following result set</p>
  <p><a href="https://i.stack.imgur.com/jw4ch.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jw4ch.png" alt="enter image description here" /></a></p>