select distinct vtw.lastname, vtw.firstname, vtw.dob, vtw.clubnumber, vtw.tournamentname, vtw.BossTournamentID, vtw.tournamentdatetime, vtw.tournamentid, tp.tournamentprizeid, tp.status, tp.place, p.prizeid,p.prizename, tp.bRedeemed, tp.CouponNumber
from vwTournamentWinners vtw, tournamentprizes tp, prizes p
where vtw.fk_tournamentid=tp.fk_tournamentid and vtw.fk_playerid=tp.fk_winnerid and tp.fk_prizeid=p.prizeid and vtw.tournamentdatetime between '8/10/2013' and '8/10/2013' and tp.status='Available'
UNION
SELECT BossID, Status, CouponNumber, FK_PrizeID, FK_WinnerID, PrizeName, FirstName, LastName, DOB
FROM BountyPrizes, Prizes, Players
where Prizes.PrizeID=BountyPrizes.FK_PrizeID and Players.PlayerID=BountyPrizes.FK_WinnerID
order by vtw.tournamentdatetime DESC
Error message:
Msg 205, Level 16, State 1, Line 1 All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
Note: both queries work individually. I want the gridview to display a blank string where the columns cannot be filled in. Chris.