it should be likeSELECT t1.*,t2.Email,t2.ProductName,...FROM Table1 t1LEFT JOIN (SELECT AccountID, MAX(CASE WHEN DataType='Email Address' THEN Data ELSE NULL END) AS Email, MAX(CASE WHEN DataType='Product' THEN Data ELSE NULL END) AS ProductName, .... FROM Table2 GROUP BY AccountID)t2ON t2.AccountID = t1.AccountID
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/