dbTalk Databases Forums  

Laugh or Cry (part 2)

comp.databases.theory comp.databases.theory


Discuss Laugh or Cry (part 2) in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cimode
 
Posts: n/a

Default Laugh or Cry (part 2) - 07-22-2009 , 12:27 PM






A quote from Experts Exchange...I let you judge for yourself...

<<
Just to clarify, the fact that I have duplicates isn't a problem --
the problem arises when I'm trying to SUM the value of one of the
fields in tblSuite. I just need to know how to ignore those
duplicates, not to get rid of them.
>>

Reply With Quote
  #2  
Old   
Walter Mitty
 
Posts: n/a

Default Re: Laugh or Cry (part 2) - 07-22-2009 , 12:56 PM






"Cimode" <cimode (AT) hotmail (DOT) com> wrote

Quote:
A quote from Experts Exchange...I let you judge for yourself...


Just to clarify, the fact that I have duplicates isn't a problem --
the problem arises when I'm trying to SUM the value of one of the
fields in tblSuite. I just need to know how to ignore those
duplicates, not to get rid of them.

I'll laugh, thanks.

Reply With Quote
  #3  
Old   
Walter Mitty
 
Posts: n/a

Default Re: Laugh or Cry (part 2) - 07-22-2009 , 01:08 PM



"Cimode" <cimode (AT) hotmail (DOT) com> wrote

Quote:
A quote from Experts Exchange...I let you judge for yourself...


Just to clarify, the fact that I have duplicates isn't a problem --
the problem arises when I'm trying to SUM the value of one of the
fields in tblSuite. I just need to know how to ignore those
duplicates, not to get rid of them.

I would be tempted to offer something like the following in ExpertsExchange:

select sum (TheColumn) as Total
from (select distinct * from TheTable);

But I would be afraid that somebody would not realize that I'm just goofing.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.