User Profile

Collapse

Profile Sidebar

Collapse
subashsavji
subashsavji
Last Activity: Jun 26 '08, 10:14 AM
Joined: Jan 28 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • may this be useful


    DECLARE
    A NUMBER;
    CURSOR CUR1 IS
    SELECT * FROM EMP WHERE DEPTNO=&D AND ENAME='&N'
    FOR UPDATE OF SAL NOWAIT;
    BEGIN
    FOR I IN CUR1 LOOP
    IF I.SAL > 3000 THEN
    UPDATE EMP
    SET SAL= I.SAL*1.2
    WHERE CURRENT OF CUR1;
    END IF;
    A := I.SAL;
    DBMS_OUTPUT.PUT _LINE(A);
    END LOOP;
    ...
    See more | Go to post

    Leave a comment:


  • subashsavji
    replied to Oracle Apps
    AOL is technical module.

    But you choose Finance
    See more | Go to post

    Leave a comment:


  • copy and paste TNSNAME.ORA file where you installed d2k.
    See more | Go to post

    Leave a comment:


  • may be this is helpful .. how to use decode in plsql by using sql only

    cursor c1 is
    SELECT LORRY_NO, TCS_NO,tcs_date ,branch_branch_ code
    FROM CT_TCS where ac_year_code=:a c_year_code
    tcs_date between :vtcs1 and :vtcs2
    and branch_branch_c ode=:vbran
    and lorry_no=decode (:lry,'ALL',lor ry_no,:lry)
    ORDER BY LORRY_NO,TCS_NO
    begin
    open c1
    fetch c1..........
    See more | Go to post

    Leave a comment:


  • This may helpful to you
    [code=oracle]

    UPDATE employees e
    SET department_name =
    (SELECT department_name
    FROM departments d
    WHERE e.department_id = d.department_id );
    //
    UPDATE employees
    SET salary = (SELECT employees.salar y + rewards.pay_rai se
    FROM rewards
    WHERE employee_id =
    employees.emplo yee_id
    AND payraise_date =
    (SELECT MAX(payraise_da te)...
    See more | Go to post

    Leave a comment:


  • subashsavji
    replied to Oracle Report In Word ?
    this may be helpful to you

    CREATE OR REPLACE PROCEDURE sal_status
    (p_filedir IN VARCHAR2, p_filename IN VARCHAR2)
    IS
    v_filehandle UTL_FILE.FILE_T YPE;
    CURSOR emp_info IS
    SELECT ename, sal, deptno
    FROM emp
    ORDER BY deptno;
    v_newdeptno emp.deptno%TYPE ;
    v_olddeptno emp.deptno%TYPE := 0;
    BEGIN
    v_filehandle := UTL_FILE.FOPEN (p_filedir, p_filename,'w') ;...
    See more | Go to post

    Leave a comment:


  • subashsavji
    replied to Stored procedure input...
    I think, i am not sure

    when we use script means within inverted commas that means both compilation and execution happen at a time. so we can not pass value like this.
    try this
    [code=oracle]

    CREATE OR REPLACE PROCEDURE procc
    (p_item IN number,p_rows_d el OUT varchar2)
    IS
    cursor_name INTEGER;
    a varchar2(200);
    BEGIN
    a:='CREATE TABLE Temp_BlokID_Val ues...
    See more | Go to post
    Last edited by debasisdas; Mar 5 '08, 12:18 PM. Reason: added code=oracle tags

    Leave a comment:


  • subashsavji
    replied to Mutuation Trigger
    one of the best example to avoid mutation problem

    [code=oracle]

    Create table CUG

    drop table CUG cascade constraints;
    create table CUG (
    id_cug number(12) not null primary key,
    id_B number(12) not null,
    type number(1),
    foreign key (id_B) references CUG (id_cug)
    on delete cascade);

    --Next we create a temporary table to avoid...
    See more | Go to post
    Last edited by debasisdas; Mar 5 '08, 12:16 PM. Reason: added code=oracle tags

    Leave a comment:


  • [code=oracle]

    function CF_1Formula return date is
    begin
    if :hiredate is null then
    :cp_1:= :hiredate+30;
    return (:cp_1);
    else
    return(:hiredat e);
    end if;
    exception
    when others then
    srw.message(100 0,sqlerrm);
    end;
    //
    [/code]

    Note :- You will get result null because you want to add 30 into null date value so anything...
    See more | Go to post
    Last edited by amitpatel66; Mar 5 '08, 11:48 AM. Reason: code tags

    Leave a comment:


  • subashsavji
    replied to Creating trigger
    one of the good example to avoid mutation
    [code=oracle]

    Create table CUG

    drop table CUG cascade constraints;
    create table CUG (
    id_cug number(12) not null primary key,
    id_B number(12) not null,
    type number(1),
    foreign key (id_B) references CUG (id_cug)
    on delete cascade);

    Next we create a temporary table to avoid the "Mutating...
    See more | Go to post
    Last edited by debasisdas; Mar 4 '08, 09:53 AM. Reason: removed excess quote

    Leave a comment:


  • subashsavji
    replied to ORA-01843: not a valid month
    may be this helpful to

    better you declare that date item as varchar2 while displaying convert it using To_char
    function....
    See more | Go to post

    Leave a comment:


  • [code=oracle]

    select a.dly_ref_no,a. cns_no,a.cns_da te,a.cnee_code, a.branch_branch _code,a.ranban
    where
    a.ac_year_code= b.ac_year_code and
    a.branch_branch _code=b.branch_ branch_code and
    a.branch_branch _code=decode('c olumn_value','A LL',a.branch_br anch_code,'colu mn_value') and
    group by a.dly_ref_no,a. cns_no,a.cns_da te,a.cnee_code, a.branch_branch _code,a.ranban

    [/code]...
    See more | Go to post
    Last edited by amitpatel66; Mar 4 '08, 07:07 AM. Reason: code tags

    Leave a comment:


  • subashsavji
    replied to bulk collect and for all..........
    [code=oracle]

    create type obj as object(x number)
    /
    create table objtable of obj
    /

    declare
    type obj1 is table of obj;
    z obj1:=obj1(obj( 1),obj(2),obj(3 ),obj(4));
    type obj2 is varray(5) of integer;
    x obj2:=obj2(1,2, 3);
    begin
    forall i in z.first..z.last
    insert into objtable values(z(i));--Inserts the values in table of objects...
    See more | Go to post
    Last edited by amitpatel66; Mar 4 '08, 07:08 AM. Reason: code tags

    Leave a comment:


  • subashsavji
    replied to using clob
    [code=oracle]

    create table demo
    ( id int primary key,
    theClob clob
    )
    /

    create or replace directory my_files as 'C:\';
    /

    CREATE OR REPLACE procedure load_a_file( p_id in number,
    p_filename in varchar2 )
    as
    l_clob clob;
    l_bfile bfile;
    begin
    insert into demo values...
    See more | Go to post
    Last edited by amitpatel66; Mar 4 '08, 07:12 AM. Reason: code tags

    Leave a comment:


  • subashsavji
    replied to Stroing xls in oracle
    if you want to use LOB to load file then
    example of LOB is already posted in this forum. plz. find it out....
    See more | Go to post

    Leave a comment:


  • “The ORA-01033: ORACLE initialization or shutdown in progress” error happens when the database is not open. After you create the control file issue the command:

    “alter database open”

    That should stop the ORA-01033 error and make the database available for general use.
    //

    When trying to connect got the error

    ORA-01033: ORACLE initialization or shutdown in progress
    ...
    See more | Go to post

    Leave a comment:


  • subashsavji
    replied to ORA-02068: severe error from ORAMVS
    may be useful

    the error messages succeeding the ORA-02068 will
    indicate the type/nature of problem that lead to the severe error.

    In addition, you may want to check the alert log of the remote
    database and the udump directory.

    As an aside, you can also close any existing db links before using a
    db link. Not a real issue with Oracle to Oracle, but a problem when
    dealing with...
    See more | Go to post

    Leave a comment:


  • Thank you............ ............... .....
    See more | Go to post

    Leave a comment:


  • //

    this example might be helpful to you

    CREATE OR REPLACE PROCEDURE query_emp
    (p_id IN emp.empNO%TYPE,
    p_name OUT emp.Ename%TYPE,
    p_salary OUT emp.sal%TYPE,
    p_comm OUT emp.comm%TYPE)
    IS
    BEGIN
    SELECT Ename, sal, comm
    INTO p_name, p_salary, p_comm
    FROM emp
    WHERE empNO = p_id;
    DBMS_OUTPUT.PUT _LINE(P_ID);...
    See more | Go to post

    Leave a comment:


  • subashsavji
    replied to Trigger with insert
    [code=oracle] CREATE OR REPLACE TRIGGER NEW before UPDATE ON emp1 FOR each ROW
    DECLARE
    PRAGMA autonomous_tran saction;
    BEGIN
    DELETE FROM emp11 WHERE ename = :old.ename ;
    INSERT INTO emp11 SELECT * FROM emp1 WHERE ename=:old.enam e ;
    COMMIT;
    END;


    update emp1
    set ename='parag'
    where ename='taj';
    [/code]
    its working and showing.
    See more | Go to post
    Last edited by debasisdas; Feb 21 '08, 06:03 AM. Reason: added code=oracle tags

    Leave a comment:

No activity results to display
Show More
Working...