Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 08:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



update column from another database table

Discussion on update column from another database table within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
where_love2003's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 190
Received Thanks: 27
update column from another database table

morning epvp
i want to know how can i update column from another database table
like
want copy column Sellprice from
Olddb.._refobjcommon
and insert to
newdb.._refobjcommon

i`am not sure if i can or no
i hope help me
where_love2003 is offline  
Old 10/01/2015, 16:11   #2
 
elite*gold: 0
Join Date: May 2012
Posts: 179
Received Thanks: 54
yes you can do this but you will need to follow this step by step process exactly once done then you can change it however needed .
1. Right click on the database you want to copy and click on "Design"
that will open it up to the DB format of the table .
2. right click on the same table and go to "New Table"
that will open up a blank table of the same design .
3. go back to the first table which you want to copy and click on the top left block which will highlight the whole table and all its fields and hit "Ctrl+C" on your keyboard
that will copy the whole table and all its fields exactly
4. go back to your new table your making and click on the top left block to highlight the whole table again and hit "Ctrl+V" to paste all table options
now that the table is created you can save it by clicking on the X top right of the table and type in whatever name you want BUT DO NOT save it as the same exact name or it will cause huge problems , just save it as copy or new or something until your ready to use it once its ready you can swap names from the 2 back and forth anytime the game server is not running .
5. once saved close out both tables and restart your SQL so the new table will show up
and open both tables by clicking "Edit all Rows"
you will see the old table is full and the new table is empty but exactly the same tables
6. click on the top left box in the old table to highlight all the table contents you want to copy and move to the new table by right clicking on the blue inside the table and go to Copy --> which is when you can also put on notepad to edit and remove any you don't want to keep
final step left click on the new table you just created and right click on the blue inside the table and going to Paste that will put all the lines in the new table and its ready to use . be sure to hit "Execute" on the top before you close it or some of the fields may not be active depending on if you want to change different values of the tables like key restraints or order descending or whatever reason why your changing the tables .

Well good luck that's how you do it and i hope this helps

should you have any problems just send me a message on here and i will be glad to help .
mtnman33 is offline  
Old 10/01/2015, 17:00   #3
 
elite*gold: 0
Join Date: Apr 2015
Posts: 1,444
Received Thanks: 1,371
Word.

select * into SRO_VT_SHARD2.dbo._RefObjCommon
from SRO_VT_SHARD.dbo._RefObjCommon

etc...
​Goofie​ is offline  
Old 10/01/2015, 19:01   #4


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
PHP Code:
UPDATE Old SET Old.Col = New.Col FROM _OldTable Old INNER JOIN _NewTable New ON Old.IDENT = New.IDENT 
​Exo is offline  
Old 10/03/2015, 18:11   #5
 
elite*gold: 135
Join Date: May 2015
Posts: 624
Received Thanks: 710
delete or rename old table and then follow this small tutorial made by me.

*note* SR_CHINA_CS , is your old database that you will copy from.


$WeGs is offline  
Thanks
1 User
Old 10/03/2015, 22:51   #6
 
where_love2003's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 190
Received Thanks: 27
Quote:
Originally Posted by $WeGs View Post
delete or rename old table and then follow this small tutorial made by me.

*note* SR_CHINA_CS , is your old database that you will copy from.


thanks bro but this not i mean
where_love2003 is offline  
Old 10/04/2015, 00:36   #7
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,055
Received Thanks: 1,643
Quote:
Originally Posted by ​Goofie​ View Post
Word.

select * into SRO_VT_SHARD2.dbo._RefObjCommon
from SRO_VT_SHARD.dbo._RefObjCommon

etc...
and THAT is how you **** up your DB to make it slow as ****.
Gratz.
Royalblade* is offline  
Old 10/04/2015, 02:04   #8
 
elite*gold: 0
Join Date: Apr 2015
Posts: 1,444
Received Thanks: 1,371
Quote:
Originally Posted by Royalblade* View Post
and THAT is how you **** up your DB to make it slow as ****.
Gratz.
Is warking vary gut menz, anyway. Took he wanted to copy his obj common from another db to steal stuff, didn't read that he wanted to insert ****. but yeah, that works perfectly for having a backup to copy/look stuff in.
​Goofie​ is offline  
Old 10/04/2015, 02:38   #9
 
elite*gold: 135
Join Date: May 2015
Posts: 624
Received Thanks: 710
Quote:
Originally Posted by ​Goofie​ View Post
Is warking vary gut menz, anyway. Took he wanted to copy his obj common from another db to steal stuff, didn't read that he wanted to insert ****. but yeah, that works perfectly for having a backup to copy/look stuff in.
i was thinking about this ( he wanted to copy his obj common from another db ),
but he want to copy sellprice only , i think he made changes in sellprice and wanna back it again .

thank you
$WeGs is offline  
Old 10/04/2015, 12:44   #10


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
y u no try mai post #4 fyll werk
​Exo is offline  
Old 10/04/2015, 16:24   #11
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,055
Received Thanks: 1,643
Quote:
Originally Posted by ​Exo View Post
y u no try mai post #4 fyll werk
he no understand wat he need to change. Cuz u wrote "IDENT". Y U NO WRITE ID?
Royalblade* is offline  
Old 10/04/2015, 17:30   #12


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by Royalblade* View Post
he no understand wat he need to change. Cuz u wrote "IDENT". Y U NO WRITE ID?
becuz, becuuuz, lookz bettar (
​Exo is offline  
Reply


Similar Threads Similar Threads
[Help]Codding item to update column
06/11/2015 - Flyff Private Server - 3 Replies
Slove ::
Query to Modify Anything in Any Column of Any Table in Any DB
06/08/2014 - Shaiya PServer Guides & Releases - 15 Replies
Damn this post was old already but it helped me alot, in fact not only helped me but also I'm a bit less nub in query stuff thanks to the advises that you guys gave me in the comments and thanks to my hard work (it will seem not hard for you but I guess you guys will understand what I'm saying) :). Well those 2 query mean nothing compared to the changes I made at this one grabing what everyone said in comments here specialy what nubness said here my ty to you friend. Anyway here is the true...
Requesting A Sql Ip ban database table design
01/18/2012 - Shaiya Private Server - 3 Replies
if you have one i can copy 2 make a ip ban table for my shaiya server i would love it thanks Shaiya Private Server
[HELP]database table
10/17/2010 - EO PServer Hosting - 1 Replies
who can explain one by one about db table start account to last table userpksort...thier funtion and how to use/edit them..tq
MSSQL Select column from table
03/19/2010 - Dekaron Private Server - 3 Replies
Hi , i have a little problem with mssql , cuz i wanted read out some columns to show in a table with php. My Question is how i can make a row of the dataset. I tried it but i see only the same in the table not the next entries of the column. here a part of the code: echo "<center><table border='1'><tr>



All times are GMT +1. The time now is 08:14.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.