Comparing 2 Tables And Listing Records That Dont Match
Jun 19, 2006
Very new to access, I need an easy way to compare 2 tables with a common field (the name field) and list just the records that appear in the second table but not the first (primary) table.
Please help, thanks.
View Replies
ADVERTISEMENT
Jul 7, 2015
I have two access tables named as "DestructionTBL" and "AnnutiesTBL". Now I have to check each PolicyNumber of AnnutiesTBL with PolicyNumbers in "DestructionTBL". If match is found then add that PolicyNumber into "NODestructionTBL" and delete that PolicyNumber record from "DestructionTBL".
View 14 Replies
View Related
Oct 27, 2006
Hi,
I want to list all the records of a particular field from all tables in my database. The field has the same name in all the tables. Ideally I would like one long list of the records. How can I do this?
Thanks,
Richard
View 6 Replies
View Related
Apr 22, 2006
Hi,
Relevant to this query are two tables, tblNames and tblLinks.
I've been trying, with a very limited understanding, to generate a list of every tblName.Name where tblName.NameID IS NOT in tblLinks.NameID.
Is this something I can do in the query design view or do I need to work with raw SQL?
Any tips appreciated:)
View 2 Replies
View Related
Sep 17, 2014
I am after creating a list box that will display some of the tables within my database - there are between 10 and 15 tables and the names all follow the same pattern (They all start "tblD10").
View 1 Replies
View Related
Dec 6, 2006
ok.. here is a pickle..my table layout is like so..http://www.londonheathrowcars.com/hoo.jpgthe job table stores the main job details.. every job will be in this tableSOME jobs will have incoming flight details... some wontSOME jobs will have outgoing flight details.. some wontSOME jobs will have incoming AND outgoing flight details.. some wont have anyalso SOME jobs (credit card jobs) will have credit card details.. some wontthis is the general problem i am facing..there are 2 records in my job table..jobref no. 020jobref no. 021jobref no. 020 has incoming flight details.. outgoing flight details.. and credit card details.. which means... the job ref no. 020 is present in all 4 tables..jobref no. 021 has incoming flight details.. it does not have outgoing flight details or credit card details.. which means the job ref no. 021 is present in the job table and the incoming flight table onlyi want to create a form that displays every field in the database..my idea is to make a query using all four tables.. and then the form will display the results..HOWEVER!!!!!!!!the form will only display the job ref no 020.. because job 021 is not present in all the tables...why.. is there a way around this.. cant it just display both records and if job 020 does not have card details.. just leave those fields blank.. then on this form.. if i happen to add card details to job 021.. it will just create the record in the card table using the same ref no..is that clear.. someone please enlighten me
View 2 Replies
View Related
Apr 11, 2006
One the face of it it sounds quite simple - i have a table that holds various bits of info about a customer but also a field that contains a holiday period - what i want to be able to do is show all records that do not equal todays date.
So if today was 11/04/06 - and one of my customers had 11/04/06
as one of his holiday days he would not appear on the report but all the others would.
Any help would be greatly appreciated
regards
View 14 Replies
View Related
Aug 16, 2007
As I usually concentrate on building the tables and fields in my initial stage, and do some experimenting to analyze the relationship.
However, when I'm done, I find it quite a hassle to go manually through the tables to add description to each field for documenting.
What I would like to do is create a query that will list all fields and its description. Now, I have found codes to retrieve either table or fields properties, including the description property, but am kind of stumped on how I can make it a SQL statement so I can create a temporary query, which will be pretty be one time thing, that can read all fields' description and allow me to type in it, save it.
If that's not possible, I suppose I could write code, using Allen Browne's example, that would loop through the fields' description, debugging to the immediate window and prompting me if I would like to add something to the blank description. However, this isn't exactly greatest as I need to see all fields so I can be sure I'm giving good descriptions.
I figured someone may have had this same problem and maybe came up with a solution?
View 4 Replies
View Related
Aug 16, 2006
Hi,
I need to compare records in the same table. I know that this is typically accomplished by joining the table with itself. However, this is not entirely suitable for my needs. I need to compare the first record to every other record - excluding itself - and then compare the second record to every other record excluding itself AND the first record. I want to continue this pattern for all the records. Is there any way I could go about doing this?
Any help would be much appreciated.
Edit: Each record has an autonumber generated key
View 12 Replies
View Related
Aug 17, 2006
I have two tables: -
1) Sales data
2) Claims data
I want to anaylse Premium (contained in the Sales Data Table) against Claims (contained in the Claims Data Table). The result I want to achieve is to show a loss ratio (Premium / Claims as a %). I need to show this on a per policy basis (each Table has a Policy Number Column).
Im new to Access and do not know how to go about this.
View 3 Replies
View Related
Jul 12, 2005
Hi,
I have imported data from an ERP system into an Access table. This big table contains information about invoices processed last month. 2 of the columns are currency code and payment batch code.
Actually, there are rules that accountants should follow, but they can make errors. We would like to find those error using this Access database.
One rule is that only predefined payment batch codes should connect to a
currency code.
My idea was to create another table, where controllers are able to type in these rules like
EUR CIE
USD CIU
HUF BKH
This table has only 2 columns: currency code and payment batch code and no primary key has been defined.
The 2 tables were joined with the currency code and a query printed only those transactions where the payment batch code from the big table <> the payment batch code from the new table. This shows where accountants made an error.
This is the query:
SELECT [475 Master].*
FROM Tbl_Pmt_Btc INNER JOIN [475 Master] ON Tbl_Pmt_Btc.Cur_Code2 = [475 Master].Currency
WHERE ((([475 Master].Pmt)<>[Tbl_Pmt_Btc].[Pmt_Btc_Code]));
475 Master is the big table, Tbl_Pmt_Btc is the new table that can be modified by the controller.
This worked until more than one payment batch code were assigned to a currency code.
EUR CIE
EUR CIU
It seems that Access can use only one of them.
Can you please advise what to do in order that Access takes both rows into
account and the query prints those transactions booked in EUR where the payment batch code are neither CIE nor CIU.
Is there a simple solution without any programming?
Thanks,
Peter
View 2 Replies
View Related
May 17, 2005
Hello - I am new to Access and don't know VB.
I am trying to compare 2 tables that each contain the following information:
Fields:
Document Number
Date
Changes (Amendments, etc.)
I would like to see the following on a report:
A - If a document number is on Table 2, but not on Table 1, show these on a "missing documents" report.
B - If a document number exists on both reports, however the dates do not match. Example: Document 123 is on Table 1 with a date of 1/1/1999 in the date field. Table 2 contains the same document in the document number field, however the date field contains 2/15/2005. SHow these on a "Date Differences" report.
C - If a document matches on number and date, however the changes field does not match.
Ultimately, I would like to add other fields to compare as well.
Hope this makes sense to someone out there!
Thanks!
View 1 Replies
View Related
Dec 24, 2007
Hi Guys,
I have made a database for a mobile phone retail store. The purpose of the database is to sort out network (e.g. Orange, AT&T) payments and compare them to our records. Our manager will enter in details into one table, including the different commisions that should be paid, plus the phone number. The other table is an imported spreadsheet that the commisions from the networks are shown. For each table, I have totalled the commisions.
My next step is to compare the two tables against the phone number, and commision totals, so that deals that have not been paid, or underpaid are highlighted. I know this involves a couple of loops, but my knowledge of Access does not go that far.
I have been thinking that I need to write code that gets one number in the first table and compare it against ALL records in the second table until it gets to the one with the same number, compare the values of commision total, and move on to the next record.
Can anyone help?
Cheers!
View 5 Replies
View Related
Aug 22, 2011
I need to create a query that will compare both tables and just send out the records that dont match to a report.
Table1 asset#,Serial#
Table2 asset#,Serial#
query that checks that in Table1 the asset OR the Serial match the what is in Table2. and if it does not find a match to send it to a report.
View 11 Replies
View Related
Jun 2, 2006
I have been searching on here and have not found an answer, could be due to me not seeing it or its not here. I have a multi part question.
Anyways, here is what I have. I am getting data from a time clock, which dumps the data into an access database. It dumps the data as EmployeeNumber (Number), DateTime(text). I use the format command and make a new table to give me EmployeeNumber(Number), Date(text), Time(text).
Question 1:How can I convert these to date and time fields instead of text fields?
After I do that I need to be able to compare the records within the table, such as: I need to check to see if the date is the same between one record and the one above it (assume that I have sorted this correctly) if the date is the same then I need to subtract the first record from the second record to give me the number of hours between the two records.
Question 2: How would I go about comparing those records in the same table?
Thanks in advance to those who can help. Even ways not to do this would be good.
View 5 Replies
View Related
Mar 29, 2007
Hello,
My database has two tables:
Master and History
Both tables have a SSN field with the following format:
000-00-0000XX (xx stand for two additional characters)
I have a search form with a textbox that I use to type criteria to open a form. The text box has the following SSN input mask: 000-00-0000CC;0;_
This allows me to return data even if I have a part of the SSN
I have now placed a button which verifies if the SSN I will type in the textbox already exists in table History. I am having problems with the SSN format as I have to type the whole SSN while I would like to type part of it (like the textbox input mask).
If Not IsNull(DLookup("[SSN]", "History", "[SSN] = '" & Me![txtbox] & "'")) Then
DoCmd.OpenForm ("popupssnsearch")
Is there a way I can do this?
THanks.
View 1 Replies
View Related
Feb 14, 2007
As part of my job I am constantly comparing files from a production environment against those from a UAT environment. The checks are generally the generic before I reconcile the monetary values I check that the static data population is the same. Basically I import the files into access and then do a like for like comparison on the number of blanks per field. Eg.
Field Blanks_UAT Blanks_Pro Diff
Coustomer_Number 10 2 8
Is there any way of doing this programmable so I can reuse it or are there any tools out there that do this work for me. Some of the files contain a large number of fields so the work can become rather cumbersome!
Any help is appreciated
View 3 Replies
View Related
Feb 28, 2007
Hi guys, i'll try and explain this as best i can....
I have 2 tables:
CurrentMonth
PreviousMonth
Both tables hold financial information by policy number. What i am doing is working out financial movement on a month on month basis. For example, if in previous month the financial position was £100 but in current month the finances had moved to £150 then the movement is £50 for the month. This i can do no problem by linking the tables by policy number and extracting the financial position and subtracting one from the other to give me a movement. However, in some instances there will be some policies that appeared in PreviousMonth but have since been cancelled back to policy inception so is not appearing in CurrentMonth.
Problem: I need to be able to bring in the policies on the previous month that are not appearing on the current month (due to cancellation).
Can anyone help me?
Cheers
View 1 Replies
View Related
Mar 22, 2006
I'm trying to write a report which initially I didnt think would be hard to do, but when it came time to write the underlying query I realized it was a bit above me.
I cant give away too much of the database structure here, due to legal issues, so sorry for being vauge. Hopefully I can give enough information that someone can get me started.
I have three tables that will be used in this query. One is called NAMES and has all of personal details of contacts. The only fields that are needed from this table are the primary key and citizenship field.
The other two tables are virtually the same, and they are the two being compared. One is REGISTRATION and the other APPLICATION. Essentially what I want here is to be able to compare the number of who applied to the number who actually registered.
Here are the pseudo-tables to give you a better picture:
NAMES
nID
FName
LName
DoB
Citizenship
REGISTERED
programCode
startDate
endDate
nID (foreign key)
APPLIED
programCode
startDate
endDate
nID (foreign key)
I've tried a few different approaches which worked in my head, but when it came time to run the query the results were different. Any suggestions on how I should tackle this?
View 3 Replies
View Related
Apr 12, 2007
Is there any way to compare two tables and write out the records that don't match to a third table?
thank you.
View 1 Replies
View Related
Oct 13, 2004
I have 4 tables (one for each quarters data) each with the same fields:
Fund
FundFamily
Value
I have a query for each table that sums the values for each FundFamily (if there are multiple funds with the same FundFamily, it only shows the sum for the Family).
I am wanting a query that will show all of the different FundFamily fields from each table, but only once (say there is a Value in one quarter, but not the next). How is the best way to go about this?
Does what I'm trying to do here make sense?
-GorillaBoze
View 2 Replies
View Related
Nov 8, 2004
I have 2 tables. Quotation Details and Order Details. As you fill in the Order details Form I wish to compare fields from the
Quotation Details Table. Is this possible? Please advise.
Thank you.
View 1 Replies
View Related
Dec 18, 2004
I have 3 tables that all contain Car registration numbers.
Table 1 contains just Reg numbers. Table 2 contains Registration numbers with an additional 2 columns of data. Table 3 also contains Registration numbers with an additional 2 columns of data.
I need to compare the reg numbers in Table 1 with Tables 2 and 3 and where the same Reg number appears in either of Table 2 or 3 display the results in a new table / query.
ie, Table1 Reg, Table2 data , Table3 data Note there are some Reg numbers that will appear in all 3 tables.
any help appreciated.
Malc
View 2 Replies
View Related
Jul 24, 2007
I am currently trying to crosscheck/compare two tables. One table is part of a larger Access database, and contains a record of household information such as addresses (split into multiple columns, such as House Number, Road Name, County etc). The other table is an Excel file that I’ve imported, which contains similar data for a particular set of households, also split into multiple columns (though the column types are slightly different). The vast majority of the listings in the Excel spreadsheet should be matchable to a specific entry in the far larger Access table, though a few will not. The matches won’t be particularly straightforward however, as the data entry is not entirely consistent between the two tables, so each match will involve checking combination of different columns for close matches. Ultimately, I want a query that will check each of the Excel table’s entries against the Access table’s entries, and then create a new table listing all the entries that had matches, and the unique id of the matched entry in the Access database.
I am wondering what most straightforward approach to solving this task is. Do I need to use SQL? If it matters, I am using Access 2000.
Thanks in advance.
View 1 Replies
View Related
Mar 31, 2015
Let's say table looks like this.
Name Type Amount Percent Bonus
John DCP 5000 10
John Sales 4000 5
I need to look at record one and if John's DCP Amount is >=4000 AND his Sales are >=4000 his Bonus amount for DCP would be 5000 * 10 and his Sales Bonus would be 4000 *5 but if the DCP was not >=4000 he would get no bonus for DCP and no bonus for Sales because DCP drives his bonus.
So even if Sales were >=4000 because DCP was not the result would be 0 for both. Make since?
Is there any way to evaluate this without using VBA?
View 7 Replies
View Related
Aug 12, 2005
Hello everyone,
I'm quite new to access (used to php mostly) and for usual task it's ok but now I have trouble for a quite simple query I think.
I have to compare the values from 1 field and select only the rows just before the value becomes smaller and also the very last row.
example:
if I have a row with 1, 2, 3, 4, 1, 2, 3, 4, 5, 1
I need to put 4 and 5 in an other table
View 1 Replies
View Related