I want to copy data to A_Table
data from B_Table
then finally delete the B_Table
data
I just created following
CREATE PROCEDURE [dbo].[Copy_ProductStatistics]
(@Product_ID nvarchar, @ProductName nvarchar,@CreatedDate datetime)
AS
BEGIN
INSERT INTO A_Table(Product_ID, ProductName,CreatedDate)
SELECT Product_ID, ProductName,CreatedDate
FROM B_Table
WHERE (Product_ID = @Product_ID AND ProductName = @ProductName AND CreatedDate = @CreatedDate
DELETE FROM B_Table
END
then I called it like following
[HttpGet]
public ActionResult Copy_DatatoProductStatistics()
{
var incomplete_product_result = db.Database.SqlQuery<ProductStatistics>("Copy_ProductStatistics");
return RedirectToAction("FileUpload", "FileUpload");
}
this is not popping any error seems like ,problem is in stored procedure