sql - Error in execution of query in java class -
hi not execute following query. works fine in sql developer doesnt work in java class
query = new stringbuilder().append("select substr(attrib,2) def,decode(parent_id,null,null,'c'||parent_id) xyz,'c'||attribute_id lmn,decode(parent_id,null,'c'||(to_char(attribute_id)),'c'||parent_id||'/'||'c'||attribute_id) abc (select attribute_name,sys_connect_by_path(attribute_name, '/') attrib, treestruct_attribute_name,parent_id,attribute_id my_table treestruct_attribute_name = 'xyz' start attribute_level =1 connect prior attribute_id = parent_id);").tostring(); statement stmt=con.createstatement(); system.out.println("after connection"); resultset rs = stmt.executequery(query); system.out.println("after ececute");
query not executed. goes exception block. should execute query in java class
Comments
Post a Comment