Stored Procedures - Get Column Information

Hello,
I recently switched from ODP Unmanaged to ODP Managed (I'm using Entity Framework).
The Unmanaged drivers were working fine after adding the necessary information in the web.config section. I could add the stored procedures and generate the complex types using the Function Import - Get Column information.
After the switch the config section was updated and it all appeared to work. By the way the changes in the format of the config-section is poorly documented - to say the least.
However when I try to generate the complex types again I just get a "System.notSupportedException" (Message: The specified type is not supported by this selector).
Was this functionality not ported to the Managed Drivers? Is there something that can be done to enable this functionality?

The implicit ref cursor config file format is different between Unmanaged ODP.NET and Managed ODP.NET.
To save yourself from pulling your hair out, do the following -
1) Install ODT 12.1 if you haven't already
2) Find the stored procedure in server explorer, right click it and run it, and enter input parameters.
3) For the output ref cursor that represents the return value for your Entity Function, choose "Add to Config" checkbox.
4) Then select either "Show Config" (and then cut and paste) or "Add to Config".
Here is a screenshot of what I am talking about:
http://i.imgur.com/t1BfmUP.gif

Similar Messages

  • Not getting column information while Function Import

    i had followed below link
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkOBE/EntityFrameworkOBE.htm
    i m successfully able to update and add recored using Entity framework into oracle DB.
    now my problem is with Select SPS here i follwed all step from above link with sql db and i m able to get column informatin while same is not possible with oracle db.
    the stored procedure returns a ref cursor, so we can create a new complex type by selecting "Get Column Information" then selecting "Create New Complex Type".
    but i m not able to have enable button for create new complex type becuase get column not return anything.
    i had created model or .edmx file and then go to model browser where i had list of stored procedure not by double click on sp we will get one dialog box for function import
    over there when ever i select sp and then get colum information i m not able to find any thing ,,,, while sp is running fine i test that too using sql developer,,,
    and yes i had created complex property tooo but that columns are also not coming.........
    i m new to this please help me where i m lacking.
    PLEASE
    Reference copy of my SP
    PROCEDURE GETPERSONDETAIL(curParam out sys_refcursor)
    IS
    BEGIN
    OPEN curParam FOR
    SELECT
    FIRSTNAME,
    GENDER_CODE,
    BIRTH_DATE,
    LASTNAME
    FROM PERSON;
    END;
    this sp is simple select statement...
    Edited by: 875347 on Jul 27, 2011 2:23 AM

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <connectionStrings>
    <add name="HREntities" connectionString="metadata=res://*/HRModel.csdl|res://*/HRModel.ssdl|res://*/HRModel.msl;provider=Oracle.DataAccess.Client;provider connection string=&quot;DATA SOURCE=IRWORA;PASSWORD=irw#1234;PERSIST SECURITY INFO=True;USER ID=IRW01&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
    i had taken same name as per link i.e. HREntities and HRModel all that
    now pls check my settings are correct or not because my Datasource name is IRWORA and oracle username is irw01 so do i need to change that in baseschemaname which i defined as HR,,, and yes i put the same &quot do i need to change that i hav no idea for that .....
    below is my app config for the same....
    <oracle.dataaccess.client>
    <settings>
    <add name="&quot;HR&quot;.&quot;UPDATE_AND_RETURN_SALARY&quot;.RefCursor.NEW_SALARY" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="&quot;HR&quot;.&quot;UPDATE_AND_RETURN_SALARY&quot;.RefCursorMetaData.NEW_SALARY.Column.0" value="implicitRefCursor metadata='ColumnName=FIRST_NAME;BaseColumnName=FIRST_NAME;BaseSchemaName=HR;BaseTableName=EMPLOYEES;NATIVE_DATA_TYPE=Varchar2;ProviderType=Varchar2;PROVIDER_DB_TYPE=String;ColumnSize=20'" />
    <add name="&quot;HR&quot;.&quot;UPDATE_AND_RETURN_SALARY&quot;.RefCursorMetaData.NEW_SALARY.Column.1" value="implicitRefCursor metadata='ColumnName=SALARY;BaseColumnName=SALARY;BaseSchemaName=HR;BaseTableName=EMPLOYEES;NATIVE_DATA_TYPE=Number;ProviderType=Int32;DataType=System.Int32;ColumnSize=8'" />
    </settings>
    </oracle.dataaccess.client>
    </configuration>
    sorry i m very new to this ,,,,
    please help me

  • Stored procedure to delete information within number of days?

    Hello everyone,
    I am struggling with creating a stored procedure which will allow me to delete old data from specific tables within a specific date range. Ideally what I would like to do is to create a stored procedure where I can specify the delete from let's say 6 different tables and an adhoc number of days. I am new to this and any help is greatly appreciated.
    Regards,

    No version number.
    No information on the number of tables.
    No DDL.
    No information on the delete criteria.
    No information of the number of rows in each table.
    No information on the number or percentage of rows being deleted.
    No information on indexes.
    No information on foreign key constraints.
    No information on replication, if any.
    No information on triggers, if any.
    No information on partitioning.
    Please provide sufficient information from which a good answer can be formulated. In short, address each of the items listed above.

  • How stored procedure get executed when called from java

    When we create a stored procedure or function in oracle, it is compiled and stored there. From java when we call them no compilation is performed its a simple call. When a function or stored procedure is invoked from multiple instance of java objects(for a single session), does the stored procedure clone it self so that it can be called by different java objects which I think not possible at all. In such cases when one java object is interacting with the stored procedure, does other java objects go on a wait state. What happens if sessions are different.
    Please help.

    >
    does oracle creates multiple instance of a particular stored procedure for different sessions or connections. if not then there might be some kind of waiting principle followed.. what happens exactly
    >
    What happens exactly is detailed in Chap. 14 Memory Architecture ni the Database concepts doc
    http://docs.oracle.com/cd/E14072_01/server.112/e10713/memory.htm#i21266
    The code is shared but the data isn't (see the lone exception to this below).
    See the section on the Library Cache
    >
    Program Units and the Library Cache
    The library cache holds executable forms of PL/SQL programs and Java classes. These items are collectively referred to as program units.
    The database processes program units similarly to SQL statements. For example, the database allocates a shared area to hold the parsed, compiled form of a PL/SQL program. The database allocates a private area to hold values specific to the session that runs the program, including local, global, and package variables, and buffers for executing SQL. If multiple users run the same program, then each user maintains a separate copy of his or her private SQL area, which holds session-specific values, and accesses a single shared SQL area.
    >
    The exception is when code uses the SERIALLY_REUSABLE pragma. In that case the memory for package state is in the SGA and users do not have their own copy in their UGA.
    See the SERIALLY_REUSABLE pragma in the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/seriallyreusable_pragma.htm
    >
    The global memory for serially reusable packages is pooled in the System Global Area (SGA), not allocated to individual users in the User Global Area (UGA). That way, the package work area can be reused. When the call to the server ends, the memory is returned to the pool. Each time the package is reused, its public variables are initialized to their default values or to NULL.
    Serially reusable packages cannot be accessed from database triggers or other PL/SQL subprograms that are called from SQL statements. If you try, the database generates an error.

  • Stored Procedure Contents Getting Deleted Randomly

    Has anyone had any experience with the contents of a stored procedure getting deleted?  The object is still visible in object explorer, but when you go to modify the contents it is empty.
    I just started at a new place and trying to clean up and improve their environment.  It was brought to my attention that a certain report that was being ran should have returned some results, but instead
    was just returning a blank report.  While researching the problem, I backtracked to the stored procedure on the server and discovered that the definition of that object was completely blank.  Had to go back to a restore to get the definition.
    This is at least the second time this quarter, but a different procedure.  What could be causing this?
    Thanks!
    SQL Server 2005 Standard Edition
    Windows Server 2003 R2 Service Pack 2

    I don't think any known situation where SP is getting modified by emptying the contents. 
    Can you troubleshoot and find when it was modified?
    SELECT LAST_DDL_TIME, TIMESTAMP
    FROM USER_OBJECTS
    WHERE OBJECT_TYPE = 'PROCEDURE'
    AND OBJECT_NAME = 'MY_PROC';
    And try to see if you'll be able to find anything from the trace but the information is kept only in 5 files
    DECLARE @filename VARCHAR(255)
    SELECT @FileName = SUBSTRING(path, 0, LEN(path)-CHARINDEX('\', REVERSE(path))+1) + '\Log.trc'
    FROM sys.traces
    WHERE is_default = 1;
    SELECT gt.HostName,
    gt.ApplicationName,
    gt.NTUserName,
    gt.NTDomainName,
    gt.LoginName,
    gt.SPID,
    gt.EventClass,
    te.Name AS EventName,
    gt.EventSubClass,
    gt.TEXTData,
    gt.StartTime,
    gt.EndTime,
    gt.ObjectName,
    gt.DatabaseName,
    gt.FileName,
    gt.IsSystem
    FROM [fn_trace_gettable](@filename, DEFAULT) gt
    JOIN sys.trace_events te ON gt.EventClass = te.trace_event_id
    WHERE EventClass in (164)
    ORDER BY StartTime DESC;
    --Prashanth

  • Stored Procedure to retirive column data

    Hello everyone... I am using sql server 2008. I want to retrieve column value if I pass column name as a parameter to my stored procedure without using case statement is there any way to retrieve column values....Please help me..

    Hi Sayali,
    If the columns LH1 and LC1 are having the correlation like LH2 and LC2,LH3 and LC3 ... LHxx and LCxx, as you'd like to pass only one column LH1, then LC1 can be hard coded in the stored procedure. Please see below.
    create table tbl(LH1 varchar(99),LC1 varchar(99));
    insert into tbl select 'this is LH1','this is LC1'
    go
    create proc proc1
    @columnName varchar(99)
    as
    declare @sqlStr nvarchar(max) = N'select @columnName from tbl';
    set @sqlStr = replace(@sqlStr,'@columnName',@columnName+','+replace(@columnName,'H','C'));
    exec sp_executesql @sqlStr;
    go
    exec proc1 @columnName='LH1'
    drop table tbl;
    drop proc proc1
    By the way, If this thread is derived from
    Stored Procedure with Column Name in Where Clause, the best solution would be the statement in your original post with cases, though it looks not that elegant.
    Best regards,
    Eric Zhang
    TechNet Community Support

  • ResultSet from Java Stored Procedures

    Hi,
    How do I obtain a resultset from a Java Stored Procedure?
    My stored procedure, deployed in Oracle8i, has Database package as sample.Have published setConnection() and getDept() methods.
    Code for Java Stored Procedure:
    package SPPackage;
    import java.sql.*;
    public class StoredProcApplication {
    protected static Connection connection = null;
    protected static Statement stmt = null;
    protected static ResultSet res = null;
    public static void setConnection() throws SQLException {
    connection = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    public static void getDept(Object[] obj) throws SQLException {
    if (connection == null) {
    setConnection();
    if (stmt == null) {
    stmt = connection.createStatement();
    if (res == null) {
    res = stmt.executeQuery("select * from DEPT");
    obj[0] = res;
    Code for TesterApplication :
    package SPPackage;
    import java.sql.*;
    public class TesterApplication {
    private static final String URL = "jdbc:oracle:thin:@sandeep:1521:oracle8i";
    private static final String userId = "sandeep";
    private static final String password = "sandeep";
    private Connection connection;
    private CallableStatement stmt;
    private ResultSet res;
    public void setConnection() throws ClassNotFoundException,SQLException {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection(URL,userId,password);
    public void getResultFromSP() throws SQLException {
    //prepare to call the stored procedure
    stmt = connection.prepareCall("{call sample.getDept(?)}");
    //register the OUT parameters
    stmt.registerOutParameter(1,Types.OTHER);
    //execute the query
    stmt.execute();
    ResultSet res = (ResultSet)stmt.getObject(1);
    while (res.next()) {
    System.out.print(res.getInt(1) + " | " );
    System.out.print(res.getString(2) + " | " );
    System.out.print(res.getString(3) + " \n " );
    public TesterApplication() throws SQLException,ClassNotFoundException {
    try {
    setConnection();
    getResultFromSP();
    } finally {
    if (res != null) { res.close(); res = null; }
    if (stmt != null) { stmt.close(); stmt = null; }
    if (connection != null) { connection.close(); connection = null; }
    public static void main(String[] args) {
    try {
    TesterApplication ta = new TesterApplication();
    } catch (Exception e) {
    System.err.println("Error while executing stored procedure " + e.getMessage());
    e.printStackTrace();
    When I run the TesterApplication, I get the following exception :
    java.sql.SQLException: Invalid column type: get_internal_type
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(Compiled Code)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(Compiled Code)
    Also, if I want to execute the ResultSet in the stored proc itself, and return the values as Arrays of int[], and String[], how do I do it?By default the you can populate only int[0], String[0] , i.e. only one value!!!
    if my statement is unknown, i.e, it might return a combination of updates and resultsets, how do I go about processing the result?
    Please advise!!
    TIA
    Sandeep
    null

    Hi kkirk,
    I found the post you mentioned.Well it dates back to November 1999 - "Problem returning resultset or ARRAY from java stored proc" by Stuart Popejoy ([email protected]).Too bad, it is still not solved!!
    I am not very good at PL/SQL.However, it would still be helpful, if you could post the code here, or at my email address.
    Meanwhile, I was trying this during the week-end.There seems to be a glimmer of hope!!
    Let me know, if this makes sense :
    CallableStatement cs = connection.prepareCall("begin open ? for select * from dept; end");
    try {
    cs.registerOutParameter(1,OracleTypes.CURSOR);
    ResultSet res = ((OracleCallableStatement)cs).getCursor(1);
    while (res.next()) {
    //get the values
    } catch (Exception e) {
    e.printStacktrace();
    However, I am getting an exception trace
    Error while executing stored procedure Invalid column type: getLong
    java.sql.SQLException: Invalid column type: getLong
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.getLongValue(Compiled Code)
    Not quite sure why this is happening!!
    TIA,
    Sandeep
    null

  • Problem with output data when calling into Oracle stored procedure

    I have a problem that I think I've seen posted by others, but I can't find it anywhere on the forum. Here's what it looks like:
    I have a application that sends a query parameter called custID in a URL to a JSP page.
    http://domain.com/decrypt.jsp?custID=ewsw
    The JSP subsequently calls into the method below to run a decryption stored procedure on an Oracle db. The custId parameter works fine from most clients. However, I have seen the decryption stored procedure return invalid information on some clients in the following case:
    http://domain.com/decrypt.jsp?custID='eirwx
    Here is how I define my call to the DCUSTID (decryption stored procedure):
    public long dCustID(String sCustID)throws SQLException {
    CallableStatement cs = null;
    try {
    long nCustID = 0;
    if(conn == null || conn.isClosed()) {getLocalConnection();}
    String sp = "BEGIN DCUSTID(?,?);END;";
    cs = conn.prepareCall(sp);
    cs.setString(1, sCustID);
    cs.registerOutParameter(2,java.sql.Types.NUMERIC);
    cs.execute();
    nCustID = cs.getLong(2);
    return nCustID;
    }finally { release(cs); }
    I have not been able to find a problem with the stored procedure (although Im not counting that out). Is there any way that the jsp or the code above is corrupting the data before it gets to the stored procedure? I'm very suspicious of the single quote at the begining of the custID query string parameter.
    Thanks

    >
    The JSP subsequently calls into the method below to
    run a decryption stored procedure on an Oracle db.
    The custId parameter works fine from most clients.
    However, I have seen the decryption stored procedure
    e return invalid information on some clients in the
    following case:
    The back tick doesn't matter.
    How do you know that the routine that you posted returns invalid information? Are you printing the value retreived before you return in the code that you posted? That is the only way to tell if that code is the problem vs some translation problem in something else.
    And what do you mean by 'invalid'? It does return a numeric value right? Is it negative? Or so large that it couldn't be a key? Or what?
    The input parameter to the stored proc is a varchar and not a char correct?

  • Error after calling PL/SQL Stored Procedure

    I have a JSP/Struts application that has a master table and several subordinate tables. Each table has inserts, updates and deletes handled by a stored procedure.
    When a record is inserted into any of the subordinate tables, the stored procedure gets called successfully and the data is saved, but an error condition is raised:
    JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".
    ORA-01086: savepoint 'BO_SP' never established
    The stored procedures execute a commit.
    On the master table, if a search has been performed and returned rows, inserting a new row raises:
    JBO-27021: Failed to load CustomDatum value at index 8 with java object of type oracle.jbo.domain.Raw due to java.sql.SQLException.
    Stream has already been closed
    There is a BLOB data type column in the table, but it is not included in the EO or VO, nor is it referenced by the stored procedure.
    If a search is performed and no records are returned, the stored procedure inserts the new row and no errors are raised.
    I'm stumped...anybody got any ideas?

    I've fixed it now. I'd missed a } in prepareCall. What a doughball.

  • CallableStatament for selection stored procedure

    hello,
    i write a jsp page where there are inputs. when i click on a button i want to search elements in my sql server database. to do that, i call a stored procedure :
    CREATE PROCEDURE PS_ELTS
    @param0 VARCHAR(40),
    @param1 VARCHAR(10),
    @param2 VARCHAR(6),
    @param3 VARCHAR(6),
    @param4 VARCHAR(40)
    AS
    SELECT ELTS.NAME,
    ELTS.TEL,
    ELTS.ADR1,
    ELTS.ADR2,
    ELTS.SERV
    FROM ELTS
    WHERE (ELTS.NAME LIKE @param0 OR @param0 IS NULL)
    AND (ELTS.TEL LIKE @param1 OR @param1 IS NULL)
    AND (ELTS.ADR1 LIKE @param2 OR @param2 IS NULL)
    AND (ELTS.ADR2 LIKE @param3 OR @param3 IS NULL)
    AND (ELTS.SERV LIKE @param4 OR @param4 IS NULL)
    ORDER BY ELTS.NAME, ELTS.TEL
    i have a java class elts as business object. in the class, there is a method search which takes an elts event, connects to the database and gets elements which are ok. if all parameters are null, i get every lines of ELTS table. it's ok. if one or more of the parametre is not null, i don't get any line. this is the method :
    public void search(UtilBean bean) throws Exception {
    int i = 0;
    Class.forName(driver);
    Connection connection = DriverManager.getConnection(url, login, password);
    if (connection != null) {
    connectionOk = true;
    this.setNAME(beanrecherche.getNAME());
    this.setTEL(beanrecherche.getTEL());
    this.setADR1(beanrecherche.getADR1());
    this.setADR2(beanrecherche.getADR2());
    this.setSERV(beanrecherche.getSERV());
    String aProc = "{call PS_ELTS(?,?,?,?,?)}";
    CallableStatement aStatement = connection.prepareCall(aProc);
    aStatement.setString(1, fmt_sqlChaineLike(this.getNAME()));
    aStatement.setString(2, fmt_sqlChaineLike(this.getTEL()));
    aStatement.setString(3, fmt_sqlChaineLike(this.getADR1()));
    aStatement.setString(4, fmt_sqlChaineLike(this.getADR2()));
    aStatement.setString(5, fmt_sqlChaineLike(this.getSERV()));
    aStatement.execute();
    ResultSet rs = aStatement.getResultSet();
    while (rs.next()) {
         i++;
    UtilBean util = new UtilBean();
    util.setNAME(rs.getString("NAME"));
    util.setTEL(rs.getString("TEL"));
    util.setADR1(rs.getString("ADR1"));
    util.setADR2(rs.getString("ADR2"));
    util.setSERV(rs.getString("SERV"));
    listUtil.add(util);
    do i do something wrong ? is there a solution to this problem ?

    i found what's wrong. in my stored procedure, i defined parameters like this :
    @param0 VARCHAR(40),
    @param1 VARCHAR(10),
    @param2 VARCHAR(6),
    @param3 VARCHAR(6),
    @param4 VARCHAR(40)
    when i use :
    aStatement.setString(1, this.getNAME());
    java sends a 40 characters long string to the stored procedure so if i write 'hello', the stored procedure gets 'hello '. any element is like that in the database so i must change the stored procedure :
    (ELTS.NAME LIKE @param0 OR @param0 IS NULL) became (ELTS.NAME LIKE rtrim(ltrim(@param0)) OR @param0 IS NULL)

  • How to pass a CURSOR as an input in a Stored Procedure ?

    Hi all
    I am using Java to work with 2 Oracle DBs, using JDBC.
    I've got a question about using a Oracle Stored Procedure with CURSORs :
    A first stored procedure gets data from the first DB (returns a CURSOR) and I'd like to pass this CURSOR to the second stored procedure as a (Java) IN parameter, so using a "getObject()" then a "setObject()", to insert data from the CURSOR in the second DB.
    This is the theory !
    En reality, the first stored procedure works fine, and returns the cursor, but after that ... I can't even create the second stored procedure. I planed to do something like the following stuff :
    CREATE OR REPLACE PROCEDURE proc_insert_data(cur_ref IN OUT types.ref_cursor) AS
    BEGIN
    LOOP
    FETCH cur_ref INTO FIELD1, FIELD2;
         INSERT INTO TABLENAME VALUES (FIELD1, FIELD2);
    EXIT WHEN cur_ref%NotFound;
    END LOOP;
    END proc_insert_data;
    with a LOOP for each row and then an INSERT.
    But this doesn't seeem to be correct.
    Has anybody an idea to make this stored procedure to work ?
    Thx in advance
    Krystoffff

    Hi Chris,
    When you want to pass a CURSOR to a procedure/function
    you will have to employ a package here. Create a package
    which contains both of your procedures.This package should have a global variable which is of type ref cursor.The IN parameter for the 2nd procedure and the OUT parameter of the first proc should be of type this global cursor var.
    Now you call the first procedure and get the resulting cursor from it, pass it to the second procedure...
    Good luck.
    Regards,
    Madhu

  • Stored procedure in visual composer

    Hi All,
    I created an application in visual composer. I also created a stored procedure in Oracle Database. For getting Data via Visual composer, I created a JDBC system in portal.
    1. But how does this Stored procedure gets reflected under JDBC system? so that i can pull it using "Data" task panel and get data in visual composer?
    2. or how does this JDBC system pull the stored procedure in oracle database?
    what should i do for that?
    Regards,
    Divya

    Hi Divya,
    See the following link, might be helpful:
    http://help.sap.com/saphelp_nw04s/helpdata/en/97/47e742be8b7376e10000000a1550b0/frameset.htm
    Also see SAP Note 805122, tell about some limitation of using stored procedures in VC:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_ep_vc/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d383035313232%7d
    Bye
    Ankur
    Do reward points for helpful as well as solved answers!!

  • How to fetch data to APEX Report using stored procedure?

    hi all,
    i am making a report in APEX. user selects two dates and clicks GO button - i have a Stored Procedure linked to that result region so Stored Procedure gets called.
    my stored procedure does the following -
    using specified dates (IN) i do query and put data into a table (this table has been created only for this report) -
    i want to show all these data i entered into the table on my APEX report in the same procedure call. can i use ref cursor to return? how to do that?
    currently, i use another button in APEX which basically fetches all data from table. basically, user clicks one button to generate report and then another button to get report. which is not desirable at all :(
    i m using APEX      3.1.2.00.02 and Oracle 10 database.
    pls let me know if you need further clarification of the problem. thanks in advance.
    regards,
    probashi
    Edited by: porobashi on May 19, 2009 2:53 PM

    Thanks Tony.
    I am not sure what you meant by >> change the report to be based off of a query returning sql statement, no need to keep that table around.... >>
    Here's my stored procedure
    create or replace
    PROCEDURE ABC_PROC (
    START_DATE IN DATE,
    END_DATE IN DATE
    AS
    RULE_REC MTG_OFFICER_FORECAST%ROWTYPE;
    TYPE REF_CURSOR IS REF CURSOR;
    TCUR REF_CURSOR;
    BEGIN
    DELETE FROM ABC_REPORT;
    OPEN TCUR FOR
    SELECT ABC_FORECAST.*
    from MTG_OFFICER_FORECAST , MTG_USERS
    WHERE MTG_OFFICER_FORECAST.NBR_OFFICER = MTG_USERS.NBR_OFFICER AND
    MTG_OFFICER_FORECAST.NBR_INSTITUTION = MTG_USERS.NBR_INSTITUTION;
    LOOP
    FETCH TCUR INTO RULE_REC;
    EXIT WHEN TCUR%NOTFOUND;
    INSERT INTO ABC_REPORT( NBR_OFFICER, OFFICER_NAME, FORECAST_NBR_LOANS, FORECAST_LOAN_AMT, FORECAST_FEES,
    ACTUAL_NBR_LOANS, ACTUAL_LOAN_AMT, ACTUAL_FEES, RATIO_NBR_LOANS, RATIO_LOAN_AMT, RATIO_FEES, NBR_INSTITUTE )
    VALUES ( RULE_REC.NBR_OFFICER, RULE_REC.NAME_LOAN_OFFICER, RULE_REC.NBR_LOANS, RULE_REC.AMT_LOAN, RULE_REC.AMT_FEES,
    ACTUAL_NBR_LOANS, ACTUAL_LOAN_AMOUNT, ACTUAL_FEES, SUCCESS_RATIOS_NBR_LOANS_PERC, SUCCESS_RATIOS_LOAN_AMT_PERC, SUCCESS_RATIOS_FEES_PERC, RULE_REC.NBR_INSTITUTION );
    END LOOP;
    CLOSE TCUR;
    END ABC_PROC;
    Thanks,
    Probashi
    Edited by: porobashi on Jun 2, 2009 11:43 AM

  • Regarding Stored Procedure in Oracle

    Can you please guide where the stored procedure get stored in the database?
    Where it is under schema?
    Thanks in advance!
    -Mani.R

    Do you mean where can you view the source code in the data dictionary?
    If so look at ALL_SOURCE
    Mark

  • How do i fire a query/Stored procedure only once

    Hi,
    I have a master frame and multiple child frames. Master frame triggers child1 frame which triggers child 2 frame etc using some common keys between the frame.
    Now each frame executes a stored procedure and then uses the Db2 cursor as a record set. However when the same frame is fired again then the stored procedure is triggered again. But i could very well use the same record set from the record set that i already have,
    In other words i need to fire the stored procedure/query only once and not every time the frame is fired.
    I just need to get the record set for each frame and then operate on the retrieved record sets.
    Is there a way to do this?
    Currently I experience serious performance issues as the stored procedures get fired repeatedly thousands of times
    Any help will be greatly appreciated
    Thanks
    anand

    I am still haveing problems so I will try and attach my program and see if you can help a little more that. It will probably be easier for you to look at this way. When you look at the diagram sequence 0 is the one the problem is in. In that sequence you will see a case structure and that is where the finite pulse train vi is. When case 1 is selected the finite pulse train will run again and again until I leave case 1. I need to have the program run the finite pulse train once and then wait and do nothing until the case is changed. The finite pulse train will be in all cases inside the case structure I just haven't done that yet, I am waiting until it works. The pulse train is used to move a stepper motor that is why running only once is im
    portant because the stepper motor is used to position something.
    Attachments:
    AMC_Eagle_Both_Inputs_Working_2.vi ‏266 KB

Maybe you are looking for

  • How to get photos from Photo Library, an album on iPhone, into iPhoto on desktop mac

    Hi, this would seem simple, but somehow it's not. I have ~1500 photos on my iPhone in a separate album. They were synced previously with an iTunes library, that I have now lost for good. The images are still on my iPhone and I want to transfer them t

  • Challenging issue with JDBC sender adapter

    Hello Guys I have this requirement From Oracle Database I have to read to tables  one for the header and one for the detailes and map the result to one RFC. I have only  worked with one table at the time with the JDBC sender adapter but never with 2 

  • Tac code

    i am creating a tax code for import and excise, in ftxp in condition type jmo1 ,i am not getting TAX PERCENTAGE coloum visible. i have assign percentage for tax in fv11. Regard nabil

  • R12 Installation on Windows 2003

    Hi I am doing Installation of R12 on Win 2003 server , i entered all the prompt for the installation then i am seeing the messaging bootstrapping then with out prompt for RDBMS-Disk1 dvd, installation windows disapppear, I cheked the logfiles in temp

  • SAP GUI 7.20 and Animated Messages in Status Bar

    Hello Experts, Is there a way to disable "animated" display of messages in status bar when Signature Design is active? Currently messages are scrolled from left to right and then fade in. (Please note that this is a different from "Animated Focus" or