Solved

Duplicate lines in a SQL table

Posted on 2013-05-17
2
416 Views
Last Modified: 2013-05-17
Hi

I have a SQL table called Transactions with a field Transaction ID. I want to duplicate lines with a certain TransactionID. What SQL statement would I use to do this?
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 500 total points
ID: 39176744
insert into Transactions
select * from Transactions
where Transactionid = id

OR

insert into Transactions
select * from Transactions
where Transactionid in (id,id,id)
0
 

Author Closing Comment

by:murbro
ID: 39176755
Thanks
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can I skip a node in XML? 9 35
disk usage reporting tools 27 57
Searching a barcode number within a string. 7 27
Trigger C# code inside the SQL Server 6 36
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question