Script problem....

03/12/2015 16:46 Appius4S#1
Hello guys ... i want to insert all values from TITEMTABLE_BACKUP in TITEMTABLE but if i set "SELECT TOP 1" the function inserted in the table the first object what corresponding with(dwOwnerID) .. I want to insert my all objects that correspond with dwOwnerID, if I delete (TOP 1) receive the following error : 21000 - [SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
i hope you can help me , thx
Here is script:
EDIT:TENTERSERVER execute this script
03/12/2015 16:57 NightProfit#2
Deleted
03/12/2015 16:59 Appius4S#3
facepalm ... you read what i write ?
03/12/2015 17:16 iJirkusCZ#4
Why you are doing it so hard? Just make INSERT INTO TITEMTABLE SELECT * FROM TITEMTABLE_BACKUP WHERE dwOwnerID = @dwCharID
03/12/2015 17:36 Appius4S#5
yeah i have do this ... now 2 min ago :) thx anyway :) after i finish i will post bypass here
03/12/2015 17:37 Syntaxfehler#6
Script:

PHP Code:
ALTER PROCEDURE [dbo].[test]
@
dwCharID        INT
AS
        
INSERT INTO TGAME_GSP.dbo.TITEMTABLE SELECT FROM TGAME_GSP.dbo.TITEMTABLE_BACKUP WHERE dwOwnerID = @dwCharID 
Edit:

Too late, I didn't refresh.
03/12/2015 20:20 Sicarium#7
You can use the pointers as well.