I have the following code being used in a parameter:
SELECT OU1.OU_CODE AS PROCESS_LEVEL
, RTRIM(OU1.OU_CODE) || ' - ' || AD1.DEPARTMENT_NAME AS Description
FROM ODS_OWNER.POSITION_ASSIGNMENTS PE1
JOIN ODS_OWNER.ADMIN_DEPARTMENTS AD1 ON PE1.DEPARTMENT_ID = AD1.DEPARTMENT_ID
JOIN ODS_OWNER.ORGANIZATIONAL_UNITS OU1 ON AD1.OU_CODE = OU1.OU_CODE
WHERE PE1.POSITION_LEVEL = 1
AND COALESCE(PE1.END_DATE, CAST('01/JAN/1753' AS DATE)) = CAST('01/JAN/1753' AS DATE) --PE1.END_DATE = '1/1/1753'
AND ( (:SCHOOLORCENTRAL = 'SCHOOLS' AND OU1.OU_CODE = '700')
(:SCHOOLORCENTRAL = 'ALL' AND OU1.OU_CODE > '1')
GROUP BY OU1.OU_CODE
ORDER BY AD1.DEPARTMENT_NAME
I am getting an ORA-01722:invalid number error.
I am using Microsoft Visual Studio 2008. I know the problem is with the lines containing the :SCHOOLORCENTRAL parameter but have no clue how to correct the error. Can someone show me how to write one of these lines correctly? Thank you
Software/Hardware used: 2008 Visual Studio
Ask a Question
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!