Text File Reporting

  • Thread starter Thread starter RP
  • Start date Start date
R

RP

I am using C# with SQL Server 2005.

I have a table that looks like this:

EmpID Code
----------- --------
101 A1
101 B1
101 C1

102 A1
102 C1

103 B1
103 D1

I want to write like this in a text file:

EmpID A1 B1 C1 D1
 
Hi,

Sql 2005 provides a way to convert rows into columns , take a look at Pivot
Formatting it is easy, you can do it from SQL itself, just use char columns
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top