SELECT dbo.contract.num AS contractnum, dbo.aspnet_Users.UserName AS customername, dbo.contract.retailernum, dbo.retailer.name AS retailername
FROM dbo.contract INNER JOIN dbo.aspnet_Users
ON dbo.contract.customerid = dbo.aspnet_Users.UserId INNER JOIN
dbo.retailer ON dbo.contract.retailernum = dbo.retailer.num