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.
Author |
Topic |
Guruprasath.cub
Starting Member
8 Posts |
Posted - 2012-02-13 : 06:16:59
|
Dear members,I have sql table which contains data for various periods. Through asp, I need to generate for one particular period. After this the same output need to be taken out as fixed width txt file. Anybody, please help meGuru |
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2012-02-13 : 07:50:41
|
Follow the HOW TO ASK link in my signature. It will show you how to give us the information we need to help you.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-02-13 : 10:46:08
|
Starts with BCP and format file. SQL Server help file has examples.MadhivananFailing to plan is Planning to fail |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2012-02-13 : 10:51:22
|
Looks in SQL Server Books OnlineHowever, when you use bcp you will need to have a file that defines how the output is suppose to look, that file is referenced by bcp with the switch-f<filepath>\<filename>Here's a sample41 SQLSMALLINT 0 2 "" 1 EmployeeID ""2 SQLNCHAR 2 100 "" 2 Name SQL_Latin1_General_CP1_CI_AS3 SQLNCHAR 2 100 "" 3 Title SQL_Latin1_General_CP1_CI_AS4 SQLNCHAR 2 100 "" 4 Background SQL_Latin1_General_CP1_CI_AS Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
|
|
X002548
Not Just a Number
15586 Posts |
|
Guruprasath.cub
Starting Member
8 Posts |
Posted - 2012-02-15 : 09:57:56
|
Still, I could not get the answer. I need to make a report through asp code where the data in sql. The report should be a txt file in a fixed width delimited.Anybody please help me |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|