SQL query to get the columns into one and comma delimited

Viewed 28

I am getting an output from a query like below -

REQUISITION_NUMBER      CANDIDATE_FNAME       CANDIDATE_LNAME       TITLE           EMAIL_ADDRESS       Interviewer Name
12                      John                        Derigour        Hi              fre@stack.com       Maya maraiam
12                      John                        Derigour        Hi              fre@stack.com       Suzie Hero

Query -

select 
    irc.requistion_number,
    irc.CANDIDATE_FNAME,
    irc.CANDIDATE_LNAME,
    email.title,
    email.EMAIL_ADDRESS,
    email.Interviewer
from 
    irc_requistion irc,
    email_address email
where 
    irc.email_id = email.email_id 
    and irc.requistion_number = email.requistion_number

How can I convert this to the following format:

REQUISITION_NUMBER      CANDIDATE_FNAME       CANDIDATE_LNAME       TITLE           EMAIL_ADDRESS       Interviewer Name
12                      John                        Derigour        Hi              fre@stack.com       Maya maraiam , Suzie Hero

i.e. the interviewer names should come with , in the interviewer name column, rest should remain the same.

0 Answers
Related