Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
m.bhatti
Starting Member
1 Post |
Posted - 2012-04-10 : 21:24:45
|
| Hi,I have a table DAT is which I have let's say seven columns. One of them is IND which is table ID and other is COY. I have some rows against COY = 1 and some against COY = 2. I want to copy all the data in the table with COY = 1 such that all the COY= 1 is copied as COY=2 i.e copy data across COY = 1 to COY = 2.I want stored procedure that would not overwrite any existing data where COY = 1 is equal to COY2 and it copies the remaining data |
|
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-04-11 : 01:35:21
|
| Why do you want to export the field having some value to another table and give the field another value? What is the point of Exporting here?You could take the count for the field COY where COY=1 from old table and then simply insert COY = 2 as many times as the value returned by the count.Why Export when you only need the field name and not the actual data of the field?Vinu Vijayan |
 |
|
|
|
|
|