I have
Visit table
Visit_Id
Visit_Date values(09-09-2011)
Visit_status values like (accepted , refused)
member_Id
i have done like this for getting number of visits by using below query
SELECT visit_Status as Status, COUNT('x') AS Visits
FROM visits
WHERE visit_Date BETWEEN '2011-06-20' AND '2011-07-20'
GROUP BY visit_Status
it was giving results like this
Status Visits
accepted 2
refused 4
can i get the results like this
Status Visits
Accepted 2
Refused 4
with upper case letter on first letter of status i mean like this ( Accepted , Refused) instead of this one (accepted , refused)
I am using mysql work bench
u can use SUBSTRING and UPPER
select CONCAT(UPPER(SUBSTRING(visit_Status, 1, 1)),
LOWER(SUBSTRING(visit_Status FROM 2))) as Status ......
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With