Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7439785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:45:19+00:00 2026-05-29T10:45:19+00:00

I have table in an MS Access database that looks like this: ID Symbol

  • 0

I have table in an MS Access database that looks like this:

ID    Symbol    Direction    Start_val    End_val    AW    
1     ABC       up           100          120        10    
2     ABC       up           110          130        11    
3     XYZ       down         350          380        15    
4     XYZ       down         340          390        15    

I am trying to delete duplicate symbols and directions that have overlapping start_val and end_val and the highest AW. For example in the table above the data matching id 1 has a start_val and end_val that overlap the start_val and end_val of id 2. Since id 1 has a smaller AW i want to delete that. For id 3 and 4, the start_val and end_val overlap but the AW is the same, so the smallest id is deleted.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:45:20+00:00Added an answer on May 29, 2026 at 10:45 am

    This should do the trick:

    delete tablename
    from tablename t1
    inner join tablename t2 on t1.Symbol = t2.Symbol
                               and t1.Direction = t2.Direction
                               and t1.Start_val >= t2.Start_val
                               and t1.End_val <= t2.End_Val
                               and t1.AW <= t2.AW
    

    Making the inner join with the same table with the restrictions:

    • equal Symbol;
    • equal Direction;
    • Bigger (or equal) Start_val;
    • Lesser (or equal) End_val;
    • Lesser (or equal) AW.

    will get you the list of rows that you want to delete.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that looks something like this: pageload --pageloadid (autoincrementing numeric id
I have an Access .mdb database with a Table that looks similar to: +---------+------+--------+
I have a ms access database that has one table for each photo album
so I have this problem. My Database has two tables that look something like
I have a self-referencing many-to-many relationship between users and managers that looks like this:
I have a legacy SQL schema which looks something like this: CREATE TABLE `User`
I have a table in an Access 2007 database. All fields are of type
I have an Access database in which I drop the table and then create
In an application we are developing, I have access to a database table which
If I have a class representing access to one table in my database in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.