Problem in PlSql Block

Hello All,
when i am executing the below block then i m getttin the
err ERR :ORA-01847: day of month must be between 1 and last day of month
I am struggling to get where is the exact err ..
Any one can suggest me any solution
Emp Table
EmpId Varchar2(20);
Join_date Varchar2(8);
DECLARE
CURSOR C1 IS
SELECT EMP_ID,Join_date FROM Emp;
vJoin_dt DATE;
vEmp Varchar2(20);
vDate Varchar2(8);
BEGIN
OPEN C1;
LOOP
FETCH C1 INTO vEmp,vDate;
EXIT WHEN C1%NOTFOUND;
vJoin_dt:=to_date(NVL(vDate,SYSDATE),'ddmmyyyy');
END LOOP;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERR :'||SUBSTR(SQLERRM,0,255));
DBMS_OUTPUT.PUT_LINE('vEmp :'||Emp||' '||'vDate :'||vDate);
END;
ERR :ORA-01847: day of month must be between 1 and last day of month
Thnks in advance

I din't understand your requirement?
Anyway! Is it you are looking for?
SQL> SELECT * FROM EMPX;
EMPID                JOIN_DAT
A100                 05062006
A101                 06062006
SQL> DECLARE
  2  CURSOR C1 IS
  3  SELECT EMPID,Join_date FROM Empx;
  4  vJoin_dt DATE;
  5  vEmp Varchar2(20);
  6  vDate Varchar2(8);
  7  BEGIN
  8  OPEN C1;
  9  LOOP
10  FETCH C1 INTO vEmp,vDate;
11  EXIT WHEN C1%NOTFOUND;
12  vJoin_dt:=to_date(NVL(vDate,SYSDATE),'ddmmyyyy');
13  DBMS_OUTPUT.PUT_LINE(VJOIN_DT);
14  END LOOP;
15  EXCEPTION
16  WHEN OTHERS THEN
17  DBMS_OUTPUT.PUT_LINE('ERR :'||SUBSTR(SQLERRM,0,255));
18  DBMS_OUTPUT.PUT_LINE('vEmp :'||VEMP||' '||'vDate :'||vDate);
19  END;
20  /
05-JUN-06
06-JUN-06
PL/SQL procedure successfully completed.
Please post your table's data, i guess it has two different date formats in join_Date"Message was edited by:
Jameel

Similar Messages

  • 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

  • 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

  • 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

  • Problem for releasing  blocked sales order on Creditlimit

    Hi Gurus,
            I a   hve a problem for releasing blocked sales orders
             what i have done: 1)i have blocked sales order based on exceeded creditlimit
             (i have change SDType in 'OVAK' is 'C')
                      2)now i have to release for furthur processing so i have done following steps
                      3)Goto VKM3/VKM1 T.Code and then release what order that is blocked.
                      4) order will appear in the list.
                      5)Select that one.
                      6)Click on the green flag that appears on the left hand side.
                      7)Click on save.
                      8)click on back it will ask for "Leave list".
                      9)Click on yes.
                      10)It said that Sales orer has been released
    Still what my problem is:
    Problem: 1)So i'm trying to create deliver for Sales order but it shows an error
             2)"Sales order is blocked for delivery: Credit limits" Even it was released    
    Plz kindly help  me what i do....
    Thanks In Advance
    sivakumar

    sorry   i was  unfotunately put this thread here  over in SD

  • 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

  • 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

  • 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.

  • 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 :-)

  • 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>

  • 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 populating a block

    Hello,
    i have a problem populating a block.. so here: [http://img7.imageshack.us/my.php?image=pbb.jpg] the block which contains 3 7 10 88, should contain a record with 4 6 7 10 too, but this diesn't happen. it's about a master detail block. in the first block i have 5 *4* 11 4 and 10 *3* 11 2. the second block contains only record with id=3. (the corresponding id is Id Profilanscolar from the second block). i have already a post-query trigger like this:
    declare cursor crPAS1 is
         select id_profil from profil_anscolar where id=:clasa_profil.id_profilanscolar;
    begin
         open crPAS1;
         fetch crPAS1 into :profil_anscolar.id_profil;
         close crPAS1;
    end;so that;s the problem, the right block doesn't contain all the data corresponding to all Id Profilanscolar
    Please help me
    Thanks and sorry for mistake, i pressed Enter..
    Edited by: Roger22 on 21.04.2009 04:26

    Yes, now it's ok, sorry, my mistake
    so it's about a child and 2 master blocks of this child. when i select a record from the first master, i wanna populate the child, and also populate the second master (regarding to specific foreign key in child). how can i do this? Please help me if you can
    Edited by: Roger22 on 21.04.2009 05:38

  • 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

Maybe you are looking for

  • How do I add paragraph indentation to a style in iBooks Author?

    I have a book with a lot of quoted verse in it, which needs to be indented.  In order to make the verse distinctive to the eye, it's both slightly tighter set than the rest of the text, and left-indented. I can set up the tighter settings and save th

  • Hi can anyone tell me if the macbook A1278 (5,1) is a pro??

    Hi can anyone tell me if the macbook A1278 (5,1) is a pro?

  • CCMS monitoring for Queues(SMQ1/SMQ2)

    Hi, How do we monitor Queues(SMQ1/SMQ2) in CCMS. My requirement is to monitor Queues(SMQ1/SMQ2) in CCMS based on the Queue name. I want to create different nodes in CCMS and I want queue name falling under certain criteria should come and sit in the

  • VOB file won't play with MPEG2 codec

    Okay, so I have a few DVDs I want to put into iPod format, and I followed the directions here: http://discussions.apple.com/thread.jspa?messageID=1081409&#1081409 The first DVD I tried worked perfectly, it plays on my iPod fine. Now the second DVD I

  • Have NodeManager start managed servers on machine reboot

    Is there any way to have the Node Manager start all the managed servers belonging to a domain when a server reboots? I know I could create a separate Windows service for each of the managed servers I want running when the server comes on-line, or I c