Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help! PL/SQL Question

Re: Help! PL/SQL Question

From: Lothar Armbüster <lothar.armbruester_at_rheingau.netsurf.de>
Date: 17 Feb 2000 18:31:35 +0100
Message-ID: <903.82T1786T11114141lothar.armbruester@rheingau.netsurf.de>


sjoshi wrote at 17-Feb-00 15:49:46
on the subject Help! PL/SQL Question:

>Hello All
> I have a cursor which returns tableNos from another table, like this
>cursor getNos is
>select partition_no from pd_pframe.pdtable_113
>where discipline_indx_no=1;

>Now for each of these nos, I need to query another table whose name is
>like dd_<the no returned from the above cursor>. For eg: if the above
>cursor returned 12, 20, then I need to query a field called line_id in
>tables dd_12 and dd_20 and then update the line_id with another value.
>Now how do I do that? I tried to concat the no to the table_name but it
>doesn't work.

Hello sjoshi,

you will have to use dynamic SQL for this. Have a look at the dbms_sql package.

Hope that helps,
Lothar

--

Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Hauptstr. 26            | lothar.armbruester_at_t-online.de
D-65346 Eltville        |

Received on Thu Feb 17 2000 - 11:31:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US