-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRP SP_InsertIntoTable_ForecastIteration.sql
More file actions
35 lines (29 loc) · 1.26 KB
/
RP SP_InsertIntoTable_ForecastIteration.sql
File metadata and controls
35 lines (29 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
USE [NFL]
GO
/****** Object: StoredProcedure [RP].[SP_InsertIntoTable_ForecastIteration] Script Date: 1/28/2020 12:00:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: rsc
-- Create date: 2019-08-21
-- Description: insert into forecast iteration table; for use in Python
-- =============================================
ALTER PROCEDURE [RP].[SP_InsertIntoTable_ForecastIteration]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
/*
INSERT INTO TBL_ML_forecastIteration (tempoTimbri_forecastIteration,distanceMetric,weightMethods,powerParameter,algorithms,evalMetric,numberOfNeighbors,modelName,numberOfClasses)
SELECT SYSDATETIME(),distanceMetric,weightMethods,powerParameter,algorithms,evalMetric, numberOfNeighbors,modelName,numberOfClasses
FROM TBL_ML_forecastIteration_temp
*/
INSERT INTO RP.TBL_ForecastIteration (tempoTimbri_forecastIteration,modelName,numberOfClasses,forecastType)
SELECT SYSDATETIME(), modelName,numberOfClasses,forecastType
FROM RP.TBL_ForecastIteration_Temp
DELETE FROM RP.TBL_ForecastIteration_Temp
END