Jump to content
gallagie

Return a value when multiple subqueries are true

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...