Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 26th, 2007, 07:15 AM
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default insert a duplicate row with one changed field only

hi,
i hav to insert a duplicate row with one changed field only.
table doesn't have any primary key.
field to be changed is also the field used for selection crieteria.
i m using sql server 2005.
please help.
thanks.
  #2 (permalink)  
Old December 31st, 2007, 04:54 AM
Friend of Wrox
 
Join Date: Oct 2007
Location: , , .
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

It is very poor practise, that you are using table without primary key, you will not able to delete/update record properly, if you are using sql server. Can't you write two insert statments, one by one, with changed value.

urt


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot insert duplicate key row in object 'dbo.mov alxGramma SQL Server 2005 4 April 15th, 2008 01:42 PM
cannot insert duplicate key row in object 'Table' skyline666 SQL Server 2005 0 April 15th, 2008 05:03 AM
Removing duplicate Value Row milindsaraswala Excel VBA 0 November 14th, 2007 06:11 PM
How to duplicate 1 row in table minhpx SQL Language 1 December 20th, 2004 09:51 AM
hidden field to be changed to button? dorothee ASP.NET 1.0 and 1.1 Basics 4 June 11th, 2004 02:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.