SQL Server: how to create multiple text files from a table

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-05-09T17:26:57Z Indexed on 2010/05/09 17:38 UTC
Read the original article Hit count: 155

Filed under:
|

hi,

I need to extract data from my SQL Server database into multiple text files.

I have a table with 4 columns: UserID, UserName, Tag, Score.

I need to create a text file for each Tag (so basically I need to group by Tag and order by score).

Before to start I would like to know what's the fastest way to create several text files:

  • File titles = TAG field
  • each line = userID

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server