Skip to content
Advertisement

Creating a view (virtual table) which display colums with particular requirements

So I`m trying to make a statistic view which counts various things like how many users are in table called “PACIENTAS” , how many doctors are in table “GYDYTOJAS” and it works.

Counts how many columns are in table

But I want to count only columns that fulfil a specified condition

When I write this code I get an error

ORA-00904: “PACIENTAS”: invalid identifier

I thinking maybe I need to write my condition in count parentheses but I don’t know how, I need ideas because I am stuck.

Advertisement

Answer

Do it like this

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