vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hallo everyone, I would like you to consider the following case: Procedure 'Batch' is calling as 2.nd Procedure 'Importer(xy varchar2)' and this creates at runtime a Procedure xy || '_prc' . This works fine ! Cause the Name of the Procedure that 'Importer(xy)' creates is not fixed, it can't be called in Procedure 'Batch' by simply calling the Name. Execute Immediate xy || '_prc'; won't work So how must I reference this Procedure? Besides I tried to solve it by creating a Procedure 'CallIt' which is dynamically generated by an Execute Immediate Command in 'Batch', CallIt calles xy || '_prc'. 'CallIt' itself will be called in 'Batch' . The Error occurs : could not find program unit being called If I call 'CallIt' then manually in Sql Plus it works properly. Even if I try to disable the Execute Immediate that dynamically creates 'CallIt' the Execution would fail in 'Batch' with this errormessage. It would be a great Effort , if I have to code it all the dynamically way, so please help. Greetings B. Kochs |
| |||
| Answers embedded On 1 Jun 2004 07:47:27 -0700, bernhard.kochs@t-com.net (BKochs) wrote: >Hallo everyone, > >I would like you to consider the following case: >Procedure 'Batch' is calling as 2.nd Procedure 'Importer(xy varchar2)' >and this creates at runtime a Procedure xy || '_prc' . >This works fine ! >Cause the Name of the Procedure that 'Importer(xy)' creates is not >fixed, it >can't be called in Procedure 'Batch' by simply calling the Name. >Execute Immediate xy || '_prc'; won't work >So how must I reference this Procedure? The procedure name needs to be wrapped in a begin end; pair. > >Besides I tried to solve it by creating a Procedure 'CallIt' which is >dynamically generated by an Execute Immediate Command in 'Batch', >CallIt calles xy || '_prc'. >'CallIt' itself will be called in 'Batch' . >The Error occurs : could not find program unit being called >If I call 'CallIt' then manually in Sql Plus it works properly. >Even if I try to disable the Execute Immediate that dynamically >creates >'CallIt' the Execution would fail in 'Batch' with this errormessage. > >It would be a great Effort , if I have to code it all the dynamically >way, More importantly: it is unscalable. >so please help. > >Greetings B. Kochs -- Sybrand Bakker, Senior Oracle DBA |