Ask Experts Questions for FREE Help !
Ask
    ChaseWashington's Avatar
    ChaseWashington Posts: 3, Reputation: 1
    New Member
     
    #1

    May 4, 2007, 03:41 PM
    Consolidate fields on query
    OK I know there is an easy way to do this and for the life of my I cannot figure it out...

    When designing a query, how can you make it where a certain field only lists once.

    For example if you are trying to pull names from a customer list for people that have spent more than $100. Some people may have spent more than $100 more than once... how can you get the query to show that person only one time on the query.

    Thank you so much for your time and help,
    Chase W.
    jstrike's Avatar
    jstrike Posts: 418, Reputation: 44
    Full Member
     
    #2

    May 31, 2007, 09:00 AM
    Use distinct.
    Select distinct customername from customerlist where totalcost>100.00

    Distinct applies to the whole select statement so if you have a John Smith in Chicago and a John Smith in Milwaukee you will only get one unless you add other fields:
    Select distinct customername, customercity from customerlist where totalcost>100.00
    That would return both John Smith's.

    HTH.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Calculating Fields [ 4 Answers ]

I'm setting up a Query in Design View and I need to find out the price per unit. I need to mulitply two fields, Amount and Quantity with the Answer in the Amount Field. What wording should I use? The two fields are from two different Tables.

Garden Fence over septic fields? [ 1 Answers ]

I would like to put a raised bed vegetable garden on top of my septic fields. It will need a fence as it is on a deer and woodchuck highway. Can I build a fence over my septic fields without ruining them:confused:

Cascading lookup fields... [ 3 Answers ]

Want to use the form frmCardDetails to populate tblCards. Want to select the sport from a lookup field linked to tblSports and then the League from tblLeagues, BUT only displaying the leagues that are included in that sport. I have looked at http://support.microsoft.com/kb/209595/en-us and...

DNS Query Query. A Query about DNS Queries... [ 12 Answers ]

I am a software developer, I don’t know much about networks. I have a working network but with one weird (well to me it’s weird) problem. If you can offer any insight I’ll be very grateful! <!--- Image Attachment Below (I couldn't find a way to paste it here in the editor :-( ) ---> ...


View more questions Search