Results 1 to 2 of 2
  1. #1
    udigold1 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    29

    Return one one description per item


    Hi,
    Let's say I've got a portfolio of stocks, that are managed in different banks.
    Each Stock has a unique ID but can have a different description, depends on the bank, like the Following list:

    ID DESC
    x1x1x1 Bla Ltd
    x1x1x1 Bla Corp
    x1x1x1 Bla Corp US
    x3x3x3 Jcom
    x3x3x3 Jcom US
    yzyzyz du.us
    yzyzyz du Corp
    XvvYyy milky.way
    XvvYyy milky Corp

    I just want to get a table with one row per unique Stock, with description (I don't care which one) like the following:

    ID Desc
    x1x1x1 Bla ltd
    x3x3x3 Jcom
    yzyzyz du.us
    XvvYvv milky.way

    how do I get it?
    Thanks,

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    depends on whether you need to modify the data. Also need to decide whether your data structure is correct.

    you might split the date into two tables

    tblProducts
    ProductID
    GenericDesc

    tblAliases
    ID
    ProductID
    BankID
    BankProductDesc


    or if you don't need to modify the data, use a group by query

    SELECT ID, First(Desc) as FirstDesc
    FROM myTable
    GROUP BY ID

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

Similar Threads

  1. Replies: 7
    Last Post: 11-29-2015, 07:24 AM
  2. one item but different description and prices
    By tommyried in forum Database Design
    Replies: 5
    Last Post: 12-30-2013, 05:00 PM
  3. Replies: 5
    Last Post: 10-11-2013, 07:29 AM
  4. Link item ID and description
    By v!ctor in forum Access
    Replies: 2
    Last Post: 11-20-2012, 01:57 PM
  5. Return most recent entry for each item
    By GenAp in forum Queries
    Replies: 1
    Last Post: 02-04-2010, 05:30 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