Re: How to break the output file to smaller files - xp_cmdshell

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



We could do this very easily in SSIS which is of course little consolation.
In DTS I suppose you could loop over the source and pick up a certain range
each time until no more rows were exported. You would dynamically change the
destination text file name and location on each iteration of the loop Why
would you want to split a file up like this?

It would make importing the data again a bit of a pain.

--


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com


"ad" <ad@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:79214B48-868F-4E32-9B18-3704F859CCBB@xxxxxxxxxxxxxxxx
Hi,
I am using bcp and xp_cmdshell to produce output text file in sql server
2000. The size of the output file is so big. Is there any way to break the
file into small files (for example 500 records per each file) ?
Is there any option using the xp_cmdshell?

Thanks,
Aravind



.



Relevant Pages

  • RE: Reading contents of file
    ... 2)I am not able to print the unmatched data i.e in the above example '45' doesn't match the regex in the while loop so this cannot be printed in the output file. ... the existence of the matched pattern which is done by the help of bookref ...
    (perl.beginners)
  • Multi Output
    ... I may have more then 1 output file depending on the input data. ... Do you think it is a good idea to use a dynamic port in a loop and append ... Can I prepare the files in the first orchestration and then call the second ...
    (microsoft.public.biztalk.general)
  • Re: Segmentation Fault error
    ... create the trajectory of a rocket. ... It consists of a for loop that ... adapt certain parameters of the rocket. ... writes each time step to a matrix in an output file. ...
    (comp.lang.fortran)
  • Re: Need some help please ! !
    ... It is far safer to use "less than" in your particular code. ... in your code, it only happens once, then the code drops down to the loop, looking for the next input. ... (Which is why your output file matches your input file) ... Now with this code my output file is the same as my input file :-( ...
    (microsoft.public.vb.syntax)
  • store variables output file
    ... a variable Ain my code is included in a loop over i. ... record only of Ain the output file. ... I know that I can just leave all arrays in memory till the end of the ...
    (comp.soft-sys.matlab)