Error creating a procedure

I'm trying to create a procedure where I pass in a cursor. I'm on Oracle 9i and SQL is not my main job, though I do a good bit of complex querying and reading SQL. The code below is simplified, but I am still receiving an error "PLS-00201: identifier 'TYPE' must be declared. I've tried several things and followed online examples of procedures, but I have not been able to make this work.
{code}
CREATE OR REPLACE procedure PERM.no_response_7days_inc
(sponsorship_cursor IN TYPE,
a_result OUT Number) IS
DeadLine_Days Number(3);
Date_Diff Number(3);
a_result Number (3);
begin
--sponsorship_cursor IS a_recordset;
a_result := 0;
-- do work with cursor information;
a_result := 1;
end;
{code}
thank you very much for your assistance.

Hi,
danielk wrote:
... When I do the code above, I am still receiving an error, though a different one, "PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted".It sounds like there's a mistake in the calling procedure, where it's doing something like
SELECT  dummy
,       dummy
FROM    dual;which is legal in some contexts, but not in others.
Whenever you have a problem, post a complete test script that people can run to re-create the problem and test their ideas.

Similar Messages

  • Error creating stored procedure using Apex

    Hello,
    I have worked with Access, SQL Server, and Firebird before, but am new to Oracle. I am trying to create a stored procedure to return the count of multiple hash values in a table. I want to know the number of rows that contain hash values that are duplicates somewhere else in the table. So if my table has 10 rows containing hash values: a, b, a, b, c, d, e, a, b, a, my return value should be 7. Here is my create procedure statement:
    CREATE OR REPLACE PROCEDURE CommonHashValuesCount (dupThreshold in number, totalCount out number)
    IS
    BEGIN
    totalCount := 0;
    FOR h IN
    (SELECT DISTINCT xf.MD5_HASH, COUNT(xf.MD5_HASH) as "HashCount"
    FROM XFILE xf
    GROUP BY xf.MD5_HASH)
    LOOP
    IF h.HashCount > dupThreshold THEN
    totalCount := totalCount + h.HashCount;
    END IF;
    END LOOP;
    END;
    I get the following error when I try and run it:
    ERROR at line 12: PL/SQL: Statement ignored
    1. CREATE OR REPLACE PROCEDURE CommonHashValuesCount (dupThreshold in number, totalCount out number)
    2. IS
    3. BEGIN
    Can anyone tell me what is wrong with my create statement? Or if anyone knows how to accomplish what I want in a single sql statement, I'd love to hear it!
    TIA,
    Theresa

    Why not do it in a SQL statement so you can test it in the APEX SQL command window?
    SELECT Sum(HashCount)
      FROM (SELECT DISTINCT xf.MD5_HASH
                 , COUNT(xf.MD5_HASH) HashCount
              FROM XFILE xf
             GROUP BY xf.MD5_HASH
    WHERE HashCount > <testvalue>
    not tested
    and then simply put that into your stored procedure/package:
    SELECT Sum(HashCount)
      INTO totalCount
      FROM (SELECT DISTINCT xf.MD5_HASH
                 , COUNT(xf.MD5_HASH) HashCount
              FROM XFILE xf
             GROUP BY xf.MD5_HASH
    WHERE HashCount > dubThreshold
    also not tested
    C.

  • Error creating Stored procedure

    Hello All,
    I am logged in as “system” user and trying to run the below script.
    create or replace procedure verify_job_not_running (my_job_name IN varchar2)
    AS
    my_job_count NUMBER;
    BEGIN
    select count(*) into my_job_count from dba_datapump_jobs where job_name = my_job_name;
    IF my_job_count > 0 THEN
    raise_application_error(-20010, 'data pump job already running');
    END IF;
    END verify_job_not_running;
    The above procedure is created with compilation errors. Please see the error message below.
    SQL> show errors;
    Errors for PROCEDURE VERIFY_JOB_NOT_RUNNING:
    LINE/COL ERROR
    5/3 PL/SQL: SQL Statement ignored
    5/42 PL/SQL: ORA-00942: table or view does not exist
    FYI - I am able to query “dba_datapump_jobs” table as “system”.
    Any help will be appreciated.
    Thank you,

    Hi,
    user504183 wrote:
    Hello All,
    I am logged in as “system” user and trying to run the below script.Very, very bad idea.
    Never create objects in Oracle-supplied schemas like SYSTEM, SYS, even HR.
    Create your own schema (you can call it my_system) for your own SYSTEM-like objects.
    create or replace procedure verify_job_not_running (my_job_name IN varchar2)
    AS
    my_job_count NUMBER;
    BEGIN
    select count(*) into my_job_count from dba_datapump_jobs where job_name = my_job_name;
    IF my_job_count > 0 THEN
    raise_application_error(-20010, 'data pump job already running');
    END IF;
    END verify_job_not_running;
    The above procedure is created with compilation errors. Please see the error message below.
    SQL> show errors;
    Errors for PROCEDURE VERIFY_JOB_NOT_RUNNING:
    LINE/COL ERROR
    5/3 PL/SQL: SQL Statement ignored
    5/42 PL/SQL: ORA-00942: table or view does not exist
    FYI - I am able to query “dba_datapump_jobs” table as “system”.Roles don't count in stored procedures. SYSTEM probably has privileges on dba_datapubp_jobs only because it has the role SELECT_CATALOG_ROLE.
    Log in as SYS and give the necessary privilges directly to the procedure owner (whcih, once again, should NOT be SYSTEM);
    GRANT SELECT ON dba_datapump_jobs TO my_system;

  • Error creating simple procedure

    I don't get why the below sp complains of this:
    Errors for PROCEDURE LOADTABLE:
    LINE/COL ERROR
    3/1 PLS-00103: Encountered the symbol "DECLARE" when expecting one of
    the following:
    begin function pragma procedure subtype type <an identifier>
    <a double-quoted delimited-identifier> current cursor delete
    exists prior external language
    The symbol "begin" was substituted for "DECLARE" to continue.
    17/4 PLS-00103: Encountered the symbol "end-of-file" when expecting
    one of the following:
    ( begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    LINE/COL ERROR
    <an identifier> <a double-quoted delimited-identifier>
    <a bind variable> << continue close current delete fetch lock
    insert open rollback savepoint set sql execute commit forall
    merge pipe purge
    CREATE OR REPLACE PROCEDURE loadtable AS
    DECLARE
    i pls_integer ;
    sql_stmt VARCHAR2(4000);
    all_names VARCHAR2(4000);
    all_names2 VARCHAR2(4000);
    TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;
    coltab_table typ_coltab ;
    coltab_table2 typ_coltab ;
    coltab_rec dba_tab_columns%ROWTYPE ;
    CURSOR cur is SELECT *
    FROM dba_tab_columns where owner='MYSCHEMA' and table_name='CONFIG' ;
    BEGIN
    NULL;
    END;
    Thanks,
    floyd

    {color:blue}Spot the the Difference, and you will find your answer{color}
    SQL> ed
    Wrote file buffer.sql
      1  --CREATE OR REPLACE PROCEDURE loadtable AS
      2  DECLARE
      3  i pls_integer ;
      4  sql_stmt VARCHAR2(4000);
      5  all_names VARCHAR2(4000);
      6  all_names2 VARCHAR2(4000);
      7  TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;
      8  coltab_table typ_coltab ;
      9  coltab_table2 typ_coltab ;
    10  coltab_rec dba_tab_columns%ROWTYPE ;
    11  CURSOR cur is SELECT *
    12  FROM dba_tab_columns where owner='MYSCHEMA' and table_name='CONFIG' ;
    13  BEGIN
    14  NULL;
    15* END;
    16  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.39
    SQL> ed
    Wrote file buffer.sql
      1  CREATE OR REPLACE PROCEDURE loadtable AS
      2  --DECLARE
      3  i pls_integer ;
      4  sql_stmt VARCHAR2(4000);
      5  all_names VARCHAR2(4000);
      6  all_names2 VARCHAR2(4000);
      7  TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;
      8  coltab_table typ_coltab ;
      9  coltab_table2 typ_coltab ;
    10  coltab_rec dba_tab_columns%ROWTYPE ;
    11  CURSOR cur is SELECT *
    12  FROM dba_tab_columns where owner='MYSCHEMA' and table_name='CONFIG' ;
    13  BEGIN
    14  NULL;
    15* END;
    SQL> /
    Warning: Procedure created with compilation errors.SS

  • Error Creating VM on 2011 iMac - The Hyper-V Virtual Machine Management service encountered an unexpected error: The remote procedure call failed. (0x800706BE).

    I am running Hyper-V in Windows 8.1 on a late 2011 27 inch iMac. Whenever I try to create a virtual machine I get the error below and Windows warns that it will restart in 1 minute. I tried a clean install of Windows, but my PC still crashes ever
    time I try to create a VM. I was able to successfully use Hyper-V in prior versions of Windows on this same PC. Any clue as to what is going on? A driver? Windows 8.1? Mac Hardware related?
    I see the following two entries in event viewer but have no other clue as to what is happening:
    Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
    Source:        Microsoft-Windows-Hyper-V-VMMS
    Date:          1/10/2014 10:48:46 AM
    Event ID:      16000
    Task Category: None
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:      Charles-PC.CHARLESPOOL.local
    Description:
    The Hyper-V Virtual Machine Management service encountered an unexpected error: The remote procedure call failed. (0x800706BE).
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Hyper-V-VMMS" Guid="{6066F867-7CA1-4418-85FD-36E3F9C0600C}" />
        <EventID>16000</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2014-01-10T15:48:46.770451300Z" />
        <EventRecordID>58</EventRecordID>
        <Correlation />
        <Execution ProcessID="2488" ThreadID="8704" />
        <Channel>Microsoft-Windows-Hyper-V-VMMS-Admin</Channel>
        <Computer>Charles-PC.CHARLESPOOL.local</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <UserData>
        <VmlEventLog xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
          <ErrorMessage>%%2147944126</ErrorMessage>
          <ErrorCode>0x800706BE</ErrorCode>
        </VmlEventLog>
      </UserData>
    </Event>
    Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
    Source:        Microsoft-Windows-Hyper-V-VMMS
    Date:          1/10/2014 10:48:46 AM
    Event ID:      16010
    Task Category: None
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:      Charles-PC.CHARLESPOOL.local
    Description:
    The operation failed.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Hyper-V-VMMS" Guid="{6066f867-7ca1-4418-85fd-36e3f9c0600c}" />
        <EventID>16010</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2014-01-10T15:48:46.773497100Z" />
        <EventRecordID>59</EventRecordID>
        <Correlation />
        <Execution ProcessID="2488" ThreadID="8704" />
        <Channel>Microsoft-Windows-Hyper-V-VMMS-Admin</Channel>
        <Computer>Charles-PC.CHARLESPOOL.local</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <ProcessingErrorData>
        <ErrorCode>15005</ErrorCode>
        <DataItemName>Parameter0</DataItemName>
        <EventPayload>
        </EventPayload>
      </ProcessingErrorData>
    </Event>

    Hi CharlesPool,
    I am assuming that the win8.1 is in-place updated from win8 .
    Maybe you need to check the state of hypervisorlaunchtype .
    If it is off , please run command " bcdedit /set hypervisorlaunchtype auto "
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Error While Creating PAS Procedure

    Dear Friends
    I am getting following error while creating PAS procedure. I login using Admin
    Access to Database Admin.EWK Denied by the Operating System
    What might be the reason for this error?
    Rgds
    SriG

    Hi SriG,
    When you try to open a PAS procedure, it creates a temporary editor work file on the client system. This file is created in the directory referenced by the DBHOME variable in the client-side lsserver.ini file. If the user doesn't have permission to write to this directory then the application will be
    unable to open any database sets. So make sure your O.S. user has full access to DBHOME.
    Regards,
    Isabel

  • Encountered an error in repository runtime extension;Create LLang procedure failed

    Hi Guys 
    I am implementing Apriori algorithm through graphical way.  My model is validated but while activating this i am getting the error' Encountered an error in repository runtime extension;Create LLang procedure failed'  Here i am attaching the model which i have created.
    Regards
    Karuna

    Hi Folks,
    I resolved this issue by setting schema as _SYS_AFL...  Thanks for your help.
    Regards
    Karuna

  • Error in stored procedure while using dbms_datapump for transportable

    Hi,
    I'm facing following issue:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    ====================================================================================
    I'm trying to do transportable tablespace through stored procedure with help of DBMS_DATAPUMP, Following is the code :
    ==================================================================================
    create or replace
    procedure sp_tts_export(v_tbs_name varchar2) as
    idx NUMBER; -- Loop index
    JobHandle NUMBER; -- Data Pump job handle
    PctComplete NUMBER; -- Percentage of job complete
    JobState VARCHAR2(30); -- To keep track of job state
    LogEntry ku$_LogEntry; -- For WIP and error messages
    JobStatus ku$_JobStatus; -- The job status from get_status
    Status ku$_Status; -- The status object returned by get_status
         dts           varchar2(140):=to_char(sysdate,'YYYYMMDDHH24MISS');
         exp_dump_file varchar2(500):=v_tbs_name||'_tts_export_'||dts||'.dmp';
         exp_log_file varchar2(500):=v_tbs_name||'_tts_export_'||dts||'.log';
         exp_job_name varchar2(500):=v_tbs_name||'_tts_export_'||dts;
         dp_dir varchar2(500):='DATA_PUMP_DIR';
         log_file UTL_FILE.FILE_TYPE;
         log_filename varchar2(500):=exp_job_name||'_main'||'.log';
         err_log_file UTL_FILE.FILE_TYPE;
         v_db_name varchar2(1000);
         v_username varchar2(30);
         t_dir_name VARCHAR2(4000);
    t_file_name VARCHAR2(4000);
    t_sep_pos NUMBER;
         t_dir varchar2(30):='temp_0123456789';
         v_sqlerrm varchar2(4000);
    stmt varchar2(4000);
         FUNCTION get_file(filename VARCHAR2, dir VARCHAR2 := 'TEMP')
    RETURN VARCHAR2 IS
    contents VARCHAR2(32767);
    file BFILE := BFILENAME(dir, filename);
    BEGIN
              DBMS_LOB.FILEOPEN(file, DBMS_LOB.FILE_READONLY);
              contents := UTL_RAW.CAST_TO_VARCHAR2(
    DBMS_LOB.SUBSTR(file));
              DBMS_LOB.CLOSE(file);
              RETURN contents;
         END;
    begin
    --execute immediate ('drop tablespace test including contents and datafiles');
    --execute immediate ('create tablespace test datafile ''/home/smishr02/test.dbf'' size 10m');
    --execute immediate ('create table prestg.test_table (a number) tablespace test');
    --execute immediate ('insert into prestg.test_table values (1)');
    --commit;
    --execute immediate ('alter tablespace test read only');
    --dbms_output.put_line('11111111111111111111');
    dbms_output.put_line(log_filename||'>>>>>>>>>>>>>>>>>>>>>>>>>>>'|| dp_dir);
    log_file:=UTL_FILE.FOPEN (dp_dir, log_filename, 'w');
    UTL_FILE.PUT_LINE(log_file,'#####################################################################');
    UTL_FILE.PUT_LINE(log_file,'REPORT: GENERATED ON ' || SYSDATE);
    UTL_FILE.PUT_LINE(log_file,'#####################################################################');
    select global_name,user into v_db_name,v_username from global_name;
    UTL_FILE.PUT_LINE(log_file,'Database:'||v_db_name);
    UTL_FILE.PUT_LINE(log_file,'user running the job:'||v_username);
    UTL_FILE.PUT_LINE(log_file,'for tablespace:'||v_tbs_name);
    UTL_FILE.NEW_LINE (log_file);
    stmt:='ALTER TABLESPACE '||v_tbs_name || ' read only';
    dbms_output.put_line('11111111111111111111'||stmt);
    execute immediate (stmt);
    UTL_FILE.PUT_LINE(log_file,' '||v_tbs_name || ' altered to read only mode.');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,'#####################################################################');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Initiating the Datapump engine for TTS export..............');
    UTL_FILE.NEW_LINE (log_file);
    dbms_output.put_line('11111111111111111111');
    JobHandle :=
    DBMS_DATAPUMP.OPEN(
    operation => 'EXPORT'
    *,job_mode => 'TRANSPORTABLE'*
    *,remote_link => NULL*
    *,job_name => NULL*
    --,job_name => exp_job_name
    --        ,version => 'LATEST'
    UTL_FILE.PUT_LINE(log_file,'Done');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Allocating dumpfile................');
    DBMS_DATAPUMP.ADD_FILE(
    handle => JobHandle
    ,filename => exp_dump_file
    ,directory => dp_dir
    ,filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE
    -- ,filesize => '100M'
    UTL_FILE.PUT_LINE(log_file,'Done');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Allocating logfile................');
    DBMS_DATAPUMP.ADD_FILE(
    handle => JobHandle
    ,filename => exp_log_file
    ,directory => dp_dir
    ,filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE
    UTL_FILE.PUT_LINE(log_file,'Done');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Setting attributes................');
    DBMS_DATAPUMP.set_parameter(handle => JobHandle,
    name=>'TTS_FULL_CHECK',
    value=>1);
    DBMS_DATAPUMP.METADATA_FILTER(
    handle => JobHandle
    ,NAME => 'TABLESPACE_EXPR'
    ,VALUE => 'IN ('''||v_tbs_name||''')'
    -- ,object_type => 'TABLE'
    UTL_FILE.PUT_LINE(log_file,'Done');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Now starting datapump job................');
    DBMS_DATAPUMP.START_JOB(JobHandle);
    UTL_FILE.PUT_LINE(log_file,'Done');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Monitoring the job................');
    --------------Monitor the job
    PctComplete := 0;
    JobState := 'UNDEFINED';
    WHILE(JobState != 'COMPLETED') and (JobState != 'STOPPED')
    LOOP
    DBMS_DATAPUMP.GET_STATUS(
    handle => JobHandle
    ,mask => 15 -- DBMS_DATAPUMP.ku$_status_job_error + DBMS_DATAPUMP.ku$_status_job_status + DBMS_DATAPUMP.ku$_status_wip
    ,timeout => NULL
    ,job_state => JobState
    ,status => Status
    JobStatus := Status.job_status;
    -- Whenever the PctComplete value has changed, display it
    IF JobStatus.percent_done != PctComplete THEN
    DBMS_OUTPUT.PUT_LINE('*** Job percent done = ' || TO_CHAR(JobStatus.percent_done));
    PctComplete := JobStatus.percent_done;
    END IF;
    -- Whenever a work-in progress message or error message arises, display it
    IF (BITAND(Status.mask,DBMS_DATAPUMP.ku$_status_wip) != 0) THEN
    LogEntry := Status.wip;
    ELSE
    IF (BITAND(Status.mask,DBMS_DATAPUMP.ku$_status_job_error) != 0) THEN
    LogEntry := Status.error;
    ELSE
    LogEntry := NULL;
    END IF;
    END IF;
    IF LogEntry IS NOT NULL THEN
    idx := LogEntry.FIRST;
    WHILE idx IS NOT NULL
    LOOP
    DBMS_OUTPUT.PUT_LINE(LogEntry(idx).LogText);
    idx := LogEntry.NEXT(idx);
    END LOOP;
    END IF;
    END LOOP;
         --copy the datafiles to data dump dir     
         UTL_FILE.PUT_LINE(log_file,'Done');
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Copying datafiles to dump directory................');
    -- grant select on dba_directories to prestg;
    declare
    cnt number;
    begin
    select count(*) into cnt from dba_directories
    where directory_name=upper(t_dir);
    if cnt=1 then
    execute immediate('DROP DIRECTORY '||t_dir);
    end if;
    end;
         FOR rec in (select file_name from sys.dba_data_files where tablespace_name=v_tbs_name)
         LOOP
         t_sep_pos:=instr(rec.file_name,'/',-1);
    t_dir_name:=substr(rec.file_name,1,t_sep_pos-1);
    t_file_name:=substr(rec.file_name,t_sep_pos+1,length(rec.file_name));
    dbms_output.put_line(t_dir_name|| ' ' || t_dir);
    dbms_output.put_line(t_file_name);
         execute immediate('CREATE DIRECTORY '||t_dir||' AS '''||t_dir_name||'''');
         UTL_FILE.PUT_LINE(log_file,' Copying '||rec.file_name||'................');
         utl_file.fcopy(t_dir, t_file_name, dp_dir, t_file_name);
         UTL_FILE.PUT(log_file,'Done');
         execute immediate('DROP DIRECTORY '||t_dir);
         END LOOP;
    UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' Altering tablespace to read write................');
         execute immediate ('ALTER TABLESPACE '||v_tbs_name || ' read write');
    UTL_FILE.PUT(log_file,' Done');
         err_log_file:=utl_file.fopen(dp_dir, exp_log_file, 'r');
         UTL_FILE.NEW_LINE (log_file);
    UTL_FILE.PUT_LINE(log_file,' content of export logfile................');
         loop
    begin
         utl_file.get_line(err_log_file,v_sqlerrm);
         if v_sqlerrm is null then
         exit;
         end if;
         UTL_FILE.PUT_LINE(log_file,v_sqlerrm);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
         end loop;
              utl_file.fclose(err_log_file);
    utl_file.fclose(log_file);
    END;
    I'm getting following error when DBMS_DATAPUMP.OPEN is called in procedure:
    SQL> exec sp_tts_export('TEST');
    BEGIN sp_tts_export('TEST'); END;
    ERROR at line 1:
    ORA-31626: job does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 938
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 4566
    ORA-06512: at "PRESTG.SP_TTS_EXPORT", line 78
    ORA-06512: at line 1
    ==============================================================================================
    This procedure is part of user ABC. I'm getting the above when I'm running this under ABC schema. However I have tested the same procedure under sys schema. When I'm creating same procedure in SYS schema it is running fine. I am clueless on this. Pls help
    Thanks
    Shailesh
    Edited by: shaileshM on Jul 28, 2010 11:15 AM

    Privileges acquired via ROLE do NOT apply within named PL/SQL procedures.
    Explicit GRANT is required to resolve this issue.

  • Error while compiling procedure

    Hai All
    I have created a procedure its get created and while executing its get an error
    My Requirement
    I have a table called attendance and the fields are
    Empcode var,name var intime date,outtime date ,WTime number, ETime number ,L_in number, L_out number
    So Now i need to calculate How many minutes the employees come late for working hours The shifts starts at 0815 and the grace mins Is 5 min SO after 0820 i need to calculate L_In and The shifts closed At 1645 and Now i need to calculate How many min Before He is going
    MY Procedure
    create or replace PROCEDURE L_TIME(in_time dail_att.intime%type
    ,out_time dail_att.outtime%type,
    id_in in dail_att.idein%type,
    id_out out dail_att.ideout%type,
    F_date dail_att.attend_Date%type)
    IS
    BEGIN
    If to_char(in_time,'hh24mi') > 0820 and to_char(out_time,'hh24mi') < 1650 then
         if id_in is null then
              update dail_att set idein= (to_char(intime,'hh24mi')-0820) where attend_date= f_date;
         else
                   update dail_att set ideout= (to_char(outtime,'hh24mi')-1650)where attend_date=f_date;
         end if;
    While iam executin like this
    execute L_TIME ('01-jan-2010 0820','01-jan-2010 1520','01-jan-2010');
    I got an error How to solve these error
    Thanks In Advance
    Srikkanth.M

    Assuming your parameter are based on DATE table columns...
    you are passing in VARCHAR into the procedure. These needs to be implicitly converted to a DATE, depending on your NLS settings. It's better to pass in DATEs instead of strings.
    to_date ('01-jan-2010 0820','dd-mon-yyyy hh24mi')In your procedure compare DATEs to DATEs; don't convert them to Char. You rely a lot on implicit datatype conversion, like this one
    to_char(in_time,'hh24mi') > 0820 Here you compare Char with a NUMBER....
    Next time also post the exception that you are getting.

  • Error while executing procedure for FTP

    Hi all,
    I am facing error while copying l the csv files from FTP to local directory on my machine.
    I have created a procedure & selected technology jython . please find the code below.
    import snpsftp
    ftp = snpsftp.SnpsFTP('ftp://noid-misa-01-pp/', 'indiaftp', 'PWD')
    ftp.setmode('ASCII')
    ftp.mget('INT/GPInput(AU)/', '*.csv', 'C:\D_DRIVE_NEERAJ\reading')
    ftp.close()
    The error i am receiving is :
    org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
    File "<string>", line 2, in ?
    File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\snpsftp.py", line 50, in __init__
    File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\snpsftp.py", line 58, in connect
    File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\ftplib.py", line 118, in connect
    File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\socket.py", line 135, in connect
    java.net.UnknownHostException: ftp://noid-misa-01-pp/

    If reading Excel as a database you would use "Access LSLINK"
    Access external means you are reading a file. I don't think it is possible to treat Excel as a file because the internal structure is complex.
    In the past I have saved the Excel as a CSV or as a Tab delimeted file. Then I use something like
    ACCESS External
      USE &filename
      BEGIN
        DESCRIPTION free ,
        Variables text 20
        Organisation text 20
        'July 2008' numeric 20
        'August 2008' numeric 20
        'September 2008' numeric 20
        'October 2008' numeric 20
        'November 2008' numeric 20
        'December 2008' numeric 20
        'January 2009' numeric 20
        'February 2009' numeric 20
        'March 2009' numeric 20
        'April 2009' numeric 20
        'May 2009' numeric 20
        'June 2009' numeric 20
      END
      peek
      read
    ... quit the access sub system
    END

  • Error in the procedure

    please find the error in the procedure
    CREATE OR REPLACE PROCEDURE MIS_TEST_3 AS
    CURSOR C2 IS SELECT EMP_PAY,EMP_GRD_PAY,EMP_BASIC FROM EMP_VIEW WHERE EMP_PAY_MONTH='FEB' AND EMP_PAY_YEAR='2011' AND EMP_CAT=5 ORDER BY EMP_NO;
    V_PAY NUMBER(12);
    V_GRD_PAY NUMBER(12);
    V_BASIC NUMBER(12);
    V_PAY_PAGE NUMBER(20);
    V_GRD_PAY_PAGE NUMBER(20);
    V_BASIC_PAGE NUMBER(20);
    V_PAY_LAST NUMBER(20);
    V_GRD_PAY_LAST NUMBER(20);
    V_BASIC_LAST NUMBER(20);
    I INTEGER;
    PAGE INTEGER;
    BEGIN
    OPEN C2;
    I:=0;
    V_PAY:=0;
    V_GRD_PAY:=0;
    V_BASIC:=0;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    V_PAY_LAST:=0;
    V_GRD_PAY_LAST:=0;
    V_BASIC_LAST:=0;
    PAGE:=1;
    LOOP
    EXIT WHEN C2%NOTFOUND;
    FETCH C2 INTO V_PAY,V_GRD_PAY,V_BASIC ;
    DBMS_OUTPUT.PUT_LINE(LPAD(V_PAY,15,' '),LPAD(V_GRD_PAY,15,' '),LPAD(V_BASIC,15,' '));
    I:=I+1;
    V_PAY_PAGE:=V_PAY_PAGE+V_PAY;
    V_GRD_PAY_PAGE:=V_GRD_PAY_PAGE+V_GRD_PAY;
    V_BASIC_PAGE:=V_BASIC_PAGE+V_BASIC;
    V_PAY_LAST:=V_PAY_LAST+V_PAY;
    V_GRD_PAY_LAST:=V_GRD_PAY_LAST+V_GRD_PAY;
    V_BASIC_LAST:=V_BASIC_LAST+V_BASIC;
    IF MOD (I,10)=0 THEN
    DBMS_OUTPUT.PUT_LINE('------------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('-------------------------------------------------------------------------------------------------------------------------------------------------------');
    PAGE:=PAGE+1;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    END IF;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('GRAND TOTAL '|| LPAD(V_PAY_LAST,15,' '),LPAD(V_GRD_PAY_LAST,15,' '),LPAD(V_BASIC_LAST,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    END ;

    user9950484 wrote:
    please find the error in the procedure
    CREATE OR REPLACE PROCEDURE MIS_TEST_3 AS
    CURSOR C2 IS SELECT EMP_PAY,EMP_GRD_PAY,EMP_BASIC FROM EMP_VIEW WHERE EMP_PAY_MONTH='FEB' AND EMP_PAY_YEAR='2011' AND EMP_CAT=5 ORDER BY EMP_NO;
    V_PAY NUMBER(12);
    V_GRD_PAY NUMBER(12);
    V_BASIC NUMBER(12);
    V_PAY_PAGE NUMBER(20);
    V_GRD_PAY_PAGE NUMBER(20);
    V_BASIC_PAGE NUMBER(20);
    V_PAY_LAST NUMBER(20);
    V_GRD_PAY_LAST NUMBER(20);
    V_BASIC_LAST NUMBER(20);
    I INTEGER;
    PAGE INTEGER;
    BEGIN
    OPEN C2;
    I:=0;
    V_PAY:=0;
    V_GRD_PAY:=0;
    V_BASIC:=0;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    V_PAY_LAST:=0;
    V_GRD_PAY_LAST:=0;
    V_BASIC_LAST:=0;
    PAGE:=1;
    LOOP
    EXIT WHEN C2%NOTFOUND;
    FETCH C2 INTO V_PAY,V_GRD_PAY,V_BASIC ;
    DBMS_OUTPUT.PUT_LINE(LPAD(V_PAY,15,' '),LPAD(V_GRD_PAY,15,' '),LPAD(V_BASIC,15,' '));
    I:=I+1;
    V_PAY_PAGE:=V_PAY_PAGE+V_PAY;
    V_GRD_PAY_PAGE:=V_GRD_PAY_PAGE+V_GRD_PAY;
    V_BASIC_PAGE:=V_BASIC_PAGE+V_BASIC;
    V_PAY_LAST:=V_PAY_LAST+V_PAY;
    V_GRD_PAY_LAST:=V_GRD_PAY_LAST+V_GRD_PAY;
    V_BASIC_LAST:=V_BASIC_LAST+V_BASIC;
    IF MOD (I,10)=0 THEN
    DBMS_OUTPUT.PUT_LINE('------------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('-------------------------------------------------------------------------------------------------------------------------------------------------------');
    PAGE:=PAGE+1;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    END IF;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('GRAND TOTAL '|| LPAD(V_PAY_LAST,15,' '),LPAD(V_GRD_PAY_LAST,15,' '),LPAD(V_BASIC_LAST,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    END ;Hi,
    Have you executed above procedure?? If so ,then please post the error what you are getting??
    Regards,
    Achyut

  • Error in creation Procedure..help required

    Hai all
    I have two views
    1. v_production_info
    2. v_production_scope
    The first view contains the date,area,processname,acheived value.
    eg.
    DATE AREA process achieved
    29/03/04 A TC 100
    29/03/04 A TR 100
    29/03/04 A FQ 100
    29/03/04 B FQ 100
    The Second view contains
    AREA planned
    A 700
    B 900
    I want the output like this and it should be inserted into the new table and the format i want is
    Table:
    DATE AREA planned TC TR FQ
    29/03/04 A 700 14.3 14.3 14.3
    i.e. I need to transpose the rows to columns and i need to calculate the percentage of completion..
    I have created a procedure like this..
    CREATE OR REPLACE PROCEDURE "P_Y_PROGRESS" (lDate IN
    DATE) IS
    SP VARCHAR2(50);
    P_SCOPE NUMBER(8,2);
    P_VALUE NUMBER(8,2);
    TC_VALUE NUMBER(8,2);
    TR_VALUE NUMBER(8,2);
    P3_VALUE NUMBER(8,2);
    FQA_VALUE NUMBER(8,2);
    CURSOR CUR_SPNO IS
              SELECT DISTINCT SPNO FROM V_PRODUCTION_INFO;
    BEGIN
    OPEN CUR_SPNO;
    LOOP
    FETCH CUR_SPNO INTO SP;
    EXIT WHEN CUR_SPNO%NOTFOUND;
         SELECT SCOPE INTO P_SCOPE FROM V_PRODUCTION_SCOPE WHERE SPNO = SP;
         IF P_SCOPE <> '' THEN
              SELECT ROUND(SUM(ACHIEVED) / NVL(P_SCOPE)) * 100,2) INTO P_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'PP' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
              SELECT ROUND(SUM(ACHIEVED) / NVL(P_SCOPE)) * 100,2) INTO TC_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'TC' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
              SELECT ROUND(SUM(ACHIEVED) / NVL(P_SCOPE)) * 100,2) INTO TR_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'Trasse' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
              SELECT ROUND(SUM(ACHIEVED) / NVL(P_SCOPE)) * 100,2) INTO P3_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'Phase III' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
              SELECT ROUND(SUM(ACHIEVED) / NVL(P_SCOPE)) * 100,2) INTO FQA_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'FQA' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
         ELSE
              P_VALUE := 0;
              TC_VALUE := 0;
              TR_VALUE := 0;
              P3_VALUE := 0;
              FQA_VALUE := 0;
         END IF;
         INSERT INTO PRODN_DATE,PRODN_SCOPE,PREPRODN_STATUS,TEMPPRODN_STATUS,TRASSEPRODN_STATUS,PIIIPRODN_STATUS,FQAPRODN_STATUS,DUE_DATE)
         VALUES(ldate,P_SCOPE,P_VALUE,TC_VALUE,TR_VALUE,P3_VALUE,FQA_VALUE,(SELECT PLANNED_DATE FROM SP_COMPLETION_DATE WHERE SPNO = SP));
    COMMIT;     
    END LOOP;
    CLOSE CUR_SPNO;
    END P_Y_PROGRESS;
    But it is telling as it contains compilation errors..
    can any one help to achieve this
    Thanks
    Gay3

    Hi,
    Change
    ROUND(SUM(ACHIEVED) / NVL(P_SCOPE)) * 100,2)
    to
    ROUND(SUM(ACHIEVED) / NVL(P_SCOPE,1) * 100,2)
    For NVL you have to give some default value, here i have defaulted it to 1. Change it to any value you want to default it to.
    Also in INSERT INTO statement TABLE_NAME is missing. Give the table name as
    INSERT INTO table_name (col_list)
    VALUES (values_list).
    Sunil.

  • Error in SQL Procedure

    Hi Experts
    I have created following procedure which is showing Run Time  error
    alter proc Stock_item
    as
    begin
              create table #temp
              main_Group varchar (40),
              intermediate_group     varchar(40),
              final_Group          varchar,
              item_code varchar(20),
              item_name varchar (50),
              Qty numeric(10,3)
              insert into #temp (item_code, item_name, Qty)
              select itemcode , itemname, onhand from OITM
              update tmp set tmp.main_Group = 'Raw material'
              from OITM T1 , #temp tmp
              where T1.QryGroup1 = 'Y' and T1.Itemcode = tmp.item_code
              select * from #temp
    end
    Error Message is : Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Latin1_General_CP850_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure Stock_item, Line 26
    Plz check and tell me what can be reason
    Regards
    Gorge

    Hi Gorge,
    Try the following:
    create table #temp
    main_Group varchar (40),
    intermediate_group varchar(40),
    final_Group varchar,
    item_code varchar(20) COLLATE SQL_Latin1_General_CP850_CI_AS,
    item_name varchar (50),
    Qty numeric(10,3)
    Regards,
    Andrew.

  • Error in stored procedure

    When i executed the below query I got no error and o/p is inserted into RECON_RESULTS table
    INSERT into RECON_RESULTS(contract,plan_code,issue_date,product_type,status,"mode",bill_to_date)
    SELECT TBL_SRC.CONTRACT,
    CASE WHEN ((TBL_SRC.PLAN_CODE IS NOT NULL) AND (TBL_TRGT.PLAN_CODE IS NULL))
    THEN 3
    WHEN NVL(TBL_SRC.PLAN_CODE,0) != NVL(TBL_TRGT.PLAN_CODE,0)
    THEN 0
    WHEN NVL(TBL_SRC.PLAN_CODE,0) = NVL(TBL_TRGT.PLAN_CODE,0)
    THEN 1
    END PLAN_CODE,
    CASE WHEN TBL_SRC.ISSUE_DATE =TBL_TRGT.ISSUE_DATE
    THEN 1
    ELSE 0
    END ISSUE_DATE,
    TBL_SRC.product_type,
    TBL_SRC.STATUS,
    NVL(TBL_SRC."MODE",3) AS "MODE" ,
    CASE WHEN ((TBL_SRC.BILL_TO_DATE IS NOT NULL) AND (TBL_TRGT.BILL_TO_DATE IS NULL))
    THEN 3
    WHEN NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'dd/mm/yyyy'),0) != NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'dd/mm/yyyy'),0)
    THEN 0
    WHEN NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'dd/mm/yyyy'),0) = NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'dd/mm/yyyy'),0)
    THEN 1
    END BILLDATE
    FROM TBL_SRC LEFT JOIN TBL_TRGT ON TBL_SRC.CONTRACT = TBL_TRGT.CONTRACT;
    But when I placed the above query in Procedure it is throwing error
    create or replace
    PROCEDURE PROCEDURE2 AS
    AA TBL_SRC.CONTRACT%TYPE;
    BB RECON_RESULTS.PLAN_CODE%TYPE;
    CC RECON_RESULTS.ISSUE_DATE%TYPE;
    DD RECON_RESULTS.PRODUCT_TYPE%TYPE;
    EE RECON_RESULTS.STATUS%TYPE;
    FF RECON_RESULTS."MODE"%TYPE;
    GG RECON_RESULTS.BILL_TO_DATE%TYPE;
    BEGIN
    SELECT TBL_SRC.CONTRACT,
    CASE WHEN ((TBL_SRC.PLAN_CODE IS NOT NULL) AND (TBL_TRGT.PLAN_CODE IS NULL))
    THEN 2
    WHEN NVL(TBL_SRC.PLAN_CODE,0) != NVL(TBL_TRGT.PLAN_CODE,0)
    THEN 0
    WHEN NVL(TBL_SRC.PLAN_CODE,0) = NVL(TBL_TRGT.PLAN_CODE,0)
    THEN 1
    END ,
    TBL_SRC.product_type,
    TBL_SRC.STATUS,
    NVL(TBL_SRC."MODE",3),
    CASE WHEN ((TBL_SRC.BILL_TO_DATE IS NOT NULL) AND (TBL_TRGT.BILL_TO_DATE IS NULL))
    THEN 2
    WHEN NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0) != NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0)
    THEN 0
    WHEN NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0) = NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0)
    THEN 1
    END,
    CASE WHEN ((TBL_SRC.ISSUE_DATE IS NOT NULL) AND (TBL_TRGT.ISSUE_DATE IS NULL))
    THEN 2
    WHEN NVL(TO_CHAR(TBL_SRC.ISSUE_DATE,'DD-MON-YYYY'),0) != NVL(TO_CHAR(TBL_SRC.ISSUE_DATE,'DD-MON-YYYY'),0)
    THEN 0
    WHEN NVL(TO_CHAR(TBL_SRC.ISSUE_DATE,'DD-MON-YYYY'),0) = NVL(TO_CHAR(TBL_SRC.ISSUE_DATE,'DD-MON-YYYY'),0)
    THEN 1
    END
    INTO AA,BB,DD,EE,FF,GG,CC
    FROM TBL_SRC LEFT JOIN TBL_TRGT ON TBL_SRC.CONTRACT = TBL_TRGT.CONTRACT;
    END PROCEDURE2;
    Error Message:
    Error(13,2): PL/SQL: SQL Statement ignored
    Error(24,5): PL/SQL: ORA-00932: inconsistent datatypes: expected DATE got NUMBER

    I have changed the datatype of issue_date and bill_to_date to number and used insert into tablename ...select but my SP is throwing
    warining (8,2): PLW-07202: bind type would result in conversion away from col
    so I have diabled the warnings
    ALTER SYSTEM SET PLSQL_WARNINGS = 'DISABLE:ALL';
    Now my SP complied successfully.
    Then I tried running the SP
    EXECUTE PROCEDURE2;
    It is throwing the error ORA-00900-"Invalid SQL Statement".
    My complied SP
    create or replace
    PROCEDURE PROCEDURE2 AS
    BEGIN
    INSERT into RECON_RESULTS(contract,plan_code,issue_date,product_type,status,bill_form,bill_to_date)
    SELECT TBL_SRC.CONTRACT,
    CASE WHEN ((TBL_SRC.PLAN_CODE IS NOT NULL) AND (TBL_TRGT.PLAN_CODE IS NULL))
    THEN 3
    WHEN NVL(TBL_SRC.PLAN_CODE,0) != NVL(TBL_TRGT.PLAN_CODE,0)
    THEN 0
    WHEN NVL(TBL_SRC.PLAN_CODE,0) = NVL(TBL_TRGT.PLAN_CODE,0)
    THEN 1
    END PLAN_CODE,
    CASE WHEN TBL_SRC.ISSUE_DATE =TBL_TRGT.ISSUE_DATE
    THEN 1
    ELSE 0
    END ISSUE_DATE,
    TBL_SRC.product_type,
    TBL_SRC.STATUS,
    NVL(TBL_SRC."MODE",3) AS "MODE" ,
    CASE WHEN ((TBL_SRC.BILL_TO_DATE IS NOT NULL) AND (TBL_TRGT.BILL_TO_DATE IS NULL))
    THEN 3
    WHEN NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0) != NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0)
    THEN 0
    WHEN NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0) = NVL(TO_CHAR(TBL_SRC.BILL_TO_DATE,'DD-MON-YYYY'),0)
    THEN 1
    END BILLDATE
    FROM TBL_SRC LEFT JOIN TBL_TRGT ON TBL_SRC.CONTRACT = TBL_TRGT.CONTRACT;
    END PROCEDURE2;

  • Error in Tax procedure TAXINJ

    Dear Friends,
    During creating of tax procedure TAXINJ i am getting error in condition types. The error is Condition type JM01(IN: A/P BED deductib) not defined, please tell me where can i create these condition types i.e. JM01, JA01, JS01 etc...
    If possible please tell me step by step and navigation to create tax procedure taxinj.
    And tell me what is the difference between TAXINJ and TAXIIN
    Advanced thanks
    ES.

    CIN Configuration
    1.1 Maintain Excise Registration
     Logistics general  SAP Ref. IMG SPRO  Maintain Excise Basic setting India tax on Goods Movements Registrations
    1.2 Maintain Company Code Settings
    SPRO   Basic settingIndia  tax on Goods Movements Logistics general SAP Ref. IMG   Maintain Company Code Settings
    1.3 Maintain Plant Settings
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Maintain Plant Basic setting India Movements Settings
    1.4 Maintain Excise Groups
    SAP Ref. IMGSPRO   Maintain Basic setting India  tax on Goods Movements Logistics general  Excise Groups
    1.5 Maintain Series Groups
    SAPSPRO   Basic setting India  tax on Goods Movements Logistics general Ref. IMG  Maintain Series Groups
    1.6 Maintain Excise Duty Indicators
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Maintain Excise Duty Basic setting India Movements Indicators
    1.7 Maintain Subtransaction Type with Text
    India  tax on Goods Movements Logistics general  SAP Ref. IMG SPRO   Maintain Subtransaction Type with TextBasic setting
    1.8 Determination of Excise Duty
    tax Logistics general  SAP Ref. IMG SPRO   Select Tax Calculation Determination of Excise DutyIndia on Goods Movements Procedure
    1.9 Maintain Excise Defaults
    SAP Ref.SPRO   Determination of ExciseIndia  tax on Goods Movements Logistics general IMG   Maintain Excise DefaultsDuty
    1.10 Condition-Based Excise Determination
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Define Tax Code for Condition-Based Excise DeterminationIndia Movements Purchasing Documents
    1.11 Condition-Based Excise Determination
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Assign Tax Code to Condition-Based Excise DeterminationIndia Movements Company Codes
    1.12 Classify Condition Types
    SAPSPRO   Condition-BasedIndia  tax on Goods Movements Logistics general Ref. IMG   Classify Condition TypesExcise Determination
    1.13 Maintain Chapter IDs
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Maintain Chapter ids Master dataIndia Movements
    1.14 Assign Users to Material Master Screen Sequence for Excise Duty
    SPRO   Master dataIndia  tax on Goods Movements Logistics general SAP Ref. IMG  Assign Users to Material Master Screen Sequence for Excise Duty
    1.15 Specify Excise Accounts per Excise Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Specify Excise Accounts per Excise Account determinationIndia Movements Transaction
    1.16 Specify G/L Accounts per Excise Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Specify G/L Accounts per Excise Account determinationIndia Movements Transaction
    1.17 Incoming Excise Invoices
    SAPSPRO   BusinessIndia  tax on Goods Movements Logistics general Ref. IMG   Incoming Excise InvoicesTransactions
    1.18 Define Processing Modes Per Transaction
     Logistics general  SAP Ref. IMG SPRO   Define Processing Modes Business TransactionsIndia tax on Goods Movements Per Transaction
    1.19 Define Reference Documents Per Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Define Reference Documents Per Business TransactionsIndia Movements Transaction
    1.20 Maintain Rejection Codes
    SAPSPRO   BusinessIndia  tax on Goods Movements Logistics general Ref. IMG   Maintain Rejection CodesTransactions
    1.21 Specify Which Movement Types Involve Excise Invoices
    Logistics SAP Ref. IMG SPRO   Specify Which Business TransactionsIndia  tax on Goods Movementsgeneral  Movement Types Involve Excise Invoices
    1.22 Outgoing Excise Invoices
    tax on Goods Logistics general  SAP Ref. IMG SPRO  Assign Outgoing Excise Invoices  Business TransactionsIndia Movements Billing Types to Delivery Types
    1.23 Maintain Default Excise Groups and Series Groups
     Logistics general  SAP Ref. IMG SPRO   Outgoing Excise Invoices  Business TransactionsIndia tax on Goods Movements Maintain Default Excise Groups and Series Groups
    1.24 Subcontracting Attributes
    tax on Logistics general  SAP Ref. IMG SPRO   Subcontrac Subcontracting Business TransactionsIndia Goods Movementsting Attributes
    1.25 Maintain Movement Type Groups
    SPRO   BusinessIndia  tax on Goods Movements Logistics general SAP Ref. IMG   Subcontracting SubcontractingTransactions Attributes
    1.26 Utilization Determination
    SAPSPRO   BusinessIndia  tax on Goods Movements Logistics general Ref. IMG   Utilization Determination UtilizationTransactions
    1.27 Specify SAPscript Forms
    tax on Logistics general  SAP Ref. IMG SPRO   Specify Excise Registers Business TransactionsIndia Goods Movements SAPscript Forms
    1.28 Number Ranges
    SAP Ref. IMGSPRO   Number ToolsIndia  tax on Goods Movements Logistics general  Ranges
    1.29 Message Control
     SAP Ref. IMG SPRO   Message ToolsIndia  tax on Goods MovementsLogistics general  Control
    Regards,
    Rajesh Banka

Maybe you are looking for

  • Switch Layers Script Question

    Hi I have a small script here which someone from these forums posted not too long ago... was it Noel? Either way, this script is fantastic and brings up a sub-menu to switch documents. When the menu pops up, it shows a list of all open documents in P

  • Is there any report for service level agreement monitoring?

    Regards, Lament

  • Purchase Order Copy

    Hello, When copying the Purchase order, can anybody tell me what all the things that gets copied to new purchase order?Should Notes get copied?Do Internal Notes and Supplier Notes in the header gets copied? Waiting for the response. Thanks, Sapna

  • Problem when requesting data from r/3

    when i was extracting data from R/3 4.7 by generic data extract using views,the following error occured   Error when updating Idocs in Source System Diagnosis Errors have been reported in Source System during IDoc update: System response There are ID

  • To detect USB webcam

    Hi, I am trying to detect USB webcam using NI Vision Assistant but its not works ! I already installed requisite drivers for it though its not possible to acquire images using webcam.