I have created a dB to track assets and the implementation of new assets.
The data is located in a flat .xls file which i have imported into my dB as a flat table. I want to move the data from that table into the respective relational tables and keep the relation.
Aaargh, how do I do this? I have tried an append query but I can only append one table at a time and then I can not retain the relations for all the data.
I have being playing with ms access but I really don't know much about it or databases in general.I have created a very simple database to gather twitter following/followers data for research purposes.One table (table01) has a field for the "boss" user (=the user who I gather data for), another field for "client" (=bosses followers or friends).Both fields are numeric and contain the users id's.In order to distinguish if the link is follower or friend there is a third field, called type which can be either 1 (=follower) or 2 (=friend).So the data would look like this:
boss - client - type 12345, 67890, 1 12345, 54321, 2
If user with user id 12345 had a follower (type 1) with user id 67890 and a friend with user id 54321...In order to avoid getting duplicate rows I also added a unique identifier which is of the form boss_id-user_id-type.So the above row looks like this:
That works just fine.For several reasons I also needed data of the form source - target.So I also made another table (table02) of this form.
67890, 12345 12345, 54321 ...
In table 2 you don't need the "type" field since the position of the user id shows the type of relationship.Still, you need a unique identifier in order to avoid duplicates, so I added on with the form: source_id-client_id..So table02 lookes like this
Both tables also have a date/time stamp for each line.As you can see, table01, having also a type field is bigger than table02.The problem is when I try to append data, exactly the same data in both tables.Appending data to table01 is ok, while appending data to table02 (which is smaller, having one less field) takes a really long time, maybe 10 times as long as appending data to table01.To make sure that no query's are causing the problem I have tried first creating temporary tables with the data to be appended, no duplicates, nothing that would cause the database to make extra calculations and used a simple update query with no filters to append data.Still I get the same result, table02 takes a very long time to finish while table01 finishes in no time.
I have started working with a database/s that was not set up by me and I am having problems appending tables from different databases.
Overview - There was one original database set up to collect clinical data with a 'mainTBL' (health data) and a 'subTBL' (medications data) linked within the 'mainTBL'. Rather than having one continuous database the data entry person has copied the database and used a copied version for each month (where the records were deleted so new records could be entered) - so I have six databases for six months of data entry and I need to make it into one big database.
There is an ID field in the 'mainTBL' that is an autonumber (and primary key) and this has a relationship with an ID field in the 'subTBL'.
The problem - The autonumbers in each monthly database are not unique across the six different databases (Eg the autonumber in both february and march starts at 74 so there is duplicate ID's in february/march). I have to append all the monthly databases (including the 'subTBL's) and then start a new autonumber so they are all unique and new data can then be entered. I am having trouble appending because of the duplicates and the relationship between the ID fields - what is the best way around this.
I have two tables I want to update...One table is a lookup table (Dates) and the other holds most of the information (History). I then have a query that finds the information i need that will be appended to both tables. One field in the query needs to update the dates in the lookup table "dates" and then the history need to get all related info.
Example:
Before Query - (In Date Table) (In history table) 1/2/06 Jane Doe $10 1/3/06 John Doe $40
After Query - (In Date Table) (In history table) 1/2/06 Jane Doe $10 1/3/06 John Doe $40 1/4/06 Jeff Doe $50 <---- How do I add this info, to both tables
Access leaves the data with the letters in it (shown in bold) blank, how can I solve this, because I want to paste everything. I already put in design view the settings to text, but it doesn't work...
I have two databases that I need to merge into one. The structure of each DB is identical, however the data is different. My original thought was to import all the tables into one DB, then use Append queries to merge the similar tables. The problem is that the main table in each DB has an Attachment field (using the Attachment data-type). After doing some research, it seems that you cannot use an Append query that references a table that contains a multivalued field (such as the Attachment data-type).
Every record has at least one attachment stored in this field, so removing the Attachment field is not possible. So my question is, if I have two identical tables, each with an Attachment field, how can I combine them into one table?
The only idea I had was to write a VBA procedure that would loop through all the records in the main table and save each attachment in a folder outside the DB, then delete the attachments. I could then merge the two tables using an Append query. Finally, I would run another VBA procedure that would load each saved file back to the appropriate record in the DB. The procedure that saves the attachments would have to write the primary key for the record they were attached to in the filename (or create a new sub-folder that is named with the primary key value), then the procedure that loads the files could read that value from the file or folder name and know which record to attach the file to.
Firstly I would like to state that i have very little knowledge of Access databases (my job is not computer related) but I am trying my best to get a few issues sorted... So here it goes: I have 2 tables, one large table with about 3-4000 rows(horizontal lines), and a smaller table with only about 1000 rows.
The rows in the big table contain Products (name, dates, adresses, phone numbers etc) and every product has a 'Codename' in a column-line (vertical) of the big table. (there are about 3000-4000 products) In the small table there exists a similar column-line (vertical) that contains 'Codenames' of the Products listed in the big table, but there are only ~ 1000 'Codenames' not the full 4000 ! The reason for this is that in the small table there exists another column-line(vertical) that for every code listed (in the small table) contains a certain specific "description".
My task is to get all the 1000 "descriptions" from the small table inserted into the Big table accordingly to their proper 'Codename'. This means createing a new column in the big table and: if the codename exists in small-table insert the description in the new column-cell, if the codename doesnt exist in small-table leave new-cell empty...
How do i do this ? :) Im guessing some coding is envolved.. and i have no clue whatsoever.... Thank you, George P.
Hi I have created 4 tables which have 3 field common in all these tables and carry the same data value. Is it possible to enter data in the first tables and it copies to other tables automatically. After all its the same 4 data fields in these tables. Liver database Table 1. Auto ID; Surname, First name, Patient ID;-----other not common fields. Table 2. Auto ID; Surname, First name, Patients ID;----other not common fields.
I have the following code, the purpose of the code is that to take all rows from each table to append them into one table. However, I am testing this code with 2 tables (Table2 and Table3) each table has 2 records, when I run the code, it keeps adding records to table 1 that exceeds one million. what is wrong with my code?
Dim tblString, I As Integer Dim rstFrom As Recordset, rst2 As Recordset Dim db As Database Set db = CurrentDb Set rst2 = db.OpenRecordset("Table1", dbOpenDynaset)
I receive the data from engineering team lets name it as MAster database( in DB2 database - Read only ) and then i want to assign the data to each member and staus will be updated by them.So my Idea is upload the data from Engineering team (MAster database) to my (Local database), i think of using Append query if there is any changes in engineeiring data after i append the data then i can use the Update query to modify the data.
But once i assign the job to every member from my Localdatabase, i want it to stored in a data base with their name because it is a huge volume data and it will go for years.The bottleneck is If i use the Append query here, the changes from Masterdatabase to Locadatabase will not reflect in Team members database? is any solution for this or i have to use the Update query in Localdatabase and also in Team memers database?
I'd like to copy data from an excel spreadsheet and paste it into a temp table in Access and then hit a button which will run an append query and append all the data in the temp table to a permenant table.ow to create a temp table?
I have a db using 3 large tables with 1:1 relationships. Before you question my normalization, I stress that these tables are strictly used to temporarily store user input information for a highly automated form with several hundred fields. All of the bound fields enable the form to be reopened and retain the information originally entered. The information is then transferred to a report and converted to a .pdf where it is filed; these 3 table's records are deleted weekly with a delete query. Other than a few combobox row source queries, these 3 tables are not connected to the rest of my db. At this point the form is functioning perfectly.
What I am trying to do is save about 3-5 of the partial (records) on 2 of these tables for indefinitely, no longer needed, or overwritten. Reason being is that partial information (records) on this form can be recalled and duplicated into a new form, saving the user time from having to completely re-enter some fields that will not change week to week.
So far, my best idea is to have 2 duplicate tables that store these records (based on a checkbox on a scheduled query event) that can be recalled and written back into the 2 main tables with a new primary key when needed. Append queries only work with one table at a time, and I need to maintain the integrity of these records 1:1 across the 2 tables with their primary keys intact.
So I am pulling data from a SQL data base into access and appending it to certain tables. To do this I have 15ish append queries. Is there a way to have them run in a certain order with one command?
I have about 100 or so tables that I need to append back into one table :eek:
However all of these 100 tables all begin with the number 100 at the beggining. I know that you can append tables - but as far as I know you can only do one at a time. Is there any easy way to do this - for example writing a small SQL statement - saying select all tables that begin with 100* and then append into a master table :confused:
Alternatively are there any programs on the net that can do this (I just wrote a massive macro to import them from a text file in to access- not realising this problem would happen!) :(
Unfortunately each of the tables has the first row as the column heading too?
is it possible, for any reason, to append another sql query after one sql query? for example, the first one is "select name from bla bla where name=something" and we just add another query at the end of the query to make something like "select name from bla bla where name=something and then show table from this database"
I have built an Access DB containing 3 tables: dimensions, time, companies. The tables are not linked and are to be used to look up values for the new form. The goal is to create an Access form that would allow the user to select distinct values from all 3 tables, enter some own data and then execute an append query to add the record to the main table.
Something like this:
Initially I have 3 tables:
Prepopulated Dimensions table with fields: dimension ....
Prepopulated Time table with fields: Date Day Month Year
Prepopulated Companies table with fields: Company ....
My form is to be able to select distinct values (combobox) from all three fields: Company Dimension Day Month Year Value (data entered by user)
The record then is appended to the Main table containing: Company Dimension Day Month Year Value (data entered by user)
I am trying to call a subroutine from a VBA routine to append a record to an existing table. Below is the code for opening my recordsets for reading followed by the code creating my table to append to:
Public Sub UpdateLotsizes() Dim curDatabase As DAO.Database Dim ProdPlanDB As DAO.Database Dim rstQryLot As DAO.Recordset Dim rstInvLoc As DAO.Recordset Set curDatabase = CurrentDb
[Code] ....
To call my subroutine, I simply put in the code:
ExceptionReportAddRecord
And this is the code of the subroutine:
Public Sub ExceptionReportAddRecord() Dim rstExcRpt As Recordset Set rstExcRpt = curDatabase.OpenRecordset("tblExceptionReport") With rstExcRpt .AddNew .Fields("item_no").Value = txtItemNumber
[Code] .....
I am receiving "Run-time error 434: Object required" at the line I marked with ...
I have an append query created to add files to a table from an imported excel file. The table to which I am appending (SubTBL) has a field names Observation. This field is not required. There is a relationship to another table (ObservationTBL) which has 3 records. The information I am trying to append includes 7000 records, about 4000 have observations assigned and they match the information in the ObservationTBL. The remaining 3000 have blank records for observation. When I run the append query, only those with observations are appended. The rest are not added because of "key violations". I removed the relationship between the ObservationTBL and the SubTBL and the append query runs. Then when I try to re-do the relationship it fails "Violates referential integrity rules".To be clear:
1. The records without an observation are blank. (There are other fields in this append that have blank fields also and they are not causing any problems) 2. The field observation is NOT set to required.
I have a table in MS Access 2010 with a Date field and 3 Memo fields. I wish to append data to the Access table from a MS Word doc that has a date field and 3 memo fields. My wish is to have a command button on the MS Word doc which appends the data to my Access Table.I am aware that a web page can append data to an Access table.
I am trying to import from Excel and append to an existing table. My excel sheet is named tblStatus and I am trying to append it to my Access table "tblStatus".
I get an error message that says "The first row contains some data that can't be used for valid Access Field Names. In these cases, the wizard will automatically assign valid field names." (I used the excel sheet to set up my table.) After I click OK, I get to the point where I can click finish, and I get a "Subscript out of range" error.