Register for your free account! | Forgot your password?

You last visited: Today at 07:00

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

Advertisement



SQL Help.

Discussion on SQL Help. within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 133
Received Thanks: 44
SQL Help.

By a mistake I f*cked up my IDs in coloumn Link in refobjcommon. What I need is this : A query which will take all IDs from the original back up of the database ( I have it restored under the SRO_VT_SHARD name) and put them in my new db with condition which says : replace all ids until u reach ID (coloumn name ID) 42000 (example). That's all I hope you get it. Thanks in advance!
DirtyMind is offline  
Old 04/05/2013, 13:19   #2
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
Code:
UPDATE dbo._RefObjCommon
SET Link = r2.Link
FROM dbo._RefObjCommon r1
JOIN Backup.dbo._RefObjCommon r2 on r1.ID = r2.ID
WHERE r1.ID <= 42000
IceAmStiel is offline  
Thanks
2 Users
Old 04/05/2013, 17:06   #3
 
elite*gold: 0
Join Date: Nov 2011
Posts: 133
Received Thanks: 44



DirtyMind is offline  
Old 04/05/2013, 19:45   #4
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
Are you sure that your backup contains all valid Links?
IceAmStiel is offline  
Old 04/05/2013, 21:08   #5
 
elite*gold: 0
Join Date: Nov 2011
Posts: 133
Received Thanks: 44
Quote:
Originally Posted by IceAmStiel View Post
Are you sure that your backup contains all valid Links?
The query worked the problem is that it made the rest of the things with Link 0 ... before that they were okay but now I think I have to rebuild them on the hard way if there is no other way :/
DirtyMind is offline  
Old 04/05/2013, 21:33   #6
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
"the rest" I thought it's a backup lol
IceAmStiel is offline  
Reply




All times are GMT +2. The time now is 07:00.


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.