SQL Functions for Binary to Base64 conversion