Selasa, 29 Maret 2016

Re: [MS_AccessPros] Re: limiting data from table

 

Patty-


You could try this:

SELECT  DISTINCT dbo_claim_charges.charge_id, dbo_claim_charges.enc_id, dbo_claim_charges.create_timestamp,
     dbo_claim_charges.claim_id
FROM do_claim_charges;

But I'm not sure that will get you what you want.  That will give you one row per unique set of all those fields.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Mar 29, 2016, at 3:32 PM, pattykf@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have never written a DISTINCT query before, I have tried a couple of options but not sure what I am doing with it, 

I want it to limit but I need other fields, and so I must have something wrong here. I tried to put the select distinct and the columns needed but then it returned the full list again, so I knew that was wrong, so tried to select it in two rows but still not right, did try to find examples out on the web but no luck so back to you all

this was my last attempt and obviously wrong:

SELECT  dbo_claim_charges.charge_id, dbo_claim_charges.enc_id, dbo_claim_charges.create_timestamp,
SELECT DISTINCT dbo_claim_charges.claim_id,
FROM dbo_claim_charges;

thank you for help

Patty



---In MS_Access_Professionals@yahoogroups.com, <pattykf@...> wrote :

I have  a table (I did not design it) that has a field called claim_id, charge_id, enc_id plus others

the claim_id and enc_id become duplicate rows due to charge_id having multiple charges on the same claim/encounter. How can I pull the data from this table where I would only get the claim_id/enc_id to show up unduplicated?

thank you 

Patty




__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

.

__,_._,___

Tidak ada komentar:

Poskan Komentar