I have a SQL Server 7.0 database that communicates with an application running on an AIX 4.3 platform through an automated batch gateway. The data must be sent to the Unix program in text format with a specific header size.
I need to know how can I generate a text file containing a field of 1096 characters?
Columns extracted from different tables of the Sql-server database must form the text file.
The position of columns in the text file is a very important parameter.
Anyway back to my problem, I would like to write a stored procedure (or a DTS package) allowing me to generate a text file with specific layout according the columns.
By example :
generate Myfile.txt
XXXXXXXXXXXXXXXXX.......X.....................Z(Z=1096 char)
A1A1A1A1B2A3A3B1Bn......Bn....................B4
A1A1A1A1B2A3A3B1Bn......Bn....................B4
A1A1A1A1B2A3A3B1Bn......Bn....................B4
..................
A1A1A1A1B2A3A3B1Bn......Bn....................B4
Etc.
I need to know how can I generate a text file containing a field of 1096 characters?
Columns extracted from different tables of the Sql-server database must form the text file.
The position of columns in the text file is a very important parameter.
Anyway back to my problem, I would like to write a stored procedure (or a DTS package) allowing me to generate a text file with specific layout according the columns.
By example :
Code:
TableA
colA1 : datatype1, length (4)
colA2 : datatype1, length (2)
colA3 : datatype2, length (2)
... : ...
colAn : datatypeN, length (n)
TableB
colB1 : datatypeW, length (1)
colB2 : datatypeX, length (2)
colB3 : datatypeY, length (10)
colB4 : datatypeZ, length (1)
... : ...
colBn : datatypeN, length (n)
generate Myfile.txt
XXXXXXXXXXXXXXXXX.......X.....................Z(Z=1096 char)
A1A1A1A1B2A3A3B1Bn......Bn....................B4
A1A1A1A1B2A3A3B1Bn......Bn....................B4
A1A1A1A1B2A3A3B1Bn......Bn....................B4
..................
A1A1A1A1B2A3A3B1Bn......Bn....................B4
Etc.