RE: How to append a SP´s result into a TXT File
From: Alejandro Mesa (AlejandroMesa_at_discussions.microsoft.com)
Date: 12/21/04
- Next message: Tibor Karaszi: "Re: Transaction question"
- Previous message: MS User: "Excel - named ranges"
- In reply to: Jorge Luzarraga Castro: "How to append a SP´s result into a TXT File"
- Next in thread: Alejandro Mesa: "RE: How to append a SP´s result into a TXT File"
- Reply: Alejandro Mesa: "RE: How to append a SP´s result into a TXT File"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Dec 2004 08:21:05 -0800
You can use bcp utility.
Example:
bcp "execute northwind..[sales by year] @Beginning_Date = '19960101',
@Ending_Date = '19961231'" queryout "c:\temp\sales by year.txt" -S pivotalr5
-T -w
AMB
"Jorge Luzarraga Castro" wrote:
> Hi,
>
> is it possible to save the results from a stored procedure execution, which
> returns a result set, into a text so that the results are appended. If so,
> how could I do it?
>
> I´m trying with this sentence:
> ISQL -Uxxx -Pxxx -Q"execute itf_generateinterfase '00001', '20040830',
> '20041231', 'P'" -SAcrux -dSegurosCl -o"Header.txt" -w1100 -h-1 -n -s";"
>
> but it overwrites the file header.txt everytime I execute the batch file.
>
>
> Thanks In Advance.
>
>
>
> Jorge.
>
>
>
- Next message: Tibor Karaszi: "Re: Transaction question"
- Previous message: MS User: "Excel - named ranges"
- In reply to: Jorge Luzarraga Castro: "How to append a SP´s result into a TXT File"
- Next in thread: Alejandro Mesa: "RE: How to append a SP´s result into a TXT File"
- Reply: Alejandro Mesa: "RE: How to append a SP´s result into a TXT File"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|