update column from another database table

10/01/2015 09:08 where_love2003#1
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
10/01/2015 16:11 mtnman33#2
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 .
10/01/2015 17:00 ​Goofie​#3
Word.

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

etc...
10/01/2015 19:01 ​Exo#4
PHP Code:
UPDATE Old SET Old.Col = New.Col FROM _OldTable Old INNER JOIN _NewTable New ON Old.IDENT = New.IDENT 
10/03/2015 18:11 $WeGs#5
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.


10/03/2015 22:51 where_love2003#6
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.


[Only registered and activated users can see links. Click Here To Register...]
thanks bro but this not i mean
10/04/2015 00:36 Royalblade*#7
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 fuck up your DB to make it slow as fuck.
Gratz.
10/04/2015 02:04 ​Goofie​#8
Quote:
Originally Posted by Royalblade* View Post
and THAT is how you fuck up your DB to make it slow as fuck.
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 shit. but yeah, that works perfectly for having a backup to copy/look stuff in.
10/04/2015 02:38 $WeGs#9
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 shit. 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
10/04/2015 12:44 ​Exo#10
y u no try mai post #4 fyll werk
10/04/2015 16:24 Royalblade*#11
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?
10/04/2015 17:30 ​Exo#12
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 :((