Skip to content
Advertisement

SQL CASE Expression

I need to write a sql statement(Oracle) where I can withdraw data from two diff tables and check for a condition and return a certain string. My statement goes like this,

When I run this I get a error: “FROM keyword not found where expected”and points to the c in line 2. and if I change the from to line 2, it gives error: “SQL command not properly ended”. and points to line 3 r in “case review.comments”

Advertisement

Answer

You need a JOIN, aggregation, and to fix the CASE expression syntax. I assume you want something like this:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement