Create TEXT file from table

Bala

Board Regular
Joined
Jun 10, 2003
Messages
92
Hi,

I have imported text file into 4 tables based on the record type (using import specification). All the 4 table structures are different. The link between all the 4 tables are purchase order number. For example in table 1, one record with PO# 123 and in table 2, 4 records with PO# 123 is possible.

Now I want to construct the text file from all the 4 tables (i.e table 1 ,2, 3 & 4). i.e first record from table 1 for the PO# 123 and the next 4 records from table 2
for the PO# 123. How do I do it ?. Can someone please guide me ?

With regards,
Bala
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Bala, can you give some more details on the table structures -- what are the fields and primary keys in each table?
Without that, it's difficult to know how to help but you COULD try:
New query in Design view. Place all 4 tables in the query.
In turn, double-click the asterisk (*) for Table 1, Table 2, Table 3 and Table 4. That should give you all the records.

Denis
 
Upvote 0
SydneyGeek

Thanks for your reply.

The primary key is purchase order number in each table.

Structure :

Table 1 :

PO#
PO line item #
material #

Table 2 :
PO#
pricing condition

and so on

DATA :

Table 1 :

PO# 123
PO line item # 1
material # abc

Table 2 :
PO# 123
pricing condition pb00

PO# 123
pricing condition pbxx

and so on

The output should be

1231abc
123pb00
123pbxx


pls. help

With regards
Bala
 
Upvote 0
Bala, run the query I mentioned and take a look. If it's what you want, use the Word icon on the toolbar to output it to Word.

Denis
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,250
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top