473,503 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combining multiple tables into one table

Hello All Database (Access) Guru's,

I am a novice when it comes to databases and I know enough to get
simple information for my needs. With that said, I was given an
opportunity for improvement a database.

heres the scenario or process that I am facing

1. A total of 3 text files are generated from the mainframe and save
to a secure network share. In each text file only raw data
example:
1. Cus_Name.txt
123456789 doe John 07151949
2. Cus_Address.txt
123456789 2100_duncan Austin Tx 78754
3. Cus_Employer.txt
123456789 Imation 01011999 Analyst 2-6789

2. There is an access database that has 3 tables. One for each txt
file.
1. tbl_CusName
field1: SSN
field2: Last_Name
field3: First_Name
field4: DOB
2. tbl_CusAddress
field1: SSN
field2: Address
field3: City
field4: State
field5: Zip
3. tbl_CusEmployer
field1: SSN
field2: Employer_Name
field3: Hire_Date
field4: Title
field5: Phone

3. Each day, each text files are imported into their own designated
table manually.

4. Questions and where i need some assistances:
Question 1 -- How can I automate this process so that when I log into
the database, it automatically does the import or insert into the
respective tables.

Question 2 -- Is there a way for me to either create a query or insert
into some master table all the information from each table so that I
have one table with all of the field from the other three tables.

Question 3 -- The reason for Question 2 is because I will need to
export that data into ONE (1) Excel spreadsheet.

Any and all help regarding my issue is greatly appreciated.
Argus
Jun 22 '06 #1
3 4517
On Thu, 22 Jun 2006 04:06:12 GMT, Odawg <od***@dawgoneloose.com>
wrote:

A simple way would be to use a Macro with 3 lines, each executing one
DoCmd.TransferText command. Look it up in the help file.

If you name the macro AutoExec, it will automatically execute every
time you open the database, not just once per day.

Once you have the macro, say you named it DailyImport, you can set up
an automatic process so it executes once a day even if you don't open
the MDB. Do this on a machine that is always on, always logged in, and
has MsAccess installed. Then use Control Panel > Scheduled Tasks to
set up a new task, which executes this command line:
path_to_msaccess.exe path_to_your.mdb /x DailyImport
and schedule it to run every morning before the first user needs it.

To create the "1 table" view, create a new Select query, select the 3
tables, join them by SSN, and select all the fields you want.

-Tom.
Hello All Database (Access) Guru's,

I am a novice when it comes to databases and I know enough to get
simple information for my needs. With that said, I was given an
opportunity for improvement a database.

heres the scenario or process that I am facing

1. A total of 3 text files are generated from the mainframe and save
to a secure network share. In each text file only raw data
example:
1. Cus_Name.txt
123456789 doe John 07151949
2. Cus_Address.txt
123456789 2100_duncan Austin Tx 78754
3. Cus_Employer.txt
123456789 Imation 01011999 Analyst 2-6789

2. There is an access database that has 3 tables. One for each txt
file.
1. tbl_CusName
field1: SSN
field2: Last_Name
field3: First_Name
field4: DOB
2. tbl_CusAddress
field1: SSN
field2: Address
field3: City
field4: State
field5: Zip
3. tbl_CusEmployer
field1: SSN
field2: Employer_Name
field3: Hire_Date
field4: Title
field5: Phone

3. Each day, each text files are imported into their own designated
table manually.

4. Questions and where i need some assistances:
Question 1 -- How can I automate this process so that when I log into
the database, it automatically does the import or insert into the
respective tables.

Question 2 -- Is there a way for me to either create a query or insert
into some master table all the information from each table so that I
have one table with all of the field from the other three tables.

Question 3 -- The reason for Question 2 is because I will need to
export that data into ONE (1) Excel spreadsheet.

Any and all help regarding my issue is greatly appreciated.
Argus


Jun 22 '06 #2
When you import them manually, do you use an Import/Export Specification? If
you don't, you should create one for each import. To do this, go through the
entire manual import procedure except Finish for each import. When you get
to the Finish screen, select Advanced... and the Save as... Give each
import a different descriptive name.
In your macro that Tom has described, enter the appropriate specification
name in the second box of the Action Arguments.

Odawg wrote:
Hello All Database (Access) Guru's,

I am a novice when it comes to databases and I know enough to get
simple information for my needs. With that said, I was given an
opportunity for improvement a database.

heres the scenario or process that I am facing

1. A total of 3 text files are generated from the mainframe and save
to a secure network share. In each text file only raw data
example:
1. Cus_Name.txt
123456789 doe John 07151949
2. Cus_Address.txt
123456789 2100_duncan Austin Tx 78754
3. Cus_Employer.txt
123456789 Imation 01011999 Analyst 2-6789

2. There is an access database that has 3 tables. One for each txt
file.
1. tbl_CusName
field1: SSN
field2: Last_Name
field3: First_Name
field4: DOB
2. tbl_CusAddress
field1: SSN
field2: Address
field3: City
field4: State
field5: Zip
3. tbl_CusEmployer
field1: SSN
field2: Employer_Name
field3: Hire_Date
field4: Title
field5: Phone

3. Each day, each text files are imported into their own designated
table manually.

4. Questions and where i need some assistances:
Question 1 -- How can I automate this process so that when I log into
the database, it automatically does the import or insert into the
respective tables.

Question 2 -- Is there a way for me to either create a query or insert
into some master table all the information from each table so that I
have one table with all of the field from the other three tables.

Question 3 -- The reason for Question 2 is because I will need to
export that data into ONE (1) Excel spreadsheet.

Any and all help regarding my issue is greatly appreciated.

Argus


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200606/1
Jun 22 '06 #3
Everything you ask for is very doable with some code, and not that much
code. YOu can automate the importing of data into Access using the
DoCmdTransferText method - which requires a specification. You get the
specification by running the textfile import wizard and naming that
import job. A more efficient way to import textfile data is to use the
Open statement - to open a textfile and then use the input or line input
method to read the textfile.

One more consideration is if Access is just an intermediate step where
the final goal is to get the data to Excel. If this is the case you can
bypass Access altogether and import the data directly into Excel. You
can use the import wizard in Excel and use the Record macro function to
automate this, or you can also use VBA to write code using the Open
statement and the input or line input to read the data. The Open and
Input or Line Input statements/functions are all in the help files.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jun 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1644
by: glenn | last post by:
I'm really scratching my head over this one. I'm working with CSV data exported from Excel, which explains why it's a mess to begin with. Within a table (or via any other means someone might be...
0
1565
by: Bob C. | last post by:
I am considering combining one large Access db and several small Access db's into a single SQL Server 2000 db. The small db's serve separate but related functions in our operation, and they all...
8
8337
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though...
22
698
by: Martin C | last post by:
I have inherited a database which has a table for each of our 1200 customers. Each table is exactly the same. It is very difficult to generate reports I would like to create a new table and take...
4
11520
by: Tony Williams | last post by:
I want to combine two tables into one. I have a table with all the field definitions from two other tables. I now need to update this new table with the data from the other two tables.However both...
7
15611
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
2
2587
by: rdraider | last post by:
Using SQL 2000, how can you combine multiple records into 1? The source data is varchar(255), the destination will be text. I need help with the select statement. example tables: CREATE TABLE ...
2
4114
by: J055 | last post by:
Hi I need to search a number of DataTables within a DataSet (with some relationships) and then display the filtered results in a GridView. The Columns that need to be displayed come from 2 of...
10
10573
by: H | last post by:
Hi, I have the following address fields in a table: flat_number house_name_or_number street village postal_town county postcode
2
3079
by: Haas C | last post by:
Hi all, I am a newbie who goes through tasks in apainfully slow and in an inefficient way in Access. I've been experimenting here and there and have figured out a few things, but for the most...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.