microsoft / microsoft/sql-server-samples
EPM-framework - Invalid length parameter passed to the RIGHT function in policy.v_EvaluationErrorHistory
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
Executing SELECT * FROM policy.v_EvaluationErrorHistory in EPM-framework can result in following error when EvaluatedObject doesn't contain a backslash:
Invalid length parameter passed to the RIGHT function
Checking if a backslash is present solves the issue:
case when CHARINDEX('\', REVERSE(EvaluatedObject)) >0 then RIGHT(EvaluatedObject,CHARINDEX('\', REVERSE(EvaluatedObject)) - 1) else EvaluatedObject end
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the definition of policy.v_EvaluationErrorHistory and run SELECT * FROM policy.v_EvaluationErrorHistory with an EvaluatedObject that contains no backslash. Check the RIGHT expression responsible for the invalid length error, then verify the view handles both backslash and no-backslash values without changing the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100