Plsql block cursors

Hi,
I have a member procedure calc_discount in a type body of a subtype. this procedure takes in a parameter id and calculates the discount that the particular satff member has based on their years in service.
I'm trying to create a pl/sql block that will calculate the discount for all members of staff. i.e will go through the whole staff type, get the custID and pass this into the member procedure in order to calculate the discount.
I'm trying to do this using cursos but getting the error no data found when there is.
my pl/sql block is:
set serveroutput on;
declare
staff staff_typA := staff_typA(null,null,null,null,null,null,null);
id number(6);
discount number(6);
cursor staffa is
select treat(value(p) as staff_typA).CustID into id
from customer_objtabA p;
begin
for staff_rec in staffa
loop
staff.Calc_discount(id);
select treat(value(p) as staff_typA).Discount_level into discount
from customer_objtabA p
where p.CustID = id;
dbms_output.put_line(staff.Name || 'now has' || discount || 'Discount Level');
end loop;
commit;
end;
show errors;
can anybody see where i'm going wrong?
Cheers

staff_typa is a subtype of customer_objtaba
staff_typa has a member procedure Calc_discount(id number) in it.
i tried the previous suggestion
staff.Calc_discount(staff_rec.custid);
but still get no data found error.
my code for staff_typa is:
CREATE or replace TYPE staff_typA UNDER customer_objtypA (
Years_in_service NUMBER(2),
Discount_level NUMBER(10),
member procedure Calc_discount(id number))
not final;
show errors;
CREATE OR REPLACE TYPE BODY staff_typA AS
MEMBER procedure Calc_discount(id Number) IS
years number;
discount number(10);
BEGIN
select treat(value(p) as staff_typA).years_in_service into years
from customer_objtabA p
where p.CustID = id;
DBMS_OUTPUT.PUT_LINE('years ' || years);
if (years < 10) then
discount := years * 5;
else
discount := 50;
end if;
DBMS_OUTPUT.PUT_LINE('discount' || discount);
UPDATE
(SELECT TREAT(VALUE(p) AS staff_typa) AS person
FROM customer_objtaba p
WHERE p.custid = id ) staff
SET staff.person.discount_level = discount;
END Calc_discount;
END;
show errors;

Similar Messages

  • Using Execute Immediate in PLSQL block Vs Stand alone procedure

    I am facing very unusual ( atleast unusual to me ) with usage of "Execute Immediate" statement.
    I have a table dynamic_sql with one column plsql_block as VARCHAR2(4000);
    I have stored some PLSQL blocks ('DECLARE ..... BEGIN.... END.... ) in this column .
    Now I want to execute these PLSQL blocks one after other depending on certain conditions .
    In order to archive this I wrote a PLSQL block as below
    DECLARE
    Cursor c1 is
    select plsql_block from dynamic_sql
    begin
    for irec in c1
    loop
    <<< Condition >>>
    begin
    execute_immediate(irec.plsql_block);
    exception
    when others then
    raise_application_error(-20001,'error ' ||irec.plsql_block||' '||sqlerrm);
    end loop ;
    end ;
    With above PLSQL block , "execute immediate" is executing PLSQL block successfully without any error
    But When I converted above PLSQL block into standalone procedure as shown below , I am getting error .
    CREATE OR REPLACE procedure test AS
    Cursor c1 is
    select plsql_block from dynamic_sql
    begin
    for irec in c1
    loop
    <<< Condition >>>
    begin
    execute_immediate(irec.plsql_block);
    exception
    when others then
    raise_application_error(-20001,'error ' ||irec.plsql_block||' '||sqlerrm);
    end loop ;
    end ;
    BEGIN
    test;
    end ;
    It is showing the value of irec.plsql_block but not showing sqlerrm...
    I found this is very unusual as I am able to execute "execute immediate" statement with PLSQL block but not with similar procedure .
    can anybody explain me why this is happening?
    Thanks in Advance
    Amit

    Hello,
    It doesn't make any sense to add SQLERRM for user defined exception, unless you want to raise application error for already defined error (e.g NOT_DATA_FOUND, ..)
    Check following piece of code and its output,
    CREATE OR REPLACE PROCEDURE myinsert1
    AS
       v_count   NUMBER;
       v_sql     VARCHAR2 (300);
    BEGIN
       v_sql :=
          'INSERT INTO ENTITY_EMPLOYEE VALUES(0,''TIM'',''LASTNAME'',10000)';
       BEGIN
          EXECUTE IMMEDIATE v_sql;
          COMMIT;
       EXCEPTION
          WHEN OTHERS
          THEN
             DBMS_OUTPUT.PUT_LINE (SUBSTR (SQLERRM, 1, 300));
             RAISE_APPLICATION_ERROR (-20002, 'My Error ' || SQLERRM, TRUE);
             RAISE;
       END;
    END;
    Output._
    ORA-20002: My Error ORA-00001: unique constraint (ENTITY_EMPLOYEE_PK) violated
    ORA-06512: at "MYINSERT1", line 21
    ORA-00001: unique constraint (ENTITY_EMPLOYEE_PK) violated
    ORA-06512: at line 2
    Regrds

  • Output parameter in plsql Block fails

    Hello. I am testing using an anonymous Plsql block with one in and out parameter. The in parameter work fine but when I add the out, the plsql block fails.
    This is my environment on a Windows 7 client attaching to a Solaris server. I am using Powershell 3.0, but it is very similar to #c. I have a .net framework of 4.5.
    PS L064217>    $GAC = $Env:Oracle_Home + "\" + "ODP.NET\bin\4\Oracle.DataAccess.dll"
    PS L064217>    [Void] [Reflection.Assembly]::LoadFile($Gac)
    PS L064217> [Reflection.Assembly]::LoadFile($Gac)
    GAC    Version        Location
    True   v4.0.30319     C:\windows\Microsoft.Net\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.3.0__89b4
    SQL*Plus: Release 11.2.0.3.0 Production on Wed Nov 28 19:09:57 2012
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsHere is a sample of my test code:
    # Define Plsql Anonymous Block
    $Table1 = 'AdvSearch_Statutes'
    $Table2 = ($Table1).Substring(0, $Table1.Length-1) + '_Docs'
    $Caml_Doc_Id = 'CHP201500010'
    $Sql =  " DECLARE "
    $Sql += "   vCamlId      VARCHAR2(30)  := ':Param1' "
    $Sql += "   vPath_Tx     VARCHAR2(200); "
    $Sql += "   vDelRows_Nr  PLS_INTEGER := 0; "
    $Sql += "   CURSOR Docs_Cur IS "
    $Sql += "       SELECT XPath "
    $Sql += "       FROM $Table2 "
    $Sql += "       WHERE Caml_Doc_Id = vCamlId; "
    $Sql += " BEGIN "
    $Sql += "   OPEN Docs_Cur; "
    $Sql += "   LOOP "
    $Sql += "     FETCH Docs_Cur INTO vPath_Tx; "
    $Sql += "     EXIT WHEN Docs_Cur%NOTFOUND; "
    $Sql += "     IF (DBMS_XDB.ExistsResource(vPath_Tx)) "
    $Sql += "     THEN "
    $Sql += "       DelRows_Nr := DelRows_Nr + 1; "
    $Sql += "       DBMS_XDB.DeleteResource(vPath_Tx, DBMS_XDB.DELETE_RECURSIVE_FORCE); "
    $Sql += "     END IF; "
    $Sql += "   END LOOP; "
    $Sql += "   DELETE FROM $Table2 WHERE Caml_Doc_Id = vCamlId; "
    $Sql += "   vDelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; "
    $Sql += "   DELETE FROM $Table1 WHERE Caml_Doc_Id = vCamlId; "
    $Sql += "   vDelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; "
    $Sql += "   SELECT vDelRows_Nr INTO :Param2 FROM Dual; "
    $Sql += " EXCEPTION "
    $Sql += "   WHEN OTHERS THEN ROLLBACK; "
    $Sql += " END; "
    # Set up the Connection and command objects using the prior defined information.  Ensure that
    # Bind by name is used.
    $Conn = New-Object Oracle.DataAccess.Client.OracleConnection($Connect_Str)
    $Cmd  = New-Object Oracle.DataAccess.Client.OracleCommand($Sql, $Conn)
    $Cmd.BindByName = $True
    #Set up the parameters for use with the Sql command.
    $Param1 = New-Object Oracle.DataAccess.Client.OracleParameter
    $Param2 = New-Object Oracle.DataAccess.Client.OracleParameter
    $Param1.DbType = 'AnsiString'
    $Param1.OracleDbType = 'Varchar2'
    $Param1.Direction = 'Input'
    $Param1.ParameterName = ':Param1'
    $Param1.Value = $Caml_Doc_Id
    $Param2.DbType = 'Int32'
    $Param2.OracleDbType = 'Int32'
    $Param2.Direction = 'Output'
    $Param2.ParameterName = ':Param2'
    [Void] $Cmd.Parameters.Add($Param1)
    [Void] $Cmd.Parameters.Add($Param2)
    # Open connection to database and execute the command
    Try
       $Conn.Open();
       $Result = $Cmd.ExecuteNonQuery();
       If ($Param2.Value -Eq $Null) {$Counts = 0}
       Else {$Count  = ($Param2.Value).ToString()}
       Write-Host "Return Code:  $Result"
       Write-Host "Rows Deleted:  $Counts"
    Catch [System.Exception]
      $Param2
      Write-Host $_.Exception.ToString() -ForeGroundColor "Red"
    Finally
      $Conn.Close();
      $Conn.Dispose();
      "`nSuccessful end of script"
    }I have some output. It all seems to be okay. I am following a book rather closely, but after several attempts changing one thing or another, I still cannot find a way to send an out value. I have commented out the " SELECT vDelRows_Nr INTO :Param2 FROM Dual; " and that is the problem statement. Thank you for your help. The first portion is the plsql being echoed back, then I list out what Param2 is defined at. The last bit is the error returned.
    PS L064217> .\Test_Odp_PLsqlBlock.ps1
    DECLARE    vCamlId      VARCHAR2(30)  := ':Param1'    vPath_Tx     VARCHAR2(200);    vDelRows_Nr  PLS_INTEGER := 0;
    CURSOR Docs_Cur IS        SELECT XPath        FROM AdvSearch_Statute_Docs        WHERE Caml_Doc_Id = vCamlId;  BEGIN
      OPEN Docs_Cur;    LOOP      FETCH Docs_Cur INTO vPath_Tx;      EXIT WHEN Docs_Cur%NOTFOUND;      IF (DBMS_XDB.ExistsR
    esource(vPath_Tx))      THEN        DelRows_Nr := DelRows_Nr + 1;        DBMS_XDB.DeleteResource(vPath_Tx, DBMS_XDB.DEL
    ETE_RECURSIVE_FORCE);      END IF;    END LOOP;    DELETE FROM AdvSearch_Statute_Docs WHERE Caml_Doc_Id = vCamlId;    v
    DelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT;    DELETE FROM AdvSearch_Statutes WHERE Caml_Doc_Id = vCamlId;    vDelRows_Nr
    := vDelRows_Nr + SQL%ROWCOUNT;    SELECT vDelRows_Nr INTO :Param2 FROM Dual;  EXCEPTION    WHEN OTHERS THEN ROLLBACK;
    END;
    DbType                  : Int32
    SourceColumnNullMapping : False
    Direction               : Output
    IsNullable              : False
    Offset                  : 0
    OracleDbTypeEx          : Int32
    OracleDbType            : Int32
    ParameterName           : :Param2
    Precision               : 0
    Scale                   : 0
    Size                    : 0
    ArrayBindSize           :
    SourceColumn            :
    SourceVersion           : Current
    Status                  : Success
    ArrayBindStatus         :
    CollectionType          : None
    Value                   :
    UdtTypeName             :
    Oracle.DataAccess.Client.OracleException ORA-01036: illegal variable name/number    at Oracle.DataAccess.Client.OracleEx
    ception.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object sr
    c, String procedure, Boolean bCheck)
       at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
       at CallSite.Target(Closure , CallSite , Object )Edited by: CRoberts on Nov 28, 2012 7:30 PM

    As test
    use NUMBER instead of PLS_INTEGER in PL/SQL
    and
    use Decimal instead of Int32 for Oracle parameter datatype

  • Calling plsql block in java

    Hi
    Needs some help, urgently.
    i have to call/execute a plsql block in java program.
    block is similar to this
    declare
    CURSOR l_csr IS
    select empname, empid, empdate from emp
    order by empid;
    l_empid NUMBER;
    l_empdate DATE;
    l_empname varchar2(30);
    o_dateProfileId NUMBER;
    o_dayofweekprofileid NUMBER;
    begin
    open l_csr;
    loop
    FETCH l_csr INTO l_empid , l_empname , l_empdate;
    EXIT WHEN l_csr%NOTFOUND;
    DETERMINEEMPPROFILE(l_empdate,o_dateProfileId,o_dayofweekprofileid,l_empid ,FALSE);
    IF(o_dateProfileId IS NOT NULL) THEN
    SELECT totaljobs INTO l_max1 FROM dateprofile WHERE dateprofileid = o_dateprofileid;               
    ELSE
    SELECT totaljobs INTO l_max1 FROM dayofweekprofile WHERE dayofweekprofileid = o_dayofweekprofileid;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('SQLCODE = ' || SQLCODE);
    END;
    i need to call this in java program and take the results of l_max1.
    can someone provide an example of hot to do this or sample code
    appreciate any help

    I'm assuming this is for Oracle. Take a look at this article [url=http://www.enterprisedt.com/publications/oracle/result_set.html
    ]here for an example of how to use java to parse a result set from an Oracle procedure.

  • Plsql block error

    I have small PLSQL block with a bind variable in it which throws an error on its execution.
    declare
    cursor c1 is select product_name from PRODUCTS where month=:m;
    begin
    for i in c1 loop
    dbms_output.put_line(i.product_name);
    end loop;
    end;
    It thows the error
    ORA-01008: not all variables bound
    Is it not possible to have a bind variable in a cursor?
    Please help
    Regards

    If you're using SQL*Plus you need to declare and set the bind variable...
    SQL> set serverout on;
    SQL> var d number;
    SQL> exec :d := 20;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.07
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    cursor c1 is select ename from emp where deptno=:d;
      3  begin
      4    for i in c1 loop
      5      dbms_output.put_line(i.ename);
      6    end loop;
      7* end;
    SQL> /
    SMITH
    JONES
    SCOTT
    ADAMS
    FORD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.06
    SQL>

  • Am facing this error sqlcode :-6502 while running sql code in plsql block

    Am facing this error sqlcode :-6502 while running sql code in plsql block.
    am using query :
    SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) FROM DUAL;
    CAN any body tell me why.

    BD_Fayez wrote:
    I've tried the following, but don't get any error.As I mentioned, most likely variable is too short:
    SQL> declare
      2  strSub varchar2(2);
      3  begin
      4  SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) into strSub FROM DUAL;
      5  dbms_output.put_line(strSub);
      6  end;
      7  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 4
    SQL> SY.

  • Can I use Count, Max function in PLSQL BLOCK.

    Can U help me to use count, max function in PLSQL BLOCK.
    Because it is giving me error "It is a SQL function"

    SELECT COUNT(*)
    INTO l_variable
    FROM dual;
    Will work inside PL/SQL

  • PLSQL BLOCK TO RUN A TYPE PROCEDURE

    I have created a type called bank_account which has many member functions and procedures to open ,close,deposit and withdraw.I have created a type body where these member functions are defined.i have created a table based on this type.
    Now my problem is that the plsql block that i have written to call the member function open gives the following error:
    method dispatch on NULL SELF argument is disallowed
    the plsql block is as given below:
    SQL> run
    1 declare
    2 amount real;
    3 a bank_account(this is the type);
    4 begin
    5 amount:=&amount;
    6 a.open(amount);
    7 dbms_output.put_line('account opened');
    8* end;
    Enter value for amount: 5
    old 5: amount:=&amount;
    new 5: amount:=5;
    declare
    ERROR at line 1:
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at line 6
    please help me to solve my problem
    null

    I have created a type called bank_account which has many member functions and procedures to open ,close,deposit and withdraw.I have created a type body where these member functions are defined.i have created a table based on this type.
    Now my problem is that the plsql block that i have written to call the member function open gives the following error:
    method dispatch on NULL SELF argument is disallowed
    the plsql block is as given below:
    SQL> run
    1 declare
    2 amount real;
    3 a bank_account(this is the type);
    4 begin
    5 amount:=&amount;
    6 a.open(amount);
    7 dbms_output.put_line('account opened');
    8* end;
    Enter value for amount: 5
    old 5: amount:=&amount;
    new 5: amount:=5;
    declare
    ERROR at line 1:
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at line 6
    please help me to solve my problem
    null

  • Unable to insert row in object table from plsql block

    I have table called test based on an object type. When I issue an insert statement from sqlplus, the row is inserted. The exact same sql statement in a plsql block gives the error below. Any ideas? (it is not a constraint problem).
    SQL> insert into test values( 3,2,1,1,'asp',1,'mach' );
    1 row created.
    SQL> begin
    2 insert into test values( 3,2,1,1,'asp',1,'mach' );
    3 end;
    4 /
    insert into test values( 3,2,1,1,'asp',1,'mach' );
    ERROR at line 2:
    ORA-06550: line 2, column 16:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-302: component 'DOCUMENT' must be declared
    ORA-06550: line 2, column 4:
    PL/SQL: SQL Statement ignored
    (ddl)
    CREATE OR REPLACE type document as object
    DOC_ID NUMBER (38),
    BATCH_ID NUMBER (38),
    STATE NUMBER (2),
    TRANSIENT NUMBER (2),
    ASP VARCHAR2 (20),
    USER_ID NUMBER (6),
    MACHINE VARCHAR2 (30),
    MEMBER PROCEDURE setState,
    MEMBER function getState RETURN NUMBER
    ) not final;
    create table test of document;

    Hi Adam
    You need to instantiate your object type in your insert statement(while doing through PL/SQL block), so try like this
    Insert into test values(document(1,2,'CO',55,'xyz','kkk','PENTIUM'));
    The reason you were successful through SQLPLUS was that, SQLPLUS automatically instantiate the values into object type.
    Qurashi

  • How to invoke plsql block when press a button

    new to htmldb,
    let's say i have a form with some items , after i press a button, i want to invoke a plsql block, how can i do that?
    Cheers,

    I have only played a bit with this. I had a region with search criteria’s and a region based on a procedure. I created a page button on the first region that branched to the same page. When I press the button the page is refreshed and the procedure is re-executed with what ever search criteria’s the user has keyed in. That is as far as I have come :-)

  • Unix command from Plsql block

    Hi all ,
    I have tried unix command from PLSQL Block,
    Please see the code.
    DECLARE
    stat INTEGER;
    host_command varchar2(100);
    errormsg VARCHAR2(80);
    command varchar2(2000);
    BEGIN
    command:='touch /home/oracle/testting.txt';
    dbms_pipe.reset_buffer;
    host_command:= dbms_pipe.unique_session_name;
    dbms_output.put_line('host_command:'||host_command);
    dbms_pipe.pack_message(command);
    dbms_output.put_line('pack message:'||command);
    stat := dbms_pipe.send_message(host_command);
    dbms_output.put_line('stat:'||stat);
    IF stat <> 0 THEN
    raise_application_error(-20000, 'Error:'||TO_CHAR(stat)||' sending on pipe');
    END IF;
    stat := dbms_pipe.receive_message(host_command);
    dbms_output.put_line('stat2:'||stat);
    IF stat <> 0 THEN
    raise_application_error(-20000, 'Error:'||TO_CHAR(stat)||' receiving on pipe');
    END IF;
    dbms_pipe.unpack_message(errormsg);
    dbms_output.put_line('errormsg:'||errormsg);
    IF errormsg <> 'SUCCESS' THEN
    raise_application_error(-20000, 'Execution error: '||errormsg);
    END IF;
    END;
    Nothing happend from this code just getting only following result with error.
    -----------------result-----------------------------
    host_command:ORA$PIPE$002D19820001
    pack message:touch /home/oracle/testting.txt
    stat:0
    stat2:0
    errormsg:touch /home/oracle/testting.txt
    DECLARE
    ERROR at line 1:
    ORA-20000: Execution error: touch /home/oracle/testting.txt
    ORA-06512: at line 33
    Can any one tell me what i doing wrong in this code.
    I m working on Oracle 11g and AIX unix server.

    This is the forum for the SQL Developer product, not for general PL/SQL questions. There is a link to the SQL and PL/SQL forum in the announcement at the top of this forum.

  • Problem with plsql block

    Hello All,
    I have a sql query which i am trying to put it in plsql block.It throws me an error saying i cannot have group function as my two select strings gives me more than one row. How to tackle this??
    declare
    uuid varchar;
    stat_date date;
    begin
    select 'I'||Lower(docfamily_uuid) into uuid, max(status_date) into stat_date from document_status where status_code=303 or status_code=305 group by docfamily_uuid;
    end;
    Thanks

    In addition to being mal-formed it is likely your problem stems from the fact that your query is returning more than one row. Now perhaps you are expecting only one row and your GROUP BY might be getting in the way. Try changing your GROUP BY to include the LOWER function that is in your SELECT statement. But realize that this in itself will not guarentee one row returning from the SELECT statement.
    WITH document_status AS
    SELECT 'xxx' docfamily_uuid, sysdate status_date, 303 status_code from dual
    UNION ALL
    SELECT 'XXX' docfamily_uuid, sysdate status_date, 303 status_code from dual
    SELECT 'I'||Lower(docfamily_uuid), max(status_date)
    FROM   document_status
    WHERE  status_code=303 or status_code=305
    GROUP BY docfamily_uuid;
    Ixxx     05-FEB-09
    Ixxx     05-FEB-09
    WITH document_status AS
    SELECT 'xxx' docfamily_uuid, sysdate status_date, 303 status_code from dual
    UNION ALL
    SELECT 'XXX' docfamily_uuid, sysdate status_date, 303 status_code from dual
    SELECT 'I'||Lower(docfamily_uuid), max(status_date)
    FROM   document_status
    WHERE  status_code=303 or status_code=305
    GROUP BY LOWER(docfamily_uuid);
    Ixxx     05-FEB-09Greg

  • Plsql block as required

    hi ,
    a plsql block and the result will be like
    --> Title01 has taken by zero students.
    --> Title02 has taken by ten students.
    --> Title03 has taken by five students.
    i got a question in this manner i am a beginner kinda help me out .
    regards,
    beginner..

    8934589 wrote:
    yes, but the question was put like this and i literally unable to understand....Surely you have a table structure you are working with?
    Surely you could ask your instructor for more details?
    Surely you could ask your fellow students to help, given that they know the context which you have withheld from us?
    Go back and re-read your original post and ask yourself how a total stranger would make anything of it at all.
    We don't know what a "Title01" (or 2 or 3) is.
    Wed don't know what a student is.
    We don't know that it means for a "Title01" to be taken (or not) by a "student"
    But whatever it is, I'd be willing to bet that, given no further requirements, that a simple SQL query would do it, and no PL/SQL would be needed.
    Edited by: EdStevens on May 29, 2013 10:08 AM

  • How to make white block cursor everywhere?

    Hello!
    Is it possible to enable solid non-blinking white block cursor everywhere in [Arch]linux console (I mean not only shell-prompt) like it is in X-terminals, Mac OS X and default FreeBSD?
    If it is possible, then how can I do this?
    Thanks!

    Lord Bo wrote:Read something about .Xresources in the Arch Wiki. I think the entry you are searching for is *cursorColor:white.
    No, you didn't understand me. I really LIKE default static white block cursor in X-terminals, but I want exactly same cursor behaviour in Linux text-mode console (everywhere starting from kernel loading console and VT login boxes to any shell prompts and text-mode applications).
    I don't need separate configuration for this type of cursor in every part of the text-mode system as it is much pain, but instead ask for one unified way to enable it everywhere in just one action.
    thisoldman. yes I know that, but unfortunately this is ONLY for the shell prompt that supports it, but not for the whole text-mode system.
    Thanks.
    Last edited by eruditorum (2012-12-11 17:20:26)

  • Call unix script within plsql block

    Hi all,
    can i call a unix script within a plsql block for example
    my unix script name is - Diff_dataload_process.sh
    declare
    begin
    select * from ......;
    Diff_dataload_process.sh
    exception
    end;
    please help me.
    Thanks,
    Krupa

    Hi, I think you need something like this:
         DBMS_SCHEDULER.create_program
         (program_name => 'sch_program',
    program_type => 'EXECUTABLE',
    program_action => '/home/nobody/input/test_job.sh',
    number_of_arguments => 0,
    enabled => TRUE,
    comments => 'Test Program'
    end;
    and there's another ways to do it:
    [calling shell|http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm]

Maybe you are looking for

  • Share news----Oracle JHeadstart 10g release 9.0.4 is now production.

    Share the news and product information to all Jdeveloper member if you expect to achieve good coding productivity in J2ee environment, Oracle announces that Oracle JHeadstart 10g release 9.0.4 is now production. Main new features are: - generation su

  • ONE song refuses to change using Get Info

    This one's a bit weird... I have one song that refuses to change even though I've modified the Artist name, tried to remove the artwork and change the genre. At first it shows the change (and even appears to have moved the file from one artist-name f

  • Explain plan window, "operation" column is very narrow in 2.1 EA2

    When widened, it becomes narrow in next attempt to get an explain plan.

  • Clarification on Module consultants

    Dear Experts, I am new to sap hr, i would like to know , when there is a issue, issues is being split to ABAP or Basis consultants. can you please let me know , like how to identify, whether its an ABAPer role or Basis consultants role. other than fu

  • K7N2-DeltaL USB Problem

    I'm having USB troubles with my 1 year old MSI K7N2-DeltaL board (Nforce). I just recently reinstalled Windows XP and SP2 (both from CDs). I was able to get my Sony digital camera connected and recognized last night, but when I tried to install a Pen