exporting data from 2 tables to ASCII , sorted on clientnumber

exporting data from 2 tables to ASCII , sorted on clientnumber

Post by John Ebbe » Tue, 29 Oct 2002 23:53:27



I have 2 tables:
- table 1: client data (client number, address, city)
- table 2: invoice data (invoice nummber and amount, creation date)

I want to create an ASCII file which has the following layout:
- client number (5)
- creation date ASCII file (6)
- text (can be address, city, invoice number and amount) (50)

For each client, first the adres and the city should be in the ASCII
file and after that the invvoice number(s) and amount(s). The ASCII
file should be sorted on client number. An ASCII could look like this
70100021028address client 70100
70100021028city client 70100
70100021028invoice number 1    amount 10.000,00
70100021028invoice number 2    amount    500,00
70100021028invoice number 3    amount  1.250,00
85247021028address client 85247
85247021028city client 85247
85247021028invoice number 314  amount     50,34
94256021028address client 94256
etc.

I created this VB-script.
*****
Function Main()
        DTSDestination("clientnumber") = DTSSource("clientnumber")
        DTSDestination("creationdate") = DTSSource("creationdate")
        DTSDestination("address) = DTSSource("address")
        Main = DTSTransformStat_OK
End Function
*****

How can I put the data of client city, invoice number and amount in
the field "address"? Or is there another way to export this data?

 
 
 

1. Exporting data to non-delimited ascii files

I've been trying to export data from a table into a non-delimited ascii
text file to be uploaded to the mainframe using bcp.  However I am
unable to create the file without a delimited.  If I leave the /t option
out, it defaults to a tab delimiter.  And if I use the /t without a
parameter it errors out.   Also I haven't had any luck getting format
files to work and I am unable to find any documentation on what I am
trying to do.

The table I want to export contains only chars and a text field.

Any help will be greatly appreciated!

Thanks

Rob

2. RunTime CompactDatabase Crash

3. sql command for exporting data to ascii file

4. wich table in wich tablespace?

5. ASCII Data Export

6. Damsel is distressed.

7. Export data in ASCII format.

8. Can't see OLAP databases ???

9. exporting data to plain ASCII format

10. Export data to ASCII

11. Help with Exporting Informix's Data base over to ASCII

12. Exporting calculation/summary data to ascii file

13. How do I export data from Advanced PICK into ASCII file