2

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.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
SSA_Tech124
  • 577
  • 1
  • 9
  • 25
  • look at LISTAGG function – OldProgrammer Jun 08 '22 at 16:54
  • [Bad habits to kick : using old-style JOINs](https://sqlblog.org/2009/10/08/bad-habits-to-kick-using-old-style-joins) - that old-style *comma-separated list of tables* style was replaced with the *proper* ANSI `JOIN` syntax in the ANSI-**92** SQL Standard (**30 years!!** ago) and its use is discouraged – marc_s Jun 08 '22 at 19:40

0 Answers0