Nestor
2008-03-09 01:24:18 UTC
How can I use an inline expression instead of @TrainTable in this DMX
expression?
INSERT INTO MINING MODEL [TwoLinesData_InSample_ModelRuns_99991231_235959] (
[DateS]
,[Line]
,[X]
,[Y]
) @TrainTable
Something like
Select '2001-01-01' as DateS, "Line1" as Line, 1.1 as X, 2.2 as Y
union all
Select '2001-01-02' as DateS, "Line2" as Line, 2.2 as X, 3.3 as Y
I know you can do it for PREDICTION JOIN as shown below. But I cannot find a
way to do it in an INSERT INTO command.
SELECT
T.Y as [Actual]
,Predict([Y]) as [Predict]
FROM [TwoLinesData_InSample_ModelRuns_99991231_235959]
NATURAL PREDICTION JOIN (
SELECT
'1/1/2000 12:04:00 AM' as [DateS],
'Line1' as [Line],
5.36 as [X],
38.10729061 as [Y]
) AS T
Many thanks, Nestor
expression?
INSERT INTO MINING MODEL [TwoLinesData_InSample_ModelRuns_99991231_235959] (
[DateS]
,[Line]
,[X]
,[Y]
) @TrainTable
Something like
Select '2001-01-01' as DateS, "Line1" as Line, 1.1 as X, 2.2 as Y
union all
Select '2001-01-02' as DateS, "Line2" as Line, 2.2 as X, 3.3 as Y
I know you can do it for PREDICTION JOIN as shown below. But I cannot find a
way to do it in an INSERT INTO command.
SELECT
T.Y as [Actual]
,Predict([Y]) as [Predict]
FROM [TwoLinesData_InSample_ModelRuns_99991231_235959]
NATURAL PREDICTION JOIN (
SELECT
'1/1/2000 12:04:00 AM' as [DateS],
'Line1' as [Line],
5.36 as [X],
38.10729061 as [Y]
) AS T
Many thanks, Nestor