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 |
|
sandeep1209
Starting Member
6 Posts |
Posted - 2012-03-20 : 02:41:17
|
| Hi frinds,In my database employee table contains six columns like , Now i suppose to create one duplicate table for employee instead of all columns i taken 3 columns for duplicate columns like belowselect * from employeeselect eno,ename,job into employee1 from employee select * from employee1 Now in duplicate table i added commotion column alter table employee1 add comm intNow commotion column contains null values now i want to add commotion values which are having in base table commotion fields How any one can tell me ?Thank's Sandeep.sandeep |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-03-20 : 15:12:46
|
are you learning update statement by any chance?Your problem doesnt sound like a practical scenarioif you want comm data also why not include it in select creating table itselfselect eno,ename,job,comm into employee1 from employee if you've already created table you need an update now update e1set e1.comm = e.commfrom employee1 e1join employee eon e.eno = e1.enoand e.ename = e1.enameand e.job = e1.job i hope eno,ename,job combination is unqiue within employee tableAlso as Brett says I didnt get reason why you're replicating data like this in first placecan you elaborate?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|