Cl scr in plsql procedure

Hello frnd,
I am writing a simple plsql procedure to generate supermarket bill,
its taking some input from user like , item no, item name etc etc
what I want is before generating final output the scree should get clear and then output shoud display
for example:
prompt cl scr
dbms_output.put_line('************------BILL INVLOICE******------------');
dbms_output.put_line('PRODUCT NUMBER -:'||pno);
dbms_output.put_line('PRODUCT NAME -:'||pname);
if I am trying like this its giving error on cl scr
so how to use command c"l scr" in PL SQL code
thanks

Thanks
Then is there anyway to clear the screen in in PLSQL before showing output .....

Similar Messages

  • The simplest way for plsql procedure to return multiple rows

    Hi,
    What is the simplest way for plsql procedure to return multiple rows (records). There are many combination of ways to do it but I am looking for a solution that is appropriate for plsql beginners. Many solutions use cursors, cursor variables, collections and more that kind of things that are complex on the face of it. Is it somehow possible to achieve the same with less effort?
    Sample query would be: SELECT * FROM EMPLOYEES;
    I want to use returned rows in APEX to compose APEX SQL(in that context plsql) report.
    It is enough to use just SELECT * FROM EMPLOYEES query in APEX but I want to use plsql procedure for that.
    Thank you!

    Hi,
    It depends :-).
    With +...that is appropriate for plsql beginners...+ in mind... it still depends!
    The list of techniques (ref cursors, cursor variables, collections, arrays, using explict SQL) you have referenced in your post can be made to work. but...
    +Is it somehow possible to achieve the same with less effort?+ Less effort : That needs to be defined (measured). Especially in the context of pl/sql beginners (who is a beginner?) .
    What is the level of "programming experience" ?
    What is the level of understanding of "Relational Result set" as processible in Oracle?
    If you are looking for
    Process_the_set_of rows_in APEX () kind of capabilitywhich "abstracts/hides" relation database from developers when working on relation database, it may not be the best approach (at least strategically). Because I believe it already is abstracted enough.
    I find REF CUROSOR most effective for such use, when the "begginer" has basic understanding of processing SQL result set .
    So in a nut shell, the techniques (that you already are familiar with) are the tools available. I am not aware of any alternative tools (in pure Oracle) that will simplify / hide basics from develpers.
    vr,
    Sudhakar B.

  • Business Event not triggering the PLSQL procedure.. What to do?

    We need to call a plsql procedure when the GL Approval workflow has ended with approval. I thought i could do this by customizing the relevant business event.
    We are on EBS 12.1.3 with RDBMS : 11.2.0.3.0.
    I saw that the business event oracle.apps.gl.Journals.journal.approve was disabled currently. I enabled it and created a subscription for it. Subscription was a PLSQL procedure. Currently, for test purpose only thing it is doing is to insert a row into a table.
    Business Event Subscription settings:
    System: ORDEBS.SYSTEM.COM
    Triggering Event
    Source Type:Local
    Event Filter: oracle.apps.gl.Journals.journal.approve
    Execution Condition
    Phase: 100
    Status: Enabled
    Rule Data: Message
    Action Type:Custom
    On Error: Stop and Rollback
    Action
    PL/SQL Rule Function: XX_GL_APPROVE_BE_PKG.Get_Attributes
    Priority: Normal
    Documentation (Not sure what value to be given for these. I went with the below values.)
    Owner: Company Name
    Owner Tag: Custom Schema
    Using the below query i can see that the business event is getting called when the approval happens (One row added each time approval happened). But I cant see any rows in the table where it should insert a row. What could be going wrong? How can i verify that the procedure has been called?
    select * from WF_DEFERRED where corrid ='APPS:oracle.apps.gl.Journals.journal.approve'
    Procedure:
    CREATE OR REPLACE PACKAGE BODY APPS.XX_GL_APPROVE_BE_PKG
    AS
    PROCEDURE Get_Attributes
    IS
    BEGIN
    INSERT INTO xx.xx_test_table VALUES ('From BE');
    COMMIT;
    END Get_Attributes;
    END XX_GL_APPROVE_BE_PKG;

    Thanks Alejandro. Now this is working.
    Changes i made:
    1. Added the WFERROR workflow as a subscription to this event. So i could see that the function i am calling from the event did not have proper signature.
    2. Changed the function signature to have standard parameters like:
    CREATE OR REPLACE PACKAGE BODY XX_GL_APPROVE_BE_PKG
    AS
    function subscription(p_subscription_guid in raw,
    p_event in out nocopy wf_event_t) return varchar2 is
    l_result varchar2(20);
    begin
    insert into xxvtv.xxvtv_test_table values ('From BE');
    commit;
    exception
    when others then
    wf_core.context('XX_GL_APPROVE_BE_PKG','function subscription', p_event.getEventName(), p_event.getEventKey());
    wf_event.setErrorInfo(p_event, 'ERROR');
    return 'ERROR';
    end subscription;
    END XX_GL_APPROVE_BE_PKG;
    3. Changed the owner name and owner tag both to the custom schema name (XX)

  • Passing values to between Pages from a PLSQL Procedure in third Page

    Hello,
    I have a form divided into 3 pages. The first Page is used to select Template which is used to call a screen Page 54 and Page 55 (Wizard Based screen).
    From Page 55 (third page) of my application, When I click on Finish Button (Submit Button), a PLSQL Procedure is called which inserts values in 5 to 6 tables on a schema. The Success message include Article &DOCID. successfully Added.
    When I return to the first Page which is Page 24, it displays no value for DOCID.
    Sample Example =
    DECLARE
    DOCID VARCHAR2(30);
    BEGIN
    INSERT INTO SURE_DOCUMENT
    DOCUMENT_ID
    , DOCUMENT_TYPE
    , TITLE
    , STATUS
    , DISTRIBUTION
    , ARCHIVE_REVIEW_DATE
    , CONTENT_TYPE
    , IMPACT
    , SKILL_LEVEL
    , SOURCE
    , SERVER_MIN_VERSION
    , SERVER_MAX_VERSION
    , REFRESH_INTERVAL
    , LAST_REFRESH
    , FOLDER_ID
    , TOPIC_ID
    , NOTE_POSITION
    , OWNING_SITE
    , MODIFY_NUMBER
    , VERSION_STRING
    , ALIAS
    , EXTKEY
    , FORMAT_MODIFIER
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( SURE_DOCUMENT_SEQ.NEXTVAL || '.1'
    , :ARTICLE_TYPE
    , :TITLE
    , :STATUS
    , :DISTRIBUTION
    , SYSDATE
    , 'TEXT/PLAIN'
    , 'LOW'
    , 'NOVICE'
    , 'ADHOC'
    , :RDBMS_MIN_VERSION
    , :RDBMS_MAX_VERSION
    , NULL
    , NULL
    , :FOLDER
    , :TOPIC
    , NULL
    , 1
    , 1
    , NULL
    , NULL
    , NULL
    , NULL
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    COMMIT;
    SELECT SURE_DOCUMENT_SEQ.CURRVAL INTO DOCID FROM DUAL;
    INSERT INTO SURE_DOCUMENT_CONTRIBUTORS
    DOCUMENT_ID
    , SURE_SEQUENCE
    , USER_ID
    , CONTRIBUTION_DATE
    , CONTRIBUTION_ROLE
    , MODIFY_NUMBER
    , REASON
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( DOCID
    , 1
    , 'SKOPPALK.UK'
    , SYSDATE
    , 'Contributing Author'
    , 1
    , 'Contributing Author'
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    INSERT INTO SURE_DOCUMENT_LANGUAGES
    DOCUMENT_ID
    , SURE_SEQUENCE
    , LANGUAGE
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( DOCID
    , 1
    , 'USAENG'
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    INSERT INTO KREW_WORKFLOW
    DOCUMENT_ID
    , PRIORITY
    , OWNER
    , REVIEWER
    , MODERATOR
    , ASSIGNED_DATE
    , DUE_DATE
    , CHECKED_OUT_BY
    , CHECKED_OUT_DATE
    , VERSION_STRING
    , DESCRIPTION
    , AUTHORS
    , COMMENTS
    , UPD_DATE
    , COPYSTATUS
    , COPYDISTRIBUTION
    , COPYFOLDERID
    VALUES
    DOCID
    , 3
    , DECODE(:OWNERS, NULL, 'UNASSIGNED',:OWNERS)
    , DECODE(:REVIEWER, NULL, 'UNASSIGNED',:REVIEWER)
    , DECODE(:MODERATOR, NULL, 'UNASSIGNED',:MODERATOR)
    , SYSDATE
    , SYSDATE + 7
    , NULL
    , NULL
    , 'SKOPPALK.UK'
    , :TITLE
    , :AUTHORS
    , :COMMENTS
    , SYSDATE
    , :STATUS
    , :DISTRIBUTION
    , :FOLDER
    INSERT INTO SURE_DOCUMENT_KEYWORDS
    DOCUMENT_ID
    , SURE_SEQUENCE
    , KEYWORD_TYPE
    , KEYWORD
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( DOCID
    , 1
    , 'NOTE'
    , :KEYWORDS
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    INSERT INTO SURE_DOCUMENT_REFERENCES
    DOCUMENT_ID
    , SURE_SEQUENCE
    , REFERENCE_SOURCE
    , REFERENCE_DOCUMENT_ID
    , REFERENCE_TYPE
    , REFERENCE_DESCRIPTION
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( DOCID
    , 1
    , 'NOTE'
    , DOCID || '.1'
    , 'NOTE'
    , :REFERENCES
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    INSERT INTO SURE_DOCUMENT_PLATFORMS
    DOCUMENT_ID
    , SURE_SEQUENCE
    , PLATFORM_ID
    , MIN_VERSION
    , MAX_VERSION
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( DOCID
    , 1
    , :PLATFORMS
    , NULL
    , NULL
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    INSERT INTO SURE_DOCUMENT_PRODUCTS
    DOCUMENT_ID
    , SURE_SEQUENCE
    , PRODUCT_ID
    , COMPONENT_ID
    , MIN_VERSION
    , MAX_VERSION
    , DELETED
    , CREATED_BY
    , CREATED_DATE
    , CREATED_SITE
    , UPDATED_BY
    , UPDATED_DATE
    , UPDATED_SITE
    VALUES
    ( DOCID
    , 1
    , :PRODUCTS
    , NULL
    , NULL
    , NULL
    , 'N'
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    , HTMLDB_CUSTOM_AUTH.GET_USER
    , SYSDATE
    , 1
    COMMIT;
    END;
    The Success message is as follows:
    Article &DOCID. Created/Updated Successfully

    Shivanand,
    There's no need to post that much code when you could create a very short test case that demonstrates only the problem you are having.
    You're using &NAME. notation on something that isn't a page or application item. You can't reference PL/SQL variables that way (or any other way) outside the PL/SQL scope. For your situation, you could create a page item named P55_DOCID and assign it a value in the PL/SQL process (:P55_DOCID := DOCID;), then reference &P55_DOCID. in HTML areas like the success message.
    Scott

  • How Can i get PLSQL Procedure out values in Shell Script?

    Hi,
    I need to use PLSQL Procedure out values in shell script by using that parameter i need to check and call the other procedure. Please can you guide me how can i?
    #!/bin/ksh
    # Function to call validation program
    SQL_PKG_CALL()
    echo "Inside SQL_PKG_CALL for $file"
    sqlplus -s /nolog << EOF
         whenever sqlerror exit failure
         connect ${APPS_LOGIN}
         variable exit_value NUMBER
         set serveroutput on size 100000
         DECLARE
              l_errbuf VARCHAR2(10000) := NULL; l_retcode NUMBER := NULL;lv_test VARCHAR2(4000) := NULL;
         BEGIN
              fnd_global.apps_initialize ( USER_ID => ${USER_ID}, RESP_ID => ${RESP_ID}, RESP_APPL_ID => ${RESP_APPL_ID}
                             , SECURITY_GROUP_ID => ${SECURITY_GROUP_ID}
              #Calling PLSQL procedure for create and attache document
              XXAFPEEP_SO_DOC_ATTACH_INT.DOCUMENT_ATTACH (p_errbuf => l_errbuf, p_retcode => :RETMSG, p_fileName => $file
                                       , p_debug => 'Y', p_rettest => lv_test);
              # to print the procedure return values
              DBMS_OUT.PUT_LINE('Return Message: '|| lv_test);
              #${RETCODE}=l_retcode;
              print :RETMSG;
         END;
    EXIT 0
    EOF
    # Program starts here
    echo "+---------------------------------------------------------------------------+"
    echo "Program Start"
    APPS_LOGIN=${1} # Apps Login
    USER_ID=${2} # User ID
    RESP_ID=${5} # Responsiblity ID
    RESP_APPL_ID=${6} # Responsiblity Application ID
    SECURITY_GROUP_ID=${7} # Security Group ID
    DIRECTORY_PATH=${8} # Directory --Attached file locations
    DIRECTORY_NAME=${9} # Directory Name for plsql
    echo "User ID : $USER_ID"
    echo "Responsibility ID : $RESP_ID"
    echo "Responsibilith Application ID : $RESP_APPL_ID"
    echo "Security Goup ID : $SECURITY_GROUP_ID"
    echo "Directory Path : $DIRECTORY_PATH"
    echo "Direcotry Name : $DIRECTORY_NAME"
    echo
    #files direcotry
    cd $DIRECTORY_PATH
    echo Present Working Directory: `pwd`
    echo
    #for all file names
    ALL_FILES=`ls *.pdf`
    for file in $ALL_FILES
    do
         if [ -f $file ]
         then
              #log "Processing $file" # future
              echo Processing: $file
              # Calling the PL/SQL Program
              SQL_PKG_CALL;
              #echo "Retcode : $RETCODE"
              echo "RetMessage : $RETMSG"
         else
              log "Skipped $file: invalid file"
              echo "Skipping current file $file: not a valid file."
         fi
    done
    Thanks
    Sudheer

    Saubhik's provided the solution, but just for fun:
    Test procedure:
    create or replace procedure get_ename
       ( p_empno in emp.empno%type
       , p_ename_out out emp.ename%type )
    is
    begin
       select ename into p_ename_out
       from   emp
       where  empno = p_empno;
    end get_ename;Test data:
    SQL> select empno, ename from emp order by 1;
    EMPNO ENAME
    7369 SMITH
    7499 ALLEN
    7521 WARD
    7566 JONES
    7654 MARTIN
    7698 BLAKE
    7782 CLARK
    7788 SCOTT
    7839 KING
    7844 TURNER
    7876 ADAMS
    7900 JAMES
    7902 FORD
    7934 MILLER
    14 rows selectedTest call from SQL*Plus to show it working:
    SQL> declare
      2     v_ename emp.ename%type;
      3  begin
      4     get_ename(7844,v_ename);
      5     dbms_output.put_line(v_ename);
      6  end;
      7  /
    TURNER
    PL/SQL procedure successfully completed.Demo shellscript (borrowing the function idea from Saubhik):
    #!/bin/ksh
    empno=${1:-NULL}
    exec_sql() {
        sqlplus -s william/w@//vm.starbase.local:1521/eleven <<END_SQL
        spool get_out_value.sh.log
        set serverout on size 2000 feedback off
        declare
           v_name emp.ename%type;
        begin
           get_ename(${empno},v_name);        
           dbms_output.put_line('# ' || v_name);
        end;
        spool off
        exit
    END_SQL
    ename=$(exec_sql ${empno} | awk '/^# / {print $2}')
    print Employee ${empno} = ${ename}Demo:
    /Users/williamr: get_out_value.sh 7844
    Employee 7844 = TURNER
    /Users/williamr: get_out_value.sh    
    Employee NULL =Note this substitutes the word NULL if no empno is passed, and it ignores error output or anything else by only looking for lines beginning '# ' and then taking the following word. Error messages will appear in the logfile. (In this example it probably doesn't need the NULL substitution because a missing parameter would cause a syntax error which the script will handle anyway, but it could be useful in more complex examples.)
    For a production script you should probably use an OS authenticated account so you don't have to deal with password strings.

  • Calling sql script in plsql procedure

    Hello,
    I have a sql script named mytest.sql and i want to execute this from a stored procedure.
    following is the contents of this script
    spool d:\mytestsql.txt
    select * from tab;
    spool off
    Actually i want my sql script to run daily to export some tables data.
    I can execute this script from a sql prompt but i want to run it from enterprise manager.
    I am using oracle 10gR2 on windows2000 system.
    Any idea about scheduling the sql script to run automatically??
    How to execute this sql script from a plsql procedure??
    Thanks

    Hi all,
    Thanks for all the replies. I have found the solution with external procedures.
    Following is the complete step by step guide.
    1. Create the OSCommand Java Class using the following statement:
    connect as any user:
    create or replace and compile java source named oscommand as
    import java.io.*;
    public class OSCommand{
    public static String Run(String Command){
    try{
    Runtime.getRuntime().exec(Command);
    return("0");
    catch (Exception e){
    System.out.println("Error running command: " + Command +
    "\n" + e.getMessage());
    return(e.getMessage());
    2. Create the following Wrapper Function using the following statement:
    CREATE or REPLACE FUNCTION OSCommand_Run(Command IN STRING)
    RETURN VARCHAR2 IS
    LANGUAGE JAVA
    NAME 'OSCommand.Run(java.lang.String) return int';
    3. connect as sys
    Execute dbms_java.grant_permission( 'FKHALID','SYS:java.io.FilePermission', '<<ALL FILES>>','execute');
    execute dbms_java.grant_permission( 'FKHALID','SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '*' );
    execute dbms_java.grant_permission( 'FKHALID','SYS:java.lang.RuntimePermission', 'readFileDescriptor', '*' );
    commit;
    note: here fkhalid is the oracle user.
    connect as fkhalid user:
    Declare
    expdp_cmd Varchar2(2000);
    Begin
    expdp_cmd := OSCommand_Run('cmd /c sqlplus fkhalid@mtcedwt/pwd @d:\ORA_DUMPS\mydbexp.sql');
    DBMS_OUTPUT.Put_Line(expdp_cmd);
    End;
    In Unix
    Set Serverout On
    Declare
    x Varchar2(2000);
    Begin
    x := OSCommand_Run('/home/test/myoscommand.sh')
    DBMS_OUTPUT.Put_Line(x);
    End;
    I will check the dbms_scheduler also and will let you know the results.
    Thanks

  • Executing sql from table with in plsql procedure

    I wonder if anyone can help.
    I have a table that stores sql statements. They are actually a set of rules that I want to apply to my application. My intention is to execute the statement in plsql.
    EG a sql statment held in the table might be:
    'select count(id) from item where item_id = ' || constants_pkg.c_test_item || ' and client_id = ' || client_id_in
    I am trying to call this from a plsql procedure, I’ve CUT OUT some of the procedure task_rec.rule holds the statement above. The procedure is failing “invalid SQL statement”, I think the client_id_in may not be evaluating as the variable, passed into the procedure and constants_pkg.c_test_item not being taken from the constants pkg.
    EG.
    PROCEDURE create_additional_info_list(
    client_id_in IN client.id%TYPE,
    IS
    result VARCHAR2(100);
    BEGIN
    EXECUTE IMMEDIATE
    task_rec.rule
    INTO result;
    END;
    If I was to do below the code would work ok. However I require the rule to come from the table.
    EXECUTE IMMEDIATE
    'select count(id) from item where item_id = ' || constants_pkg.c_test_item || ' and client_id = ' || client_id_in
    INTO result;
    Is there anyway constants_pkg.c_test_item and client_id_in can be evaluated as variables?

    Not that I've tried this but, if possible, change the SQL in the table to have bind variable; e.g.,
    'select count(id) from item where item_id = :1 and client_id = :2 ';
    Then in the procedure
    execute immediate task
    INTO result
    USING constants_pkg.c_test_item ,
    client_id_in ;

  • Help Required :Excel Upload Into Oracle Table Using PLSQL Procedure/Package

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    I also Tried to Use This
    But How can i Use SQLLDR Command In Stored Procedure.
    Well IN SQL*PlUS it is successfull but in Stored Procedure /Package ,PL/SQL does not recognise the OS commands.
    So now my Question How can I recognise the SQLLDR Commnad in Stored Procedure.

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Problem with database adapter on plsql procedure with in/out parameters

    running BPEL 10.1.3.1 and using the database adapter on a plsql procedure with in/out parameters I get errors
    the plsql procedure:
    create or replace procedure proc_with_clob_inout_parameter(
    p_string in varchar2,
    p_clob in out clob)
    is
    begin
    p_clob := p_string;
    end proc_with_clob_inout_parameter;
    In BPEL I call this procedure. When I only assign a value to the p_string parameters (in a BPEL assign) all is well. When I also assign a value to the p_clob parameter the error occurs:
    <part name="summary">
    <summary>
    file:/ora1/app/oracle/as101.3/bpel/domains/digitaaldossier/tmp/.bpel_janb_inout_1.0_f6908ccf864581b7265c362444e88075.tmp/twee.wsdl
    [ twee_ptt::twee(InputParameters,OutputParameters) ] - WSIF JCA Execute of
    operation 'twee' failed due to: Error while trying to prepare and execute
    an API.
    An error occurred while preparing and executing the
    JANB.PROC_WITH_CLOB_PARAMETER2 API. Cause: java.sql.SQLException: Parameter
    Type Conflict [Caused by: Parameter Type Conflict]
    ; nested exception is:
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the
    JANB.PROC_WITH_CLOB_INOUT_PARAMETER API. Cause: java.sql.SQLException: Parameter
    Type Conflict [Caused by: Parameter Type Conflict]
    Check to ensure that the API is defined in the database and that the
    parameters match the signature of the API. Contact oracle support if error
    is not fixable.
    </summary>
    </part>
    In BPEL 10.1.2.0 this isn't a problem. I tested it against a 10.2.0.1 and a 10.2.0.2 database and in both situations I get the error with BPEL 10.1.3.1 and no error with BPEL 10.1.2.0
    it appears to be a problem in the database adapter...
    anyone with the same problems and/or a solution?

    Not of any use to you, but we had exactly the same problem on Friday when we applied AS 10.1.2.2 Patchset on top of BPEL 10.1.2.0.2.
    The clob in our pl/sql proc wan't declared as in/out but for some reasons JDeveloper had created a clob on the Output Parameter type in the db partner link xsd. I removed this and it worked. This code had been untouched , and working fine, for months.
    I'll be raising an SR today.
    Rob J

  • Help with truncating a table using plsql procedure in different schema

    I have a plsql procedure in schema A that truncates a table that is given in as parameter.
    create or replace procedure truncate_table(schema, table_name)
    EXECUTE IMMEDIATE 'TRUNCATE TABLE '||schema||'.'||table_name;
    end;
    The above procedure has public execute grant.
    I need to truncate a table in schema B. I have a plsql procedure in schema B that calls the truncate_table procedure and passes in the schema B table name.
    Since the table is in schema B, should the delete grant on the table be given to user A or user B to truncate the table in schema B?
    Thanks in advance.

    Procedure created in schema A
    create or replace
    procedure truncate_table(l_schema varchar2, table_name varchar2) authid current_user
    as
    begin
    EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_schema||'.'||table_name;
    end;from schema B
    grant delete on table1 to Schema_A
    from schema A
    exec truncate_table('Schema_B','Table1');
    Hope this helps.
    Alvinder

  • Calling PLSQL Procedure with CLOB input parameter from JDBC

    Hi..
    I've got a PLSQL procedure with a CLOB object as input parameter:
    function saveProject (xmldoc CLOB) RETURN varchar IS
    I want to call that procedure from my JDBC Application as...
    String data = "..."
    CallableStatement proc = conn.prepareCall
              ("begin ? := saveProject (?); end;");
    neither
    proc.setCharacterStream(2, new StringReader(data, data.length());
    nor
    proc.setString(2, data);
    will work.
    The Application throws java.sql.Exception: ... PLS-00306 wrong
    number or types of arguments in call 'SAVEPROJECT'
    How can I use set setClob method?
    The Problem is: with Oracles CLOB implementation I can't create
    an Instance, and from the CallableStatement a can't get a
    Locator for a CLOB-Object.
    This CLOB stuff makes me really nuts!
    please somebody help me.. thanks
    Alex

    Hi All,
    You can not make it like that.
    You can not make clob as input parameter.
    Do you want an easy way?
    This is the easy way.
    sample:
    function myFunction(S varchar2(40))
    return integer as
    begin
    insert into TableAAA values(S)
    --TableAAA only contains 1 column of clob type
    end;
    This will work the problem with this is the parameter is in
    varchar2 right? so there will be limited length for it.
    You can do this to call that function:
    nyFunction('My String that will be input into clob field');
    There's another slight difficult way, I understand that you have
    installed Oracle client/server in your system, try to look at
    jdbc folder and try to find demo.zip in that folder, you can
    find several ways of doing thing with jdbc.
    Have a nice day,
    Evan

  • Plsql procedure containing select statement to fill page items

    I would like to fill items :P200_A and :P200_B and so on
    with the result of a SELECT which depends on the different values of many select lists.
    E.G. :P200_list_alpha with the list of values
    STATIC:less than 10;less,equal than 10;equal,above 10;above,indifferent;indiff
    :P200_list_beta with the list of values
    STATIC:active;active,passiv;passiv,excluded;excluded
    How do I write the select statement ? I think it has to be executed in an anonymous PLSQL Procedure (after submit).
    What is a convenient way to write the select statement ?
    I could imagine to use lots of IF , ELSIF, ELSE statements and in each branch (here 12 ) the whole/complet SELECT statement is written.
    How to solve this problem in an elegant way ?
    In my opinion the CASE statement could be helpful, but how to use it in the WHERE clause with this nested conditions ?

    I think I got it:
    SELECT col1, col2, col3, ...
    INTO :P200_A , :P200_B , ....
    FROM mytable_1, mytable_2
    WHERE mytable_1.col1 = mytable_2.col1
    AND (
    CASE
    WHEN :P200_LIST_ALPHA = 'less' AND NVL(TO_COL_WITH_ALPHA, 0) < 10 THEN 1
    WHEN :P200_LIST_ALPHA = 'equal' AND NVL(TO_COL_WITH_ALPHA, 0) = 10 THEN 1
    WHEN :P200_LIST_ALPHA = 'above' AND NVL(TO_COL_WITH_ALPHA, 0) > 10 THEN 1
    WHEN :P200_LIST_ALPHA = 'indiff' THEN 1
    ELSE 0
    END = 1 )
    AND
    ( CASE
    WHEN :P200_LIST_BETA = 'active' AND TO_COL_WITH_BETA IN ( 'a', 'A', 'akt', 'AKT' ) THEN 1
    WHEN :P200_LIST_BETA = 'passive' AND TO_COL_WITH_BETA IN ( 'p', 'P' ) THEN 1
    WHEN :P200_LIST_BETA = 'excluded' AND TO_COL_WITH_BETA = 'X' THEN 1
    ELSE 0
    END = 1 )
    ;Edited by: wucis on Oct 24, 2011 4:09 PM

  • How to trace the flow of plsql procedures/functions in oracle 10g

    Hi All,
    Recently I came to know that there is dbms_hprof PL/SQL built-in package in Oracle 11g which can be used to trace PL/SQL calls in a Hierarchical way. (acts as a PL/SQL Hierarchical Profiler).
    Steps are given in -
    http://www.oracle-base.com/articles/11g/PlsqlHierarchicalProfiler_11gR1.php
    I would like to know whether there is a similar package in Oracle 10g because I want to trace the flow of plsql procedure and function calls in order to generate an output in a hierarchical way (for debug purposes).
    The following example shows the flow of procedure calls when I execute PACKAGE_A.Proceudure_A. I want to generate that kind of an output.
    Ex -
    PACKAGE_A.Proceudure_A
    ----|_PACKAGE_A.Proceudure_B
    ----|------|_PACKAGE_B.Proceudure_C
    ----|_PACKAGE_B.Proceudure_M
    ----|------|_PACKAGE_A.Proceudure_B
    ----|-------------|_PACKAGE_C.Proceudure_C
    ----|_PACKAGE_Z.Proceudure_Z
    If there is no similar package in *10g* I would really appreciate if someone can provide me directions to get the job done using the exsting packages and tables in Oracle 10g. Thanks in advance.
    Edited by: user8326781 on Nov 28, 2008 8:57 PM
    Edited by: user8326781 on Nov 28, 2008 8:58 PM
    Edited by: user8326781 on Nov 29, 2008 12:19 AM

    I am not sure that this would serve the purpose or not but still, I guess its worth to atleast be mentioned,
    http://www.oracle-base.com/articles/9i/DBMS_TRACE.php
    HTH
    Aman....

  • Remote SAP function call from a plsql procedure

    Hi,
    How i can call a remote SAP function from a plsql procedure?
    Thnaks in advance:
    Bianca

    I don't see any relation to Oracle Forms in this question. Is there any? If so, can you specify what you want to do, and the version numbers of Forms and databases involved?
    And what does a call to a remote SAP procedure look like? Is it a DB procedure in an Oracle database? Then you can simply use a database link to the SAP database.

Maybe you are looking for