Executing PL/SQL from a varchar2 variable

so i've got an instruction ie:
test in varchar2;
test <= TO_DATE('2009-08-27', 'YYYY-MM-DD') ;
how to execute "test" from inside a stored function/procedure?
thanks i'm kind of noob, any help would be appreciated :)

¿Not sure here whether you've edited your original question, as Toon uses := instead of <=?
Anyway:
so i've got an instruction ie:
test in varchar2;
test <= TO_DATE('2009-08-27', 'YYYY-MM-DD') ;
how to execute "test" from inside a stored function/procedure?
thanks i'm kind of noob, any help would be appreciated :)So, I'm assuming your 'instruction' in human language would be something like:
"Check if your in-parameter is older or equal to the current present day (a.k.a. SYSDATE)"
But, WHY you need a stored function/procedure you do not mention.
So, please read this to begin with, to get the most and maximum out of your questions:
http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
And if my assumption is right, you could do something like:
MHO%xe> create or replace function date_in_future
  2  (p_date_str in varchar2)
  3  return varchar2
  4  as
  5    rtn varchar2(1);
  6  begin
  7    case when to_date(p_date_str, 'yyyy-mm-dd') > trunc(sysdate)
  8         then rtn := 'Y';
  9         else rtn := 'N';
10    end case;
11    --
12    return rtn;
13    --
14  end date_in_future;
15  /
Functie is aangemaakt.
Verstreken: 00:00:00.25
MHO%xe> select date_in_future('2008-02-12') from dual;
DATE_IN_FUTURE('2008-02-12')
N
Verstreken: 00:00:00.07
MHO%xe> select date_in_future('2020-02-12') from dual;
DATE_IN_FUTURE('2020-02-12')
YBut perhaps a BOOLEAN return or whatever would suit your requirement better.
But then you'd need to provide a more complete and concisive case/requirement/question.
Please remember these sites as well in any way, besides OTN, they contain tons of useful stuff (that's an understatement ;) ):
http://tahiti.oracle.com
http://asktom.oracle.com

Similar Messages

  • Execute PL/SQL from BC4J

    Hi All,
    Can anyone point me to documentation that tells how to execute PL/SQL from BC4J.
    Thanks a lot
    Srinivas Bhat

    Try something like this:
        try
          final ApplicationModule am = panelBinding.getApplicationModule();
          final CallableStatement stmt =  ((DBTransaction) am.getTransaction()).
              createCallableStatement ("{? = call yourpackage.yourfunction(?)}", 10);
          stmt.registerOutputParamter(1, oracle.jdbc.driver.OracleTypes.INTEGER);
          if (id == null)
            stmt.setNull (2, oracle.jdbc.driver.OracleTypes.NUMBER);
          else
            stmt.setInt (2, id.intValue());
          stmt.execute();
          stmt.close();
          return stmt.getInt(1);

  • Execute PL/SQL From MS SQL SERVER PL

    Hi.
    I Need execute a Oracle PL/SQL from a SQLSERVER 2000 PL, i make a database link from sqlserver and i can see the tables to oracle, but i can't execute a pl/sql.
    The PL/SQL i want execute return a ref cursor.
    Thak's for your help

    Do you have a final / in your script to execute it (which is presumably an anon pl/sql block).

  • How to execute PL/SQL from DOS PROMPT?

    Hello:
    I've seen that executing an SQl script via DOS prompt involves @script name, however all this seems to do is open the line editor. A GET command displays my script and sets the cursor on the next available line with the last line of the script with an asterics beside it. as does using the @scriptname command. I cannot do any commands like SAVE, RUN, etc.
    Any help is appreciated.

    Do you have a final / in your script to execute it (which is presumably an anon pl/sql block).

  • How to execute PL/SQL from Java?

    I want to execute (compile) a PL/SQL file to a database and I don't know how it can be done with Java.
    Please note that I am NOT trying to call a stored procedure. I know that can be done with CallableStatement.
    Background:
    My actual requirement is to execute PL/SQL files with error notifications. I tried Ant SQL task; but it fails to give compilation error information. I also tried another open source task called Incanto - that also not that helpful as if I execute in bulk, very hard to figureout which one throws error. Hence I decided to write my own Ant task.

    Hi,
    do u want to execute PL/SQL files? or just you want to execute the block of code?
    in the case of PL/SQL file:
    you need to read total file as StringBuffer/String and then execute.
    Block of code:
    you can directly pass the code to the java file as input and then execute.
    Ex:
                   StringBuffer queryString = new StringBuffer();
                    queryString = queryString.append("BEGIN execute immediate ' ");
              queryString = queryString.append(query);
              //queryString = queryString.append("BEGIN dbms_job.run(142);END;");
              queryString = queryString.append(" '; END; ");
              final_Query = queryString.toString();
              try {
                   System.out.println("final :   "+final_Query);
                   cstmt = con.prepareCall(final_Query);
                   System.out.println("Job is Running...");
                   new ThreadCountdownExtThread().start();
                   System.out.println("bfore execute()...............");
                   cstmt.execute();Note: if you are running pl/sql file read file and save it in a Stirng , and then do the same as above stated

  • Error reading data from CLOB column into VARCHAR2 variable

    Hi all,
    Am hitting an issue retrieving data > 8K (minus 1) stored in a CLOB column into a VARCHAR2 variable in PL/SQL...
    The "problem to be solved" here is storing DDL, in this case a "CREATE VIEW" statement, that is longer than 8K for later retrieval (and execution) using dynamic SQL. Given that the EXECUTE IMMEDIATE statement can take a VARCHAR2 variable (up to 32K(-1)), this should suffice for our needs, however, it seems that somewhere in the process of converting this VARCHAR2 text to a CLOB for storage, and then retrieving the CLOB and attempting to put it back into a VARCHAR2 variable, it is throwing a standard ORA-06502 exception ("PL/SQL: numeric or value error"). Consider the following code:
    set serveroutput on
    drop table test1;
    create table test1(col1 CLOB);
    declare
    cursor c1 is select col1 from test1;
    myvar VARCHAR2(32000);
    begin
    myvar := '';
    for i in 1..8192 loop
    myvar := myvar || 'a';
    end loop;
    INSERT INTO test1 (col1) VALUES (myvar);
    for arec in c1 loop
    begin
    myvar := arec.col1;
    dbms_output.put_line('Read data of length ' || length(myvar));
    exception when others then
    dbms_output.put_line('Error reading data: ' || sqlerrm);
    end;
    end loop;
    end;
    If you change the loop upper bound to 8191, all works fine. I'm guessing this might have something to do with the database character set -- we've recently converted our databases over to UTF-8, for Internationalizion support, and that seems to have changed underlying assumptions regarding character processing...?
    As far as the dynamic SQL issue goes, we can probably use the DBMS_SQL interface instead, with it's EXECUTE procedure that takes a PL/SQL array of varchar2(32K) - the only issue there is reading the data from the CLOB column, and then breaking that data into an array but that doesn't seem insurmountable. But this same basic issue (when a 9K text block, let's say, turns into a >32K block after being CLOBberred) seems to comes up in other text-processing situations also, so any ideas for how to resolve would be much appreciated.
    Thanks for any tips/hints/ideas...
    Jim

    For those curious about this, here's the word from Oracle support (courtesy of Metalinks):
    RESEARCH
    ========
    Test the issue for different DB version and different characterset.
    --Testing the following PL/SQL blocks by using direct assignment method(myvar := arec.col1;) on
    different database version and different characterset.
    SQL>create table test1(col1 CLOB);
    --Inserting four CLOB data into test1.
    declare
    myvar VARCHAR2(32767);
    begin
    myvar := RPAD('a',4000);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('a',8191);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('b',8192);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('c',32767);
    INSERT INTO test1 (col1) VALUES (myvar);
    commit;
    end;
    --Testing the direct assignment method.
    declare
    cursor c1 is select col1, length(col1) len1 from test1;
    myvar VARCHAR2(32767);
    begin
    for arec in c1 loop
    myvar := arec.col1;
    --DBMS_LOB.READ(arec.col1, arec.len1, 1, myvar);
    dbms_output.put_line('Read data of length: ' || length(myvar));
    end loop;
    end;
    The following are the summary of the test results:
    ===================================
    1. If the database characterset is WE8ISO8859P1, then the above direct assignment
    method(myvar := arec.col1;) works for database version 9i/10g/11g without any
    errors.
    2. If the database characterset is UTF8 or AL32UTF8, then the above direct assignment method(myvar := arec.col1;) will generate the "ORA-06502:
    PL/SQL: numeric or value error" when the length of the CLOB data is greater
    than 8191(=8K-1). The same error can be reproduced across all database versions
    9i/10g/11g.
    3. Using DBMS_LOB.READ(arec.col1, arec.len1, 1, myvar) method to read CLOB data into a VARCHAR2 variable works for both WE8ISO8859P1 and UTF8
    characterset and for all database versions.
    So - it seems as I'd surmised, UTF8 changes the way VARCHAR2 and CLOB data is handled. Not too surprising, I suppose - may you all be lucky enough to be able to stay away from this sort of issue. But - the DBMS_LOB.READ workaround is certainly sufficient for the text processing situations we find ourselves in currently.
    Cheers,
    Jim C.

  • Solution to execute sql from mysql application logs

    We have some custom mysql application, which generate logs that are stored on common location on open linux box which has below format
    $ cat minor20100809.log
    20100809001^Aselect count(prod_id) from product_logs;
    20100809002^Aselect count(order_id) from order_logs;
    ID and the SQL statement with control A as seperater and daily 1000 logs files are generated
    Now we have one oracle DWH, where we import all the mysql data and we need to test these counts on daily basis.
    Could you please suggest a solution in oracle for this?
    at high level we need to follow below steps
    a) Import these logs in a table --> which is better way sqlldr, impdp, or plsql read file ?
    b) execute these sql statement one by one
    c) store the counts in log table on daily basis

    Hi,
    It is a simple two step process.
    Step 1. Convert your log files statements to meaningful oracle statements. like removing prefixes 20100809001^A from each line.
    This can be done in two ways.
    (a). Using OS editors OR
    (b). Following PL/SQL code...
    -- Connect as sysdba
    create or replace directory dir_tmp as '/tmp';                        -- If oracle server is on Unix
    create or replace directory dir_tmp as 'C:\your_folder';            -- If oracle server is on Windows
    -- Grant permission to your_schema
    grant read, write on directory dir_tmp to your_schema;    Removing prefixes using:
           SELECT regexp_replace (vNewLine, '([[:alnum:]]{1,})\^A', '\2')
             INTO vStmt
             FROM DUAL;
    CREATE OR REPLACE PROCEDURE convert_to_sql_stmts
    ( input_file     in varchar2,
      output_file   in varchar2
    AUTHID CURRENT_USER
    IS
        InFile   utl_file.file_type;
        OutFile  utl_file.file_type;
        vNewLine VARCHAR2(4000);
        vStmt    VARCHAR2(4000);
        i        PLS_INTEGER;
        j        PLS_INTEGER := 0;
        SeekFlag BOOLEAN := TRUE;
    BEGIN
      -- open a file to read
      InFile := utl_file.fopen(dir_tmp, input_file,'r');
      -- open a file to write
      OutFile := utl_file.fopen(dir_tmp, output_file, 'w');
      -- if the file to read was successfully opened
      IF utl_file.is_open(InFile) THEN
        -- loop through each line in the file
        LOOP
          BEGIN
            utl_file.get_line(InFile, vNewLine);
            i := utl_file.fgetpos(InFile);
            dbms_output.put_line(TO_CHAR(i));
            SELECT regexp_replace (vNewLine, '([[:alnum:]]{1,})\^A', '\2')
              INTO vStmt
              FROM DUAL;
            utl_file.put_line(OutFile, vStmt, FALSE);
            utl_file.fflush(OutFile);
            IF SeekFlag = TRUE THEN
              utl_file.fseek(InFile, NULL, -30);
              SeekFlag := FALSE;
            END IF;
          EXCEPTION
            WHEN NO_DATA_FOUND THEN
              EXIT;
          END;
        END LOOP;
        COMMIT;
      END IF;
      utl_file.fclose(InFile);
      utl_file.fclose(OutFile);
    EXCEPTION
      WHEN OTHERS THEN
        RAISE_APPLICATION_ERROR (-20099, 'Unknown UTL_FILE Error');
    END convert_to_sql_stmts;
    Step 2. Directly executing above output log file
    Use spool to generate the count....
        set termout off
        set feedback off
        set trimspool on
        set pagesize 0
        set timing OFF
        spool   count.log
        @new_file.log
        spool off;Hope this helps...

  • Passing PL/SQL varchar2 variable to XML Query

    Hi guys,
    i'm having trouble passing a pl/sql varchar2 variable to an XMLQuery.
    This is the relevant part of my code:
    DECLARE
       lo_result   XMLTYPE;         --contains the XML which is being parsed below
       lo_return   XMLTYPE;             -- for the XML result returned by XMLQuery
       lo_start    VARCHAR2 (100) DEFAULT 'Toronto'; -- a PL/SQL varchar2 variable
       lo_end      VARCHAR2 (100) DEFAULT 'Ottawa';  -- a PL/SQL varchar2 variable
    BEGIN
       SELECT XMLQUERY (
                 'for $i in //leg[start_address[text()[contains(.,$lo_start)]] and end_address[text()[contains(.,$lo_end)]]]/distance/value/text() return ($i)'
                 PASSING lo_result, lo_start AS "lo_start", lo_end AS "lo_end"
                 RETURNING CONTENT)
         INTO lo_return
         FROM DUAL;
    END;The XPath expression is correct but it doesn't seem to accept my variables since lo_return is empty.
    I think the variables should be of type Xmltype but the compiler won't let me convert them because they do not contain any XML tags .
    Hope anyone can help.
    Thanks,
    Martina

    may be i missed anything but
    >
    <start_address>Toronto, Ontario, Kanada</start_address>
    <end_address>Huntsville, Alabama, Vereinigte Staaten</end_address>
    >
    and
    >
    lo_start VARCHAR2 (100) DEFAULT 'Toronto'; -- a PL/SQL varchar2 variable
    lo_end VARCHAR2 (100) DEFAULT 'Ottawa'; -- a PL/SQL varchar2 variable
    >
    so
    SQL> SELECT XMLQUERY (
      2              'for $i in //leg[start_address[text()[contains(.,$lo_start)]] and end_address[text()[contains(.,$lo_end)]]]/distance/value/text() return ($i)'
      3               PASSING
      4               xmltype('<DirectionsResponse>
      5    <status>OK</status>
      6    <route>
      7      <summary>I-75 N</summary>
      8      <leg>
      9        <duration>
    10          <value>48220</value>
    11          <text>13 Stunden, 24 Minuten</text>
    12        </duration>
    13        <distance>
    14          <value>1404935</value>
    15          <text>1.405 km</text>
    16        </distance>
    17        <start_location>
    18          <lat>43.6533100</lat>
    19          <lng>-79.3827700</lng>
    20        </start_location>
    21        <end_location>
    22          <lat>34.7303300</lat>
    23          <lng>-86.5860700</lng>
    24        </end_location>
    25        <start_address>Toronto, Ontario, Kanada</start_address>
    26        <end_address>Huntsville, Alabama, Vereinigte Staaten</end_address>
    27      </leg>
    28    </route>
    29  </DirectionsResponse>'),
    30               'Toronto' AS "lo_start", 'Ottawa' AS "lo_end"
    31               RETURNING CONTENT)
    32       FROM DUAL;
    XMLQUERY('FOR$IIN//LEG[START_A
    SQL>
    SQL>
    SQL>
    SQL> SELECT XMLQUERY (
      2              'for $i in //leg[start_address[text()[contains(.,$lo_start)]] and end_address[text()[contains(.,$lo_end)]]]/distance/value/text() return ($i)'
      3               PASSING
      4               xmltype('<DirectionsResponse>
      5    <status>OK</status>
      6    <route>
      7      <summary>I-75 N</summary>
      8      <leg>
      9        <duration>
    10          <value>48220</value>
    11          <text>13 Stunden, 24 Minuten</text>
    12        </duration>
    13        <distance>
    14          <value>1404935</value>
    15          <text>1.405 km</text>
    16        </distance>
    17        <start_location>
    18          <lat>43.6533100</lat>
    19          <lng>-79.3827700</lng>
    20        </start_location>
    21        <end_location>
    22          <lat>34.7303300</lat>
    23          <lng>-86.5860700</lng>
    24        </end_location>
    25        <start_address>Toronto, Ontario, Kanada</start_address>
    26        <end_address>Huntsville, Alabama, Vereinigte Staaten</end_address>
    27      </leg>
    28    </route>
    29  </DirectionsResponse>'),
    30               'Toronto' AS "lo_start", /*'Ottawa'*/'Huntsville' AS "lo_end"
    31               RETURNING CONTENT)
    32       FROM DUAL;
    XMLQUERY('FOR$IIN//LEG[START_A
    1404935
    SQL>

  • Strange problem with executing PL/SQL procedure from sqlplus.

    Hello,
    basicly, I'm strugling with executing a procedure written in PL/SQL from sqlplus.
    It's all because I convert a data in procedure by other function.
    SELECT partition_name
    INTO strpartition
    FROM user_tab_partitions
    WHERE table_name = tablename_in
    and substr(partition_name, -8, length(partition_name)) = (SELECT F_CONVERT_DATE(tablename_in,p_date) from dual);
    /tablename_in and p_date are input parameters/
    Function F_CONVERT_DATE looks more less like :
    select
    TO_CHAR(TRUNC(NEXT_DAY(ADD_MONTHS(substr(partition_name, -8, length(partition_name)), -3), 'MONDAY')-7), 'YYYYMMDD')
    END
    AS p_date
    INTO v_okr
    FROM user_tab_partitions
    where substr(partition_name, -8, length(partition_name)) = p_date;
    Well, the thing is that procedure is executable from TOAD without any errors !! But when I try to execute it straight from sqlplus it returns:
    ORA-01861: literal does not match format string
    ORA-06512: at "F_CONVERT_DATE", line 13
    ORA-06512: at "NAME_OF_PROCEDURE", line 17
    Tip: When I don't use functions ADD_MONTHS, NEXT_DAY and TO_CHAR in function F_CONVERT_DATE sqlplus can execute it. But only when I use them it returns an error.
    Anybody has a clue how to solve it?
    Regards !

    Hi, Nodex,
    Avoid implicit conversions.
    For example:
    TO_CHAR(TRUNC(NEXT_DAY(ADD_MONTHS(substr(partition_name, -8, length(partition_name)), -3), 'MONDAY')-7), 'YYYYMMDD')ADD_MONTHS expects a DATE as its first argument.
    SUBSTR returns a VARCHAR2, so you're calling ADD_MONTHS with a VARCHAR2 where it expects a DATE.
    For good or ill, the system tries to avoid raising an error in this case by implicitly converting the VARCHAR2 to a DATE. Exactly how it does that depends on
    (a) the tool you are using (SQL*Plus or Toad, for example),
    (b) the version (Oracle 10 behaved quite different form Oracle 9),
    (c) environmental settings (such as NLS_DATE_FORMAT), which in turn may depend on initialization parameneters, and
    (d) who knows what else.
    When you have to convert, do so explicitly.
    You can convert a VARCHAR2 to a DATE using TO_DATE, like this:
    TO_CHAR ( TRUNC ( NEXT_DAY ( ADD_MONTHS ( TO_DATE ( SUBSTR ( partition_name
                                                       , -8
                                          , LENGTH (partition_name)
                                     , 'YYYYMMDD'     -- or whatever
                             , -3
                      , 'MONDAY'
              - 7
         , 'YYYYMMDD'
         )

  • Need help, executing a SQL file from Forms

    Hi everyone,
    I don't know if this can be done. I want to execute a SQL file from a When-Button-Pressed trigger. I checked a couple of place but havent found anything yet on how to do this. If someone know of a way, please help.
    Thanks
    Eric

    procedure p_call_sqlplus is
       l_filename varchar2 (1000) := 'C:\abc\def\test.sql'  ;
    begin
       host ('sqlplus /NOLOG @' ||  l_filename ) ;
    end ;
    rem ======== test.sql ========
    connect scott/tiger
    spool 'C:\abc\def\test'
    select * from emp ;
    spool off
    exit
    rem ======================working on the machine where forms is running

  • Executing a sql command from a menu item

    I am working on a forms migration from 4.5 to 10g.
    On 4.5, if I execute a sql using a sqlplus -s command, from a menu item, a window is opened showing the execution messages, if there were errors and it's details.
    It doens´t happen on 10g anymore. Is there any chance I can keep on 10g this functionality that used to work on 4.5 ??
    The procedure I use to execute the sql is:
    Menu item code:
    plus('sql_ name',null);
    Procedure:
    procedure plus(
    program in VARCHAR2, /* sql name*/
    parameters in VARCHAR2 /* aditional parameters */
    ) is
    V_USERNAME varchar2(100);
    V_PASSWORD varchar2(100);
    V_DATABASE varchar2(100);
    str varchar2(300);
    begin
    V_USERNAME := GET_APPLICATION_PROPERTY(USERNAME);
    V_PASSWORD := GET_APPLICATION_PROPERTY(PASSWORD);
    V_DATABASE := GET_APPLICATION_PROPERTY(CONNECT_STRING);
    str := V_USERNAME||'/'||V_PASSWORD||'@'||V_DATABASE;
    HOST ('sqlplus -s '||''''||str||''''||' @$PATH/'||program||' '||parameters);
    end;
    Tks a lot,

    Hello,
    With C/S versions, the Host() command execute on the machine that runs the Forms runtime, that is the client machine.
    With Web versions, Host() is also executed on the machine that runs the Forms runtime, that, this time is the application Server.
    Use the Client_Host() Webutil equivalent.
    Francois

  • Error when execute a package from SQL Server Agent

    We have the next problem:
    When we execute a package from a Job of SQL Server agent, it shows the success messege, but reviewing the results, the package didnt do all the tasks.
    When we run it mannually by MSIS the package, it shows the success message and it works fine.
    The workflow of the package is :
    1) Shrink the databases (executing a sql file)
    2) Backup the databases (Back up Database task of MSIS)
    3) Rename the files to .BAK extension (by the Foreach loop container and fyle system task)
    4) Execute command to compress the it (by a .bat)
    5) Move the compress file to another location  (by another Foreach loop)
    Manually run correct, but when is a a SQL AGent Job that execute the package it does only the first 2 steps.
    we are ussing Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (coffee) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) 
    We are using a user with administrator privilegies
    Cheers 

    Can you check if account running package has proper access. You may need to define a proxy account for that.
    See
    http://www.databasejournal.com/features/mssql/article.php/3789881/Proxy-Accounts-in-SQL-Server.htm
    http://gqbi.wordpress.com/2014/01/30/setting-up-a-proxy-account-to-run-sql-server-integration-services-ssis-2012-packages/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to execute a  .sql file from a batch file

    Hi all
    I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
    now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
    i created a batch file prod.bak with the following lines
    @echo off
    set oracle_sid=testdb
    set oracle_home=d:\oracle\ora92
    sqlplus /nolog
    connect sys as sysdba/oracletest@testdb
    this batch file when eexecuted connects me to sql prompt.
    Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
    (i tried with these lines in the above batch file...
    call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
    start bkp.sql---same as call
    connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
    At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
    Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
    I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
    Thanks
    Tripti

    Try
    sqlplus "sys/oracletest as sysdba" @bpk.sql
    Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
    Remember to put an exit at the end of the bpk.sql script.

  • It is possible to execute a SQL query from OMBPlus?

    We have some simple SQL scripts we'd like to be able to incorporate into our existing TCL scripts, instead of having to run them outside of OMBPlus in sqlplus. Is is possible to run a SQL SELECT query from OMBPlus and/or TCL? And get a result set back to iterate through?
    Thanks,
    Jim C.

    You can execute SQLPlus from OMB or just get down and use JDBC to execute the SQL, see others posts on forum such as below;
    How to run SQL from OMB+
    Cheers
    David

  • How execute pl/sql command from Oracle ADF Business Components

    can't find examples for how execute pl/sql command from Oracle ADF Business Components and how call pl/sql package procedure from ADF Business Components.
    insert,update,delete rows in view object instance cache is good but if i must do some complex operations while insert,update,delete rows..it's more better for me to call
    pl/sql procedure from oracle db.Am i wrong ????

    Roman,
    this should be similar to how it worked in JDeveloper 9.0.3. hava a look at <JDev903 Home>\BC4J\samples\StoredProc for a code example.
    Frank

Maybe you are looking for

  • Problem in capturing webcam image

    To capture image directly, I'm using the following code: import java.io.*; import java.awt.*; import java.util.Enumeration; import java.util.Properties; import java.util.Vector; import javax.media.*; import javax.media.control.*; import javax.media.p

  • How do I fix a kernal panic on my mid 2012 macbook pro 13?

    My Macbook Pro mid 2012 OSX version 10.7.5 has been crashing at least 15 times a day for 3 days. I'm working in a 3rd World Country without any Apple stores for support, so I'm really, really stuck. Can anybodykindly give me some advise? I have recen

  • Can we buy iphone from one country and then change the service provider

    Hi, I wanted to know if I buy an iphone from india today can I change the service provider when i come to U.S.A. for my studies in Jan

  • Problems Printing Ricoh Aficio 1045 via IPP (Error with Exclamation Mark)

    Two of our offices use Ricoh Aficio 1045 and I'm having difficulty printing to either printer via my MacBook (Op System: Mac OSX 10.4.10). I've tried using IPP and have downloaded the proper drivers, but when I press print, a printer icon appears on

  • Win 8.1 random crashing

    Hi there, I know you get this question pretty often :) I get the restart or blue screen issue at random, whether the pc is under load or at desktop. Here is the dmp file: https://www.dropbox.com/s/ujzkuikz51dcsf4/021814-12375-01.zip System specs: CPU