Viewing 5 posts - 1 through 5 (of 5 total)
Sorry I forgot to use the Edit
USE Warehouse
GO
WITH TermCte AS
(SELECT T.Term
...
April 12, 2019 at 3:54 pm
Ok one last question. I need to reference the row number in the first Cte which I renamed to make more sense. What I need to do is, anticipate the...
April 12, 2019 at 3:53 pm
OK Thank you everyone! The code is now working properly!
USE DBSource
GO
WITH...
April 12, 2019 at 3:19 pm
Ok I have changed the code. I added a things in the original code just because I was desperate. I tried changing the code closer to the original way that...
April 12, 2019 at 3:07 pm
USE DBSource
GO
WITH Cte1 AS
(SELECT T.Term
,T.TermEnd
,ROW_NUMBER() OVER(ORDER BY T.TermSort) AS RowNum
FROM Term
WHERE RIGHT(T.Term,2) IN ('SP','FA') AND T.TermReportingYear >= 2010
)
,Cte2 AS
(SELECT ID
,StuLevelStartTerm
FROM dbo.StudentAcadlevel
WHERE ID = '1221417'
)
SELECT *
FROM Cte1,offsetrow
JOIN Cte2,offsetrow
ON TC.Term = SC.StuLevelStartTerm
WHERE...
April 12, 2019 at 2:55 pm
Viewing 5 posts - 1 through 5 (of 5 total)