I have the following SQL query and want the replace all occurrences of the phrase "Vitality Blast" in the League field with "Twenty20 Cup (England)". To do this I think I need to use the Replace function but I do not know how to integrate it.
Can anyone point me in the right direction?
Thanks
SELECT BallByBall.matchId, BallByBall.inningsNo, BallByBall.ballNumber, BallByBall.ballRank, BallByBall.bowler, BallByBall.batsman, BallByBall.runs, BallByBall.byes, BallByBall.legByes, BallByBall.wides, BallByBall.noBalls, BallByBall.wicket, Lineups.bowlingStyle, Matches.League, Matches.convDate, ScorecardBatting.howDismissed, (SELECT COUNT(T2.ballRank) + 1
FROM BallByBall T2
WHERE T2.matchId = BallByBall.matchId
AND T2.batsman = BallByBall.batsman
AND T2.ballRank < BallByBall.ballRank
) AS Rank
FROM ScorecardBatting RIGHT JOIN (Matches RIGHT JOIN (Lineups RIGHT JOIN BallByBall ON (Lineups.matchId = BallByBall.matchId) AND (Lineups.playerId = BallByBall.bowler)) ON Matches.matchId = BallByBall.matchId) ON (ScorecardBatting.matchId = BallByBall.matchId) AND (ScorecardBatting.batsmanId = BallByBall.batsman)
ORDER BY BallByBall.matchId, BallByBall.inningsNo, BallByBall.ballRank;
Leaguefield more then once per row?