narasiman rao

narasiman rao

  • NA
  • 519
  • 748k

how to combine two columns in sql server

Sep 24 2015 3:31 AM
 
   
select BatchID = (select eid from BATCHID where bid = 'B16401' and b_activ = <>'d'
Cid = (select top 1 certificate_no from certificate_detail where stud_id = a.stud_id and active = 'A' and crsname = 'ctf' )
from student a, course_registration b, batch_course_registration c where
a.stud_id=b.stud_id and b.cr_bill_no=c.cr_bill_no
and c.bcr_batch_id='B16401' and b.cr_active='A' and a.stud_active<>'D'

Wheni exeucte the above query output as follows

Batchid          Cid
CTF/B376         09

I want to combine the above batchid and Cid and get the output as follows

Batchid           Cid                       Batch
CTF/B376        09                    CTF/B376/09

for that how can i combine the two columns in sql server 

Answers (2)