Good day
how can I how can i get the results from the CTE below to be actually added to a table(apicultureentries). your help will be greatly appreciated. I am using Sql Server 2016
With AllMarks AS
(SELECT
CompetitorID,
ApiEntryId,
AverageMark,
RANK() OVER (ORDER BY AverageMark)AS RankPosition
FROM ApicultureEntries
)
SELECT
a.*,(CASE WHEN a.RankPosition < 14 THEN 150 - RankPosition * 10 ELSE NULL END) AS PositionEarned
FROM AllMarks AS a
What I have tried:
insert into apiculture , select into