Hi,
I'm trying to move "leftover" data from one database table to another after the user clicked on a button. Please can anyone give me some advise. This is kinda really urgent plz.
Everytime i run my app it gives no error but also doesn't move my data. :angry:
I'm using a stored procedure and this is my code:
ALTER PROCEDURE dbo.MoveDeleteUplHis
/*
(
@parameter1 int = 5,
@parameter2 datatype OUTPUT
)
*/
@tel text
AS
SET IDENTITY_INSERT CompanyHistory ON
INSERT INTO CompanyHistory (CH_ID, CH_Tel, CH_SDT, CH_Duration, CH_Transaction, CH_Destination, CH_Amount, CH_Roaming, CH_Discount, CH_Status)
SELECT Upl_ID, Upl_Tel, Upl_SDT, Upl_Duration, Upl_Transaction, Upl_Destination, Upl_Amount, Upl_Roaming, Upl_Discount, Upl_Status
FROM Upload WHERE Upl_Tel LIKE @tel;
SET IDENTITY_INSERT CompanyHistory ON
DELETE FROM Upload WHERE Upl_Tel LIKE @tel;
/* SET NOCOUNT ON */
RETURN