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 |
|
Dilan13
Starting Member
6 Posts |
Posted - 2010-08-26 : 15:45:59
|
| I have a batch file which exports all data from the table to a text file. I initially used bcp which will create a file around 4MEG, but i had to switch to sqlcmd( since Bcp will not be available in the prod environment) and the output file is now around 17 MEG( eventhough the total number of rows are the same). Trying to understand why the size if so different and if it's possible to reduce the size of teh file anywayusing bcpbcp %SQLDBDATA%..vw_BeamExport out %Dir%\CSBudgetExport\BeamOutput_Export_%cur_yyyy%_%cur_mm%_%cur_dd%_%cur_hh%_%cur_nn%_%cur_ss%.txt -S%SQLSERVER% -U"%SQLLOGIN%" -P"%SQLPWD%" -c:EOFsqlcmd -U"%SQLLOGIN%" -P"%SQLPWD%" -S"%SQLSERVER%" -d"%SQLDBDATA%" -Q"SELECT * from dbo.vw_BeamExport" -o "%Dir%\CSBudgetExport\BeamOutput_Export_%cur_yyyy%_%cur_mm%_%cur_dd%_%cur_hh%_%cur_nn%_%cur_ss%.txt" -s","GOTO :EOF |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|