• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 68
  • Last Modified:

MS SQL Query + Merge Data

I have a table that i am using to load data in my database, i want to move the data to another table, and merge the rows that have the same Call_ID into one row.

so if call_id is the same, then it would only create one row in the new table, is this even possible with a query ?
0
dkilby
Asked:
dkilby
1 Solution
 
PortletPaulfreelancerCommented:
Yes, using the MERGE command
0
 
Scott PletcherSenior DBACommented:
Be aware that MERGE has sometimes has performance issues.  There are also some claims of faulty logic.

For now, I'd stick the "standard" UPDATE and then INSERT.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now