SQL How to add parentheses to output data
sql
Solution
You should be able to do this using the CONCAT function
SELECT
SUBSTRING(FirstName,1,1) AS '',
'.' AS'',
LastName AS '', CONCAT('(',UPPER(Title),')') AS ''
FROM employees
WHERE (Title !='Sales Representative');
Problem
For a college assignment I need to show the last column of output data in parentheses as shown below. My current query is: ``` SELECT SUBSTRING(FirstName,1,1) AS '', '.' AS '', LastName AS '', UPPER(Title) AS '' FROM employees WHERE (Title != 'Sales Representative'); ``` This query shows the output as: ``` B . Brown STOREMAN C . Carr RECEPTIONIST D . Dig DRIVER ``` I need it to show: ``` B . Brown (STOREMAN) C . Carr (RECEPTIONIST) D . Dig (DRIVER) ```