GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

UNION question

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • UNION question

    Hi All,

    I am creating a temporary table which is the union of three selects each producing an ID and a score. If I use UNION on its own I lose any duplicated rows. If I use UNION ALL I get some rows with the same ID but different scores. What I want instead is to end up with unique IDs with the score column being the sum of the scores for any duplicate rows. Is this possible? Does anyone have any suggestions?

    Thank you,

    Rob
Working...
X