Jump to content

Return a value when multiple subqueries are true


gallagie
 Share

Recommended Posts

Hello,

I have a report looking at courses for my college. Each course can have multiple attributes (which I return with a sub query for each stating 'Y' or 'N' if they are associated with said attribute). My end user is requesting an additional column which states if they are associated with multiple attributes - so the column will return 'Y' if they have multiple attributes, or a 'N' if they only have one attribute. I am requesting assistance in coding the 'Multiple' column, as I am returning a Y or N for each attribute by using sub queries, and not quite sure how to compare the sub queries together to return a value if they have multiple attributes (meaning more than one of the sub queries will return a 'Y').

Thank you.

 

image1.png.e83ebd9467f44327258162659f830126.png

 

1905352850_2018-08-1308_51_05-gallagie@PROD-PL_SQLDeveloper-script_sql.png.212a3fcbfebafad16ee58c2ed73532c0.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...