Solved

Copying a record from Table1 To Table1

Posted on 2011-02-15
3
934 Views
Last Modified: 2012-05-11
Hello All,

What I'm wanting to do is copy a record from table1 then copy it back to table1 with a new partnumber.  Part Number is a key field.

Question:  Is there a way to do this using a sql statement.

Thanks in advance!

Jim
0
Comment
Question by:transstates
3 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 34900063
Yes, you can do something along the lines of:
INSERT INTO Table1 ( [partnumber], [List of other columns] )
    SELECT 'newpartnumber', [List of other columns] FROM Table1 WHERE [comparisoncolumn] = somevalue;

Open in new window

0
 
LVL 3

Expert Comment

by:DEVLitehouse
ID: 34900086
Yes, this is actually very straightforward. Please give the table definition, and I'll work out the SQL for you.
0
 

Author Comment

by:transstates
ID: 34900412
Right on!  

Thanks.  That did it!

Jim
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now