How to user two inner joins in one query using sql server query analyser


declare @masterproductId VARCHAR(100)
set @masterproductId='product1'

SELECT DISTINCT Field2, PlaceHolderCode,isnull(m.CoverProductId,'') as CoverProductId
FROM PropertyMaster m INNER JOIN CrossFieldValidation c
ON (m.MasterProductId = c.MasterProductId AND
(m.PropertyMasterId = c.PropertyMasterId or m.CoverProductId = c.CoverProductId))
--ON m.MasterProductId = c.MasterProductId
INNER JOIN PropertyDetails d ON (d.PropertyMasterId = m.PropertyMasterId)
WHERE m.MasterProductId=@masterproductId AND FunctionCode='F14' AND PageNameCode='AP'
Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar