views:

14

answers:

1

Hello,

I have two tables. Employee Information and Skills

Employee Information has the following details - ID (Unique Identifier), FirstName, LastName.
Skills has the following details - Employee Id, Skillset

A sample data will be as follows:

Employee Information

Id      FirstName             LastName
1       John                  Connor
2       Thomas                Anderson

Skills

EmployeeId            Skillset
1                     CRM
1                     SQL Server 2000
1                     .NET 3.5
2                     Java
2                     Hibernate

I need my output as follows:

1    John         Connor         CRM, SQL Server 2000, .NET 3.5
2.   Thomas       Anderson       Java, Hibernate

I run SQL Server 2000. Is there anyway, that I can do this with the help of a query rather than use cursors.

A: 

No, there is no way to do this with just a single SQL statement. You could do it with cursors, but it would probably be easiest to just do it in your application code.

Eric Petroelje