Oracle
 sql >> Database >  >> RDS >> Oracle

Sql che combina due colonne in una variabile

Usa || per concatenare in Oracle

SELECT A.*,
       K1.AD || K1.SYD as CONTACT,
       KR.AD KURUM,
       K2.AD SUPERVISORAD,
       K2.SYD  SUPERVISORSOYAD,
       K3.AD REQUIRERAD,
       K3.SYD REQUIRERSOYAD
FROM  
       TD_ACTIVITY A,
       KK_KS K1,
       KK_KS K2,
       KK_KS K3,
       KK_KR KR
WHERE  A.INS_CONTACT_PERSON = K1.ID
   AND A.SUPERVISOR =  K2.ID
   AND A.REQUIRERID = K3.ID 
   AND A.INSTITUTIONID = KR.ID