Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Combinig the fleid value

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-04-20 : 09:58:19
Anu writes "Hi every body ,
i have to combine or concatenate the field vlaues from 2 different table (from one table as single column)
Pls help me to write query.
I have 2 tables
1. employee
-----------
empid
firstname
lastname
dob
etc
2.empqualification
empid
empqualification

i wish to combine the values of empqualification
empid firstname lastname
2 raja r
3 kavi r
4 radha j

empid empqualification
2 BE
2 MBA
2 PGDCA
3 BA
3 MA
3 B.Ed
4 Bsc
4 Msc
4 Mphil
and the result must be like this
empid firstname lastname empqualification
2 raja r BE,MBA,PGDCA

3 kavi r BA,MA,B.Ed

4 radha j Bsc,Msc,Mphil


Thanks in advance
Anu
"

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-04-20 : 10:00:17
THis is a common question here on SQLTeam. There are many good examples of how to perform this. Search the site for CSV.

Here is a good article:

http://www.sqlteam.com/item.asp?ItemID=11021
Go to Top of Page
   

- Advertisement -