Results 1 to 5 of 5
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Table Query

    Here i have a situation i have a table where like below

    Name | orderno | mail no | contact No |
    ---------------------------------------
    a |123 |5555 | 553453 |
    b |321 |8569 | 52353 |


    a |123 |2344 | 553453 |
    c |143 |567 | 553453 |
    d |173 |6787865| 553453 |

    Bad table :P
    But i need a separate table where the entry of all the entries where a is coming only once.
    Can this be possible.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not sure I understand.

    You need this data separated into Customers and Orders tables?

    SELECT [Name], [mail no], [contact no] GROUP BY [Name], [mail no], [contact no];
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Quote Originally Posted by June7 View Post
    Not sure I understand.

    You need this data separated into Customers and Orders tables?

    SELECT [Name], [mail no], [contact no] GROUP BY [Name], [mail no], [contact no];
    I need the result to be:

    Name | orderno | mail no | contact No |
    ---------------------------------------
    a |123 |5555 | 553453 |
    b |321 |8569 | 52353 |
    c |143 |567 | 553453 |
    d |173 |6787865| 553453 |

    only distinct order number

  4. #4
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    So you want to delete duplicates? You can run a query wizard to find them.
    If you want it alphabetical then go back into the design view and and make the Name field sorted by "Ascending"

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Selecting distinct order_no would be easy. However, all fields must be considered in determining uniqueness of record. Mail_no is different for each record. Why did you delete mail_no 2344?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-15-2012, 02:41 PM
  2. Replies: 2
    Last Post: 10-09-2012, 03:20 PM
  3. Replies: 6
    Last Post: 05-10-2012, 08:20 PM
  4. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums