Hey all, I am new here and I been trying to figure this script out for a couple of days now. Trying to give it fresh looks but I just can't get it to work right.I am trying to copy information out of an old Database into a new one. But I only want specific information. Now I did write a SQL Script for this but I only get errors. I cant seem to figure out why the Data from the Old DB colums (same structure and data format) arent being entered in the NEW Database.This is the script I have now:DECLARE @newaccount varchar(17);DECLARE @name varchar(17);DECLARE @newbase int;DECLARE @newaccountid int;DECLARE @oldserial int;SET @newaccount = 'Characcount';SET @name = 'Charname';SET @newaccountid = CharID;SET @oldserial = oldserial;INSERT INTO Table FakeDB.dbo.tbl_base (DCK,Lock,Name,AccountSerial,Account,Slot,Race,Class,Lv,Dalant,Gold,BaseShape,EK0,EU0,EK1,EU1,EK2,EU2,EK3,EU3,EK4,EU4,EK5,EU5,EK6,EU6,EK7,EU7,LastConnTime,CreateTime,DeleteTime,DeleteName,FirstConnTime,HomeServer,Arrange,ES0,ET0,ES1,ET1,ES2,ET2,ES3,ET3,ES4,ET4,ES5,ET5,ES6,ET6,ES7,ET7) SELECT DCK,Lock,@name,@newaccountid,@newaccount,Slot,Race,Class,Lv,Dalant,Gold,BaseShape,EK0,EU0,EK1,EU1,EK2,EU2,EK3,EU3,EK4,EU4,EK5,EU5,EK6,EU6,EK7,EU7,LastConnTime,CreateTime,DeleteTime,DeleteName,FirstConnTime,HomeServer,Arrange,ES0,ET0,ES1,ET1,ES2,ET2,ES3,ET3,ES4,ET4,ES5,ET5,ES6,ET6,ES7,ET7FROM RF_World223fix.dbo.tbl_base WHERE Serial = '@oldserial'
Oh I should mention that the records are already there in the new DB but empty. So same rows and colums but empty without data.