Queries :: Finding Duplicates Using Last Name And First 3 Letters?

Apr 2, 2014

I need to create a query that will pull duplicate names out of my db.

I would like it to pull all names that have:

duplicate LastName and duplicates of the first 3 letters of the FirstName.

For example, if I had the names:

Bland, Abe
Brown, Abe
Brown, Bill
Buster, Jon
Buster, Jonathon

I would like my query to return only Buster, Jon and Buster, Jonathon.

View Replies


ADVERTISEMENT

Finding Duplicates In Two Different Objects

Nov 1, 2006

Hi

Is there a way of finding duplicate field entries in a table and a query: e.g.

In the Sickness Query (which contains, say 10 fields), in the Section field, it says "Benefits", and in the Week Commening field, it says "15/10/06"

And then

In the Nil Return Table (which only contains the Section & Week commencing fields), they also say "Benefits" and "15/10/06"

If there is a way of finding them, how do I delete the entry that has been made in the Nil return table?

Thanks

Maria

View 4 Replies View Related

Finding Most Recent Duplicates?

Aug 29, 2006

Hi, been searching this forum for a couple of months now im working with access and up till now i have solved most of my problems:D

Ok the problem.

For the purpose of the question I have a training database:
running one table with user id and user name.
another for job id and job name.
Another for training table with an autonumber, user id, job id, and date

Id like to build a query which bought up the newest only for each user id and job id.

eg.
UI JI Date
2 5 01/05/05
2 5 01/05/06
3 5 01/05/05
3 6 01/05/05
4 6 01/05/06

to
UI JI Date
2 5 01/05/06
3 5 01/05/05
3 6 01/05/05
4 6 01/05/06

Iv tried using a few different ways of using duplicate queryies etc, but im just too newb to figure it out :(

Any suggestions or help would be appreciated.
Thanks

View 3 Replies View Related

Finding Combo Box Duplicates

Jan 21, 2005

I have a Lost and Found Database that I enter information in usually every day.
Lots of items like gloves and glasses are entered into the item/s description field as
name of item then color or some other descriptive.
How do you make the combo box bring up all of the items that are related so that I can
pick from a tighter list? Right now when I click on the combobox for say, gloves, it will
bring up only one record of gloves and then I have to scroll through the entire
database to find the right record.

Table Properties
Lost and Found ITEM/S DESC Field:
Field Size - 50
Required - Yes
Allow Zero Length - No
Indexed - No
Unicode Compression - Yes


Form Combo Box After Update [Event Procedure]

Private Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ITEM/S DESC:] = '" & Me![Combo22] & "'"
Me.Bookmark = rs.Bookmark
End Sub

View 4 Replies View Related

Finding Duplicates Out Of Differents Fields

May 16, 2005

Sorry for the question's wording.

Here is what bugs me:

- I have one table tblRefctc with the followings fields :
LCtcRef,../..,LRefServ0, LrefServ1,..LrefServ16.

Where all those Lref are long; LCtcRef being the primary key. This table describe a contact from different branches (account, etc..) so while each branch has the relevant information about this contact, they know that that branch too is in contact with the same person.

- I have this other table with describes Events, TblIdxEvt (meeting, whatever) :

LRefidx,IdxEvt,IdxCtc

where IdxCtc is filled with LCtcRef once an event is created.

What I must check for is : For the same IdxEvt, should another branch makes an appointement for LCtcRef (i), I must check if one of the LRefServ0 to LRefServ16 are not already added in the event table.

At this time, I am stuck with making functions which test the existence of the LRefServ(i) (i ranging from 0 to 16) in tblIdxEvt, but I wonder if there is a simpler way to do it with SQL (which, as you could guess, Im not good at).

Thanks in advance for any pointers.

View 2 Replies View Related

Finding Duplicates In Two Tables- MS Access 2000

Dec 13, 2007

Hello,

I am just starting Access...
Or at least trying to learn it on a small project, and I need a jumpstart, if someone woild be so kind and help me out.

I need to organize my e-mail sendings.

In one table (Table Sent) I have e-mail addresses where I have already sent messages.
In an other (Table New) I have some other e-mail addresses, I am preparing to send out.

To make sure to not send mail to those who already got one, I need to compare the two tables, and delete from the Table New those addresses which are already present in Table Sent.

I guess that would be a 2-3 line SQL script...
All of my attempts so far produced no results

Any guidance would be great!

Thanks

Attila

View 14 Replies View Related

Finding Values That Are Duplicated / Can Create NO DUPLICATES Index

Jun 13, 2013

I am using Access 2010 32-bit on a Windows 7 64-bit platform.I have a database that I have imported existing data into. For the most part, I have eliminated duplicate entries in my Item Number field.

Obviously I have missed at least one (or possibly more) duplicates. When I try to create a NO DUPLICATES index, I am informed that there are duplicate entries.I am looking for a quick way to generate a list of values that are duplicated so I can address those and correct them.Item number field is a number field of type DOUBLE with 2 decimal places.

View 2 Replies View Related

Modules & VBA :: Finding Duplicates In A Table And Recording Values In That Record

May 2, 2014

I've been looking everywhere to find a better way of finding duplicates in a table and then recording and adding another value in that record together.

Let me try to explain better.

example:

I have a table that has 2 columns "Name", "DOB". I would like to find all duplicate "DOB" and add all of the "Name"'s together.

Quote:

Name DOB
bob 19800201
Sam 19761211
Jim 19800201

The output I would like is to have Name = bob & Jim DOB = 19800201.

I've tried using the find duplicate wizard in access but I can't seem to group them together and just to find the duplicates it takes upwards of a minute.

View 1 Replies View Related

Forms :: Finding Duplicates - DCount Not Providing Expected Results

Mar 8, 2013

I've been working on trying to get this code to work as expected for days. I'm trying to find duplicates (I can't use primary keys or indexes alone to weed out duplicates due to the structure of the tables involved) in a subform as a user enters data. As soon as a project number is added, the code is supposed to count the number of records that contain that particular project number as well as a category number (there can be multiples of the same project numbers as long as their category numbers are different). This is the code I am using in the "Before Update" event of the field in the subform:

Private Sub ProjectID_BeforeUpdate(Cancel As Integer)

Dim strCriteria As String
Dim RecCount As Integer
strCriteria = "([ProjectID] = " & Me.ProjectID & ") AND ([CatID] = " & Me.CatID & ")"
RecCount = DCount("[ProjHrsID]", "tblProjHrs", strCriteria)

[Code] .....

What could I be doing wrong? Nothing about this code seems to work properly - even the Undo and Cancel=True is a problem (I get the "No current record" error).

View 2 Replies View Related

Queries :: Order By Letters And Then Numbers

Dec 31, 2013

I have a column containing an id that consists of the first two letters of a weekday followed by an incrementing number. For example, for Monday, I have "MoA1" "MoA2" "MoA3" ... "MoA11".

The problem is that when I sort my list, it is ordering it: "MoA1" "MoA10" "MoA11" "MoA2" "MoA3" etc. Currently, my order by property is set to

MID(TABLENAME.SORTFIELDNAME, 3, LEN(TABLENAME.SORTFIELDNAME))

View 3 Replies View Related

Queries :: Return Number Before Letters

Mar 12, 2015

I would like to run a query which takes a code which contains a mixture of number and letter and returns all the number before the first letter. I was using the left function (=Left(([Codes],2)) but sometimes there is one number sometime two. The desired results are shown below;

7pol2try36 = 7
12cet9fre55 = 12
10yea3gtr77 = 10

Is this possible?

View 3 Replies View Related

Queries :: Stripping Letters From A String To Extract Information

Feb 15, 2015

I have a need to strip of letters from a string but i needs to look for / as the length would change, below is an example of the data I am working with

record 1 example ) REP/1349/999/426066/XX/9
record 2 example ) REP/UDKBS01N/1/448174/XX/

what i need to extract is

1) = 1349
2) = UDKBS01N

I need to get the information between the first / and the second / is there a function in access to get this.

View 5 Replies View Related

Queries :: Pull Letters From Notes Field If Empty?

Oct 29, 2014

I have a query that holds data based on a field. If the field [Device In] is "TimeStation-1" in TblTime for example it holds "AV" in the field [House]. Trouble is some fields are blank and when this is so I want it to pull the last two letters from the [Notes] field. I have attached the database. The query is [QryDeductionsandSleep Ins].

View 4 Replies View Related

Queries :: Combination Of Letters And Numbers = Data Type Mismatch In Criteria Expression

May 16, 2013

I am working on a fairly ancient manufacturing database that identifies items using a combination of letters and numbers. The usual format is to have a letter (which suggests something about the item type) followed by a sequence of numbers.

I am trying to write a query that looks up all the records beginning with a prefix or arbitrary length, strips away the text, and finds the highest number.

Code:

SELECT Right(LocalID,Len(LocalID) - 1) As IDSuffix
FROM tblItemIDCrossReference
WHERE Left(LocalID,1) = 'T' AND IsNumeric(Right(LocalID,Len(LocalID) - 1)=True)

This query produces the error given in the title of this thread, whilst the following works:

Code:

SELECT Right(LocalID,Len(LocalID) - 1) As IDSuffix
FROM tblItemIDCrossReference
WHERE Left(LocalID,1) = 'T' AND IsNumeric(Right(LocalID,5)=True)

This related query also works and shows a load of -1s and 0s correctly

Code:

SELECT Right(LocalID,Len(LocalID) - 1) As IDSuffix,
IsNumeric(Right(LocalID,Len(LocalID) - 1)=True) As Alias
FROM tblItemIDCrossReference
WHERE Left(LocalID,1) = 'T' AND

But once again shows the error message when I try to filter the field Alias to -1 or 0 only through the right-click menu.I have tried piping Len(LocalID)-1 through CLng, CInt, Int, CDbl and CSng; this changes the error to 'Invalid Use Of Null' I have also tried removing the '=True' from the IsNumeric() term.

View 2 Replies View Related

Queries :: Finding The Next Min?

Jul 6, 2013

Im looking to display the 4 lowest figuers obviously Min is the lowest but how would you dind the 2nd 3rd and 4th Min or is not possible?

View 14 Replies View Related

Queries :: Finding First And Last Value?

Oct 8, 2013

I have a table with assignments if employees to teams.

PositionsID(autowert),EmployeeID, timefrom, timeto, TeamNo

3, 123, 13:30, 16:45, 4
4, 123, 17:00, 19:00, 7
5, 432, 17:00, 20:00, 8
6, 987, 17:00, 19:00, 9
7, 987, 13:30, 16:45, 5
....

Some of the employees can be assigned to more than one team, the assignement is not chronicaly, meaning an earlier timefrom can be assigned later (see Employee 987)

As a resultlist I need following:

123, 13:30, 19:00, 4
432, 17:00, 20:00, 8
987, 13:30, 19:00, 5

I can get out MIN(timefrom) and MAX(timeto) per EmployeeID but not the first teamNo, which is the first team he starts his duty!!

View 11 Replies View Related

Queries :: Finding Non-Zero Records

Aug 7, 2015

I have a table in Access that looks like:

fiscal_year acct_period loc_rc account afe description amount system
2015 6 01001028 745003 100050652John A Doe -69.72 E
2015 6 01001028 745003 100086599Jane Doe -33.37 E
2015 6 01001028 745003 100086599Jane Doe -587.69 E
2015 6 01001028 745003 994709 AP - EXPRPT050815SG - Jane Doe - 1 33.37 L
2015 6 01001028 745003 994709 AP - EXPRPT050815SG - Jane Doe - 2 587.69 L
2015 6 01001028 745003 994709 AP - EXPRPT05
2115PK - John A Doe - 1 69.72 L
2015 6 01001028 745006 100048910KROGER -389.74 E

It's combining data from 2 system Identified by E or L. The data is similar but not exact & I'm comparing it using the description. What I need Access to do is find the record that doesn't "zero-out". In the example above the record it should pull is the last one "Kroger $389.74". How to do this but I do have a query/report that will subtotal based on the LOC-RC field.

View 4 Replies View Related

Queries :: Finding Records Between Dates?

Jun 4, 2013

I have a table tbl_PolicyDetails with details of the policy the customers have with us.. In the tbl_PolicyDetails, I have two fields (these are the ones in question) called

"policyStarted" - Start Date of a Policy and
"policyPeriod" - Term of Policy Monthly/Annually/Quarterly

So in a Form view I just get the Next installment for the customer based on this information for display.. For example..

Mr Butters Stotch's policy started on 26/04/2013 and is paying Quarterly; the next (i.e. 2nd) installment would be on 26/07/2013..

Ms Wendy Testaburger's policy started on 07/04/2013 and is paying Monthly; the next (i,e. 3rd) installment would be on 07/06/2013..

This is not hard to get.. I have that sorted.. But the problem is, my manager wants to be able to specify two dates and search all policies that will be 'paying in' that Date range should be picked up..

So if the search range happens to be.. 01/07/2013 and 31/07/2013 Then Mr Butters Stotch's policy should be picked up, as his next installment falls on 26/07/2013.. Since this information is not stored, I cannot run a direct Query on this.. Also as the Installment number varies for each customer, I would not be able to just add 1 - Month or Quarter or Annum, and see if the date falls in that range..

View 2 Replies View Related

Queries :: Finding Names That Appear More Than Once In A Table?

Jul 29, 2013

I have a table with associate names and rankings for each month. I need some way to find out which associates appear in 2 consecutive months with a certain rating. I have a query that will allow you to key in which month you want to look at, but I can't figure out how to write the query to return results only for those associates that appear twice in the months chosen. For example:

John Doe was rated 1.5 in May and 3 in June.
Jane Doe was rated a 1.5 in May and 1.5 in June.

I want a query that will allow me to put in May and June as the criteria as well as < 2 for the rating and only return those that show in both months...

View 5 Replies View Related

Queries :: Finding Difference Between Variables

Nov 8, 2013

What I am trying to do is the following

I have three columns

Name, Date, Number

What I need to do is find the difference in the number column where the Name is the same but the date is not ex:

Bob 2013-12-12 123
Bob 2013-12-15 456
Jane 2013-12-14 789
Jane 2013-12-25 987

So what I need to do is to get a result that is independent of date i.e.

Bob (456-123)
Jane (987 - 789)

View 2 Replies View Related

Queries :: Report Not Finding A Field

Oct 11, 2013

I have a form that runs a report with two text boxes, one combo box, and a button.

The text boxes hold dates and SQL feeds them the oldest and newest dates from their fields (Date Received and Date Taken). They work fine, when the form is opened, the fields are filled and if I change the dates, the report pulls back data from the correct range.

The combo box is called Analyst Name and this is the row source within the parenthesis (SELECT [PickList-AnalystName].ID, [PickList-AnalystName].[Analyst Name], [PickList-AnalystName].[Analyst Manager] FROM [PickList-AnalystName];). The bound column is 2. The correct names are displayed, it looks like it works fine but then there's the button.

The button is named cboAnalyst. Enabled - yes. On Click - Event Procedure. This is the code with the backslashes added:

option compare database
//Private Sub cboAnalyst_Click()
Dim strCriteria As String
If IsNull(Me.[Analyst Name]) Then
strCriteria = ""
Else
strCriteria = "[Analyst Name] = "" & Me.[Analyst Name] & """
End If
DoCmd.OpenReport "Ad Hoc Reporting", acPreview, , strCriteria
End Sub

If I run this without a name, I get back all of the data within the right time frame. Once I put a name in, the report comes back empty, showing 0 for the count. I don't even get an error, I just get that empty report.

View 3 Replies View Related

Queries :: Finding Top Three Values In Six Fields?

Oct 3, 2013

I'm doing a medical db, where I'm trying to calculate ISS

Code:
en.wikipedia.org/wiki/Injury_Severity_Score

There are 6 values, and i have to sum the largest three (squares to be precise). How can I get three highest values from 6 fields in the same record?

View 1 Replies View Related

Queries :: Finding Unmatched Records With A Condition?

Dec 26, 2013

I want to find unmatched records, where there is a condition. Specifically, which employees did not get a specific mail.

My employees are in this table:

tblEmployees
---------------
EmployeeID (PK)
FullName (text)

and sent mails are logged in tblMailsSent

tblMailsSent
--------
MailID (FK)
EmployeeID (FK)

so I want to find all the employees in tblEmployees whose EmployeeID may or may not be in tblMailsSent with some other MailID's but definitely not with the specific one I am looking for.

I find my own method for doing this rather clumsy, so do you happen to have a nice recipe?

View 3 Replies View Related

Queries :: Finding Only The Clients That Has Only 4 Types Of Products?

Sep 14, 2014

find only some clients that has only 4 types of products, but no other type of products.

Just to put it in a much easier way to understand. If I have to find only the client that did buy only 1 or more from the 4 products. Fridge, tv, dvd player, mobile phone. But I'm not interested in the clients that also did buy for example, laptop, pc, video cameras, etc. So if the client has only one of the 4 products, I want to list them all, did they buy another type of product too, then not.

How could I create a query that will show me only those clients?

View 4 Replies View Related

Queries :: Finding Latest Number Using A Query

Jun 19, 2013

I need to find the latest number using a query.

All of the numbers follow this format:

[Doc No]
ABCD123

but the tricky part is the number could be suffixed with a revision. It is the latest revision I would like to find. For example, If I have a number followed by 3 revisions I would have:

[Doc No]
ABCD123
ABCD123+200
ABCD123+300
ABCD123+400

I need a query to give me the latest revision, in this case

[Doc No]
ABCD123+400

There is a possibility there are no revisions in which case the latest will be

[Doc No]
ABCD123.

How is this possible in a query???

View 5 Replies View Related

Queries :: Finding Booked Vehicles Between Dates

Apr 15, 2013

I have a Table with Date Booked From and Date Booked Till

I want a query to show all booked vehicles between the dates in a parameter query, I thought I solved the issue but this is not the case

I am using the following codes

DateFrom - >=[ENTER Start Date]
DateTill - <=[Enter End Date]

All works fine but I have noticed if I put in the

start date 01/01/2013 and End Date 07/01/2013

if there is any vehicles booked between these dates E.g. 03/01/2013 - 05/01/2013, they wont show up.

how can i get round this problem?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved