-
Error when using PL/SQL table in Where clause.
Hi,
It gives me great happiness to write to you for the first time. I want
a solution from you for an error i am getting in one of my PL/SQL programs.
In my DECLARE block, i have a pl/sql table declared and a cursor:
DECLARE
type product_release_ids_tab_type is table of
aru_product_releases.product_release_id%type
index by binary_integer;
product_release_ids_tab product_release_ids_tab_type
cursor c_object_id is
select object_id
from aru_objects
where product_release_id in product_release_ids_tab;
-----------------------------------------------
Now i get an error 'Expression is of wrong type'
So then PL/SQL tables cannot be used in the where clause...?
Is there any work around for this. I am struck only with this problem. Can
you please help me out with this problem.
Thanks in advance
so long.
-
Re: Error when using PL/SQL table in Where clause.
PL/SQL tables are nothing more than glorified arrays, IMO. What it looks
like you need is a temporary table. You could select into it at the
beginning of your program and use it in your WHERE clause or join it with
aru_objects.
Temporary tables are great in that the data is local to the current user.
Other users see the table and can select into it but their data can be
different than yours. Also, the data is automatically deleted at the end of
the PL/SQL program.
HTH.
--
Larry Miller
MCSD, Microsoft MVP Visual FoxPro
Bifrost Solutions
"Srinivas Ramineni" <srinivasramineni@yahoo.com> wrote in message
news:3cd50f11$1@10.1.10.29...
>
> Hi,
> It gives me great happiness to write to you for the first time. I want
> a solution from you for an error i am getting in one of my PL/SQL
programs.
>
> In my DECLARE block, i have a pl/sql table declared and a cursor:
>
> DECLARE
> type product_release_ids_tab_type is table of
> aru_product_releases.product_release_id%type
> index by binary_integer;
>
> product_release_ids_tab product_release_ids_tab_type
> cursor c_object_id is
> select object_id
> from aru_objects
> where product_release_id in product_release_ids_tab;
>
> -----------------------------------------------
> Now i get an error 'Expression is of wrong type'
>
> So then PL/SQL tables cannot be used in the where clause...?
>
> Is there any work around for this. I am struck only with this problem. Can
> you please help me out with this problem.
>
> Thanks in advance
> so long.
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|