Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Avoiding 'No Rows Selected' in the SQL Result set

LazarJun 20 2018 — edited Jun 21 2018

Hi All,

I need some help from you guys on overcoming the 'no rows selected' message when executing a select statement(Sql developer-->f5(Run Script)).

Below is the sample code on which resulting as no rows selected.

Scripts:-

CREATE TABLE CHECK_VAL(C_ID VARCHAR2(100),C_NAME VARCHAR2(100),STATUS VARCHAR2(100))

/

INSERT INTO CHECK_VAL VALUES('A1191','TOM WAREEN','AVAILABLE');

INSERT INTO CHECK_VAL VALUES('B1186','MADDY','OOO');

INSERT INTO CHECK_VAL VALUES('B1123','BUSHAN','BUSY');

INSERT INTO CHECK_VAL VALUES('B1192','SHIV','AVAILABLE');

COMMIT;

/

SELECT 'Employees Available' scenario,

c_id,count(1)

FROM CHECK_VAL

WHERE STATUS = 'INACTIVE'

GROUP BY c_id

/

Desired Output(if no records found):-

 

ScenarioC_idcount(1)
Employees AvailableNil0

Someone pls help me to achieve this.

Regards,

Lazar

This post has been answered by Mustafa KALAYCI on Jun 20 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2018
Added on Jun 20 2018
9 comments
9,620 views