Reputation: 3444
I am stucked in one of MySQl query. I want two process on one field. Let say the field is named 'title'. Now title has BASE64_encoded data in it. Now I want to fetch all the data in lower case with mysql. I tried below code. but I didnt get my result. Hope you help me.
SELECT LOWER(FROM_BASE64(title)) as title FROM my_table;
I know, both are working individually. but not together. Now How can I do both process in one mysql.
Upvotes: 2
Views: 3442
Reputation: 3444
I found solution.
SELECT LOWER(CONVERT(FROM_BASE64(title) USING latin1)) as title FROM my_table;
Upvotes: 6
Reputation: 172548
You can try like this:
SELECT LOWER(X) as title FROM (select FROM_BASE64(title) as X from my_table);
Upvotes: 1