June 18, 2007 at 7:23 am
Hello all,
I've been asked for the row data within one of my tables by a vendor for troubleshooting purposes.
I ran the query provided to me within Query Analyzer and sent him the results.
This was his response to me:
"The result from query analyzer limits the amount of text in each field when it is displayed; therefore it generates an incomplete record. Please use db export function with the query to output the record into plain text."
I've personally have never heard of this.
How can I export all the data within just the one record?
It's a SQL Server 2005 box.
I've tried fooling around with SSIS and still no luck.
Any suggestions would be great.
Thanks in advance!
June 18, 2007 at 11:46 am
use the ISQL tool.
Here's the format of the call to ISQL.
isql -U<user> -P<password> -S<server> -w<some large number> -x<another large number> -d<database name> -Q"select * from <sometable> where <condition>" -o<name of the text file to store result>
The large number should be bigger than the maximum amount of text you expect back.
Carlos
June 18, 2007 at 12:01 pm
Check the Results tab in the Configuration Options in QA make sure that max char per column is set to 8000
* Noel
June 19, 2007 at 12:04 am
1. isql is a SQL 2000 utility. In SQL 2005, you would have to use sqlcmd.
2. QA is a SQL 2000 utility. In SQL 2005, you would have to use SQL Server Management Studio.
2.a. 8000 characters is often still not enough space for each column.
Look up "exporting data" in Books Online for data exporting options (BCP, bulk import, OpenRowset Bulk rowset). Or if you want a quick simple way for a one time export, right click on a table in the database in SQL Server Management Studio, and click on export data.
June 19, 2007 at 12:20 am
Robert is right. ISQL is a 2000 utility hence use SQLCMD to export the data. Also you can use the GUI based import/export wizard to move your data to your text file. You can also try using bcp command.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply