I am having a normal table temp and a nested table temp_nt
Temp
-------------
ID Status
-------------
1 open
2 close
3 open
4 open
5 close
---------------
Suppose my nested table is having list of ID, X
Lets say the data in nested table is like
temp_nt(1).ID=1 temp_nt(1).X='ANC'
temp_nt(2).ID=2 temp_nt(2).X='pqr'
temp_nt(3).ID=3 temp_nt(3).X='ANCF'
temp_nt(4).ID=4 temp_nt(4).X='ANCF'
Can it be possible to join both to get the data like below,
Status COUNT
-----------------------
open 3
close 1
-----------------------
Since ID=5 is not present in the nested table, therefore it is excluded from the count
It would help to define exactly what objects you’re working with…
You have a table with 5 rows of data
But then how is your nested table defined? Is it defined in SQL or PL/SQL? Are you using the object from SQL or PL/SQL?
If you have defined the nested table in SQL
And you are using the nested table in PL/sQL, you can use the
TABLEoperatorIs that what you’re looking for? Or do you have a different setup?
If you are defining a local collection in PL/SQL, you won’t be able to use that collection in a SQL statement since the SQL engine isn’t able to access any information about the collection type. If you want to use the collection in SQL, it would make much more sense to define the collection in SQL.