Home » SQL & PL/SQL » SQL & PL/SQL » source does not have runnable target (sql developer, oracle 11g)
source does not have runnable target [message #630260] Tue, 23 December 2014 20:12 Go to next message
zenthil86
Messages: 9
Registered: December 2014
Location: fremont
Junior Member
Hi

Im trying to execute the below code and im getting error as "source does not have runnable target". it s getting compiled without any errors. please help

CREATE OR replace PROCEDURE Isql (v_childtbl_nme IN VARCHAR2, 
                                  v_istatement   OUT VARCHAR2) 
AS 
  v_iquery VARCHAR2(100); 
BEGIN 
    SELECT 'insert into infa_ilm.asdr_id_xref select ' 
           ||'id.' 
           || v_childtbl_nme 
           || ' as id_value ' 
           || ' from ' 
           || v_childtbl_nme 
           || Xmlagg(XMLELEMENT(e, ', '||parent_tbl_name)).EXTRACT('//text()') 
           || 'where CASE_L.CREATEDDATE < ' 
           ||'2 years' 
           ||' and case_l.isdeleted=' 
           || '''' 
           || 'Y' 
           || '''' 
           || 
    Xmlagg(XMLELEMENT(e, ('and '||child_tbl_name||'.'||child_col_name|| 
           ' = '|| 
           parent_tbl_name||'.'||parent_fk_col_nm)||' ')).EXTRACT('//text()') 
    INTO   v_iquery 
    FROM   infa_ilm.sfdc_relations1 
    START WITH child_tbl_name = v_childtbl_nme 
    CONNECT BY PRIOR parent_tbl_name = child_tbl_name; 

    v_istatement := v_iquery; 
END isql; 


Thanks,
Senthil Kumar

*BlackSwan formatted code & added {code} tags. Please do so yourself in the future.

[Updated on: Tue, 23 December 2014 20:32] by Moderator

Report message to a moderator

Re: source does not have runnable target [message #630263 is a reply to message #630260] Tue, 23 December 2014 20:30 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
We don't have your table or data so we can not run, test, debug, or improved posted.

Since you choose to ignore Posting Guidelines, I choose to ignore you until you decide to become a good citizen.
Re: source does not have runnable target [message #630264 is a reply to message #630263] Tue, 23 December 2014 20:43 Go to previous messageGo to next message
zenthil86
Messages: 9
Registered: December 2014
Location: fremont
Junior Member
Attached the sample data of the sfdc_relations1 table. My requirement is to read the table list in the child column one by one and pass that as a parameter to a select query and display the result.

Re: source does not have runnable target [message #630265 is a reply to message #630264] Tue, 23 December 2014 20:46 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/

[Updated on: Tue, 23 December 2014 21:06]

Report message to a moderator

Re: source does not have runnable target [message #630283 is a reply to message #630260] Wed, 24 December 2014 01:38 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Previous Topic: sql query for employees based on Org hierarchy
Next Topic: How to write stored function to return column name?
Goto Forum:
  


Current Time: Thu Apr 25 22:07:58 CDT 2024