I'm fairly new to Oracle SQL and would like to know if anyone has any examples of how to do the following:
- I'd like to return the number of rows that exist in the following SQL Statement listed below. This SQL will be part of a larger SQL statement and I will be passing in the EMPLID identifier into the subquery. The result needs to be one value displaying the total number of records that match the SQL below. 'xyz' will eventually be passing in an employee's job position number using a reference from the parent SQL... ie: jbe.POSITION_NBR
- My SQL:
SELECT cjbe.EMPLID FROM PS_JOB cjbe
WHERE cjbe.POSITION_NBR = 'xyz'
GROUP BY cjbe.EMPLID
I'd like to know how I can pass in the poarent value of POSITION_NBR (I think I use jbe.POSITION_NBR) into my subquery and then return the total count of the EMPLID's found within that subquery.
Thanks for your help.