Create a text file with 3 parts

Last Post 16 Jul 2010 02:56 AM by JASBRYDEN. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
JASBRYDEN
New Member
New Member

--
13 Jul 2010 11:01 AM
Hi

I have a create an SQL statement that would out put the results to a text file.

That part is easy.

However I have been ask to have three levels in my text file
- File Header
- Detail Record
- File tail

So it has to look something like this.

1111202366                                                                                                                                    File Header
2221053   105963138000100 671204555113SUPERMERCADO PAULISTA NOVA VENEZA LTDA      Detail Record               
3051120080000008344                                                                                                                  File Tail


How do I create this ???
I am using SQL 2000 DTS jobs....I could get the data, I just do not know how to get all of it into the text file.

HELP !!!!!!!!!!!!!!



russellb
New Member
New Member

--
13 Jul 2010 11:14 AM
I'd use an ActiveX script task (or even abandon the DTS and use a vbScript or compiled app) and use the Scripting.FileSystemObject to write the file
JASBRYDEN
New Member
New Member

--
16 Jul 2010 02:56 AM
I do not have a clue on how to do that.

 
You are not authorized to post a reply.

Acceptable Use Policy