-
Notifications
You must be signed in to change notification settings - Fork 2
Description
File Specification Number and Name
194 - Young Homeless Children Served (McKinney-Vento)
What Happened?
In RDS.Create_ReportData - some issues in the dynamic sql.
-
At line 71 in the SEA dynamic SQL - I added fact.SeaId to the select list because line 54 was looking for DimSeaID but it wasn't being called by the inner join.
-
At line 405-409 in the Lea and 401-404 in the Sea, I hardcoded @reportcode, @reportYear, @reportLevel, and @categorySetCode to get the SQL to run. I'm not completely clear if these variables somehow get passed when you run it from the stored procedure, but when I pulled the SQL out of debug mode they were coming up as errors. I'm sure it would be better to declare variables somewhere but just wanted to report that it causes an error as it currently is written.
example:
where f.ReportCode = 194 -- @reportcode
and f.ReportYear = 2025 -- @reportYear
and f.ReportLevel = 'lea' -- @reportLevel
and f.CategorySetCode = isnull('csa'/@categorySetCode/, f.CategorySetCode) -
Then there's a section below that where @dimSchoolYearId & @dimFactTypeId get declared again but they were already declared so I just commented out that section.
-
#cat_AGE gets created twice in the dynamic SQL, causing an error. First is on line 20ish, in the category set section. Then again around 449 in the #Cat_organizations section. I renamed the second instance of #cat_AGE to #cat_AGE_new (for all the #cat_AGE below approx line 449).
-
This one is really an error with our data, but it did cause the dynamic sql to fail so I wanted to mention it. We have one lea that doesn't have an NCES ID assigned to it in Generate. When it gets to the point where it inserts the data into the RDS.ReportEdFactsK12StudentCounts, it won't allow a null to be inserted into OrganizationIdentifierNCES and bombs out. For my purposes, I just added a line at 687 :
--and [OrganizationIdentifierNces] is not null --
to make it exclude nulls so I could at least get a file out to show all the other districts. -
One more thing I noticed that did not cause an error but probably shouldn't exist is that there are some dates hardcoded in the dynamic sql. I saw some around line 172 for lea.RecordStartDateTime and lea.RecordEndDateTIme.
Steps to Reproduce
No response
Version
v13.0
Logs or Error Output
Priority
Medium
Code of Conduct
- I agree to follow the Code of Conduct.