PLW 07204 and PLW 07202 ?

CREATE OR REPLACE PROCEDURE library_portal_home(ldt portal_home_non_login_log.logdatetime%TYPE, COT portal_home_non_login_log.counter%TYPE) IS
lv_count NUMBER;
BEGIN
SELECT COUNT(1)
INTO lv_count
FROM portal_home_non_login_log
WHERE to_char(logdatetime, 'dd-mm-yyyy ') = to_char(sysdate, 'dd-mm-yyyy ');
IF lv_count > 0 THEN
UPDATE portal_home_non_login_log
SET counter = counter + 1
WHERE to_char(logdatetime, 'dd-mm-yyyy ') = to_char(sysdate, 'dd-mm-yyyy ');
ELSE
INSERT
INTO portal_home_non_login_log(logdatetime, counter)
VALUES(sysdate, 1);
DBMS_OUTPUT.PUT_LINE('ONE RECORD IS ADDED......!');
END IF;
COMMIT;
END;
I got 2 warning when i compile for debug.
Warning PLW 07204
Warning PLW 07202
Would this 2 warning affect the procedure and how do I solve it?

create or replace PROCEDURE in_focus_page(ldt infocus_log.logdatetime%TYPE, COT infocus_log.counter%TYPE) IS
lv_count NUMBER;
BEGIN
SELECT COUNT(1)
INTO lv_count
FROM infocus_log
WHERE TRUNC(logdatetime) = TRUNC(sysdate);
IF lv_count > 0 THEN
UPDATE infocus_log
SET counter = counter + 1
WHERE TRUNC(logdatetime) = TRUNC(sysdate);
ELSE
INSERT
INTO infocus_log(logdatetime, counter)
VALUES(sysdate, 1);
DBMS_OUTPUT.PUT_LINE('ONE RECORD IS ADDED......!');
END IF;
COMMIT;
END;
I still have same 2 warning. First one is PLW 07204 and other one is PLW 07202. (bold)
Thanks in Advance

Similar Messages

  • Mapping Deployment Warning - ORA-06550, PLW-07204

    While deploying a mapping, I receive a warning
    ORA-06550 and PLW-07204: conversion away from column type may result in sub-optimal query plan.
    Any ideas on why this might be happening?
    Thanks!

    Hi,
    I think you are trying to conert the datatype of your column
    Amrit

  • Warning (22,14): PLW-07204: may not be the conversion rate as a column.....

    Good morning
    To implement the following procedure from Oracle XE not me taking the last block, which shows me the following error at line 22 -> Warning (22,14): PLW-07204: may not be the conversion of column type will result in a suboptimal query plan
    create or replace Procedure Parse_EAN( pi_EAN In Number
    , pi_Banco In Number
    , pi_Num_Cuenta In Number )
    As
    v1 utl_file.file_type;
    v2 varchar2(100);
    Begin
    v1 := utl_file.fopen('PUBLIC_ACCESS','prueb' || to_char(sysdate, 'yyyymmdd') || '.dba', 'w');
    v2 := '01' || LPAD(pi_EAN, 13, 0) || TO_CHAR(TRUNC(SYSDATE), 'YYYYMMDD') ||
    LPAD(pi_Banco, 3, 0) || LPAD(pi_Num_Cuenta, 15, 0) || ' ';
    utl_file.put_line(v1, v2);
    For rec in (SELECT '02' || LPAD(PG.CODIGO_CUENTA, 25, 0) || LPAD(PG.VALOR_PAGO, 13, 0) ||
    LPAD(PG.COD_PROCEDENCIA, 2, 0) || LPAD(ROWNUM + 1, 7, 0) || ' ' cuerpo
    FROM PAGOS PG
    WHERE PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.cuerpo);
    End Loop;
    For rec in _(SELECT '09' || LPAD(COUNT(PG.CODIGO_CUENTA), 9, 0) ||_
    LPAD(SUM(PG.VALOR_PAGO), 18, 0) || ' ' final1
    FROM PAGOS PG
    WHERE PG.FECHA_PAGO = (SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY') FROM DUAL)
    AND PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.final1);
    End Loop;
    utl_file.fclose(v1);
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    End;
    What should I do to run the whole procedure?
    tables...
    CREATE TABLE "PAGOS"
    (     "ID_PAGOS" NUMBER NOT NULL ENABLE,
         "CODIGO_BARRAS" VARCHAR2(62),
         "EAN" NUMBER(13,0),
         "CODIGO_CUENTA" NUMBER(18,0) NOT NULL ENABLE,
         "VALOR_PAGO" NUMBER(13,0) NOT NULL ENABLE,
         "FECHA_PAGO" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "NUM_LOTE" NUMBER DEFAULT NULL NOT NULL ENABLE,
         "COD_PROCEDENCIA" NUMBER DEFAULT 1 NOT NULL ENABLE,
         "FECHA_MODIFICACION" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "MODIFICADO_POR" VARCHAR2(50) DEFAULT USER NOT NULL ENABLE,
         "NRO_DOCUMENTO" NUMBER(9,0) NOT NULL ENABLE,
         CONSTRAINT "PAGOS_PK" PRIMARY KEY ("ID_PAGOS") ENABLE,
         CONSTRAINT "PAGOS_UK2" UNIQUE ("CODIGO_CUENTA", "NUM_LOTE", "FECHA_PAGO", "VALOR_PAGO") ENABLE,
         CONSTRAINT "PAGOS_UK1" UNIQUE ("CODIGO_BARRAS", "FECHA_PAGO") ENABLE
    ALTER TABLE "PAGOS" ADD CONSTRAINT "PAGOS_PROCEDENCIA_PAGO_FK1" FOREIGN KEY ("COD_PROCEDENCIA")
         REFERENCES "PROCEDENCIA_PAGO" ("ID_PROC_PAGOS") ENABLE
    and...
    CREATE TABLE "PROCEDENCIA_PAGO"
    (     "ID_PROC_PAGOS" NUMBER NOT NULL ENABLE,
         "DESCRIPCION_PAGO" VARCHAR2(80) NOT NULL ENABLE,
         "FECHA_MODIFICACION" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "MODIFICADO_POR" VARCHAR2(60) DEFAULT USER NOT NULL ENABLE,
         CONSTRAINT "PROCEDENCIA_PAGO_PK" PRIMARY KEY ("ID_PROC_PAGOS") ENABLE,
         CONSTRAINT "PROCEDENCIA_PAGO_UK1" UNIQUE ("ID_PROC_PAGOS", "DESCRIPCION_PAGO") ENABLE,
         CONSTRAINT "PROCEDENCIA_PAGO_UK2" UNIQUE ("DESCRIPCION_PAGO") ENABLE
    CREATE OR REPLACE TRIGGER "PROCEDENCIA_PAGO_TRG"
    before insert on PROCEDENCIA_PAGO
    for each row
    BEGIN
    SELECT PROCEDENCIA_PAGO_SEQ.NEXTVAL INTO :NEW.ID_PROC_PAGOS FROM DUAL;
    END;
    ALTER TRIGGER "PROCEDENCIA_PAGO_TRG" ENABLE
    Thank you very much for your cooperation_
    GOOD DAY ..._

    this is my solution
    trunc (pi_Fecha) the variable
    truncated variable that goes into the procedure trunc (variable) Parse_ean (x, y, z, variable)
    in this case the variable that enters pi_Fecha
    create or replace
    Procedure Parse_EAN( pi_EAN In Number
    , pi_Banco In Number
    , pi_Num_Cuenta In Number
    , pi_Fecha In Date)
    As
    v1 utl_file.file_type;
    v2 varchar2(100);
    fecha varchar2(8);
    Begin
    -- Aqui inicia el bloque de proceso que generar el archivo de Acuavalle.
    IF (pi_Ean = 7709998001589) then
    v1 := utl_file.fopen('PUBLIC_ACCESS','0'|| LPAD(pi_Banco,3,0)
    || to_char(pi_Fecha, 'yyyymmdd') || '.dba', 'w');
    v2 := '01' || LPAD(pi_EAN, 13, 0) || TO_CHAR(TRUNC(pi_Fecha), 'YYYYMMDD')
    || LPAD(pi_Banco, 3, 0) || LPAD(pi_Num_Cuenta, 15, 0)
    || ' ';
    utl_file.put_line(v1, v2);
    For rec in (SELECT '02' || LPAD((PG.CODIGO_CUENTA)||(NRO_DOCUMENTO), 25, 0)
    || LPAD(PG.VALOR_PAGO, 13, 0) || LPAD(PG.COD_PROCEDENCIA, 2, 0)
    || LPAD(ROWNUM + 1, 7, 0) || ' ' cuerpo
    FROM PAGOS PG
    WHERE PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.cuerpo);
    End Loop;
    select to_char(sysdate,'DD/MM/RR')
    into Fecha
    from dual;
    For rec in (Select '09'
    || LPAD(COUNT(VALOR_PAGO), 9, 0)
    || lpad(sum(PG.VALOR_PAGO), 18,0)
    ||' ' final1
    From pagos PG
    Where PG.FECHA_PAGO = pi_Fecha
    AND PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.final1);
    End Loop;
    utl_file.fclose(v1);
    end if;
    -- Aqui termina el bloque de proceso que generar el archivo de Acuavalle.
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    End;
    Edited by: Rey-user6318244 on 24/03/2009 11:47 PM

  • PLW-07204: conversion away from column type may result in sub-optimal query

    I have the following query in the package that created using sql developer. I am receiving the error 'PLW-07204: conversion away from column type may result in sub-optimal query plan' when try to compile the package. The issue is happen to be in the last line where the date is. Any help? Thanks
    select count(*) into n_cnt
    from tmp_order
    where sgn_off_dt is null and cmt_dt is not null
    and sysdate - cmt_dt > 90;

    Sy:
    Try doing as a procedure instead of an anonymous block. It looks like warnings do not apply to blocks.
    SQL> create table tmp_order(sgn_off_dt date,cmt_dt date);
    Table created.
    SQL> alter session set plsql_warnings='ENABLE:ALL';
    Session altered.
    SQL> create procedure p as
      2     n_cnt number;
      3  begin
      4     select count(*) into n_cnt
      5     from tmp_order
      6     where sgn_off_dt is null and
      7           cmt_dt is not null and
      8           sysdate - cmt_dt > 90;
      9  end;
    10  /
    SP2-0804: Procedure created with compilation warnings
    SQL> show err
    Errors for PROCEDURE P:
    LINE/COL ERROR
    8/18     PLW-07204: conversion away from column type may result in
             sub-optimal query planlindalop:
    In this case, you can ignore the warning, as it is not correct. Sysdate and a date column have different internal data types (note the type 13 for sysdate and type 12 for the date column), and whatever internally generates the warnings seems to just compare the type number.
    SQL> insert into tmp_order values(sysdate, sysdate);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select dump(sysdate) sdate, dump(cmt_dt) cmt_dt from tmp_order;
    SDATE                             CMT_DT
    Typ=13 Len=8: 7,219,2,3,15,44,4,0 Typ=12 Len=7: 120,111,2,3,16,44,12However, Oracle is perfectly capable of using an index on a date column with sysdate as a predicate. I would agree with Sy's suggestion to re-work the predicate to be something like cmt_dt < sysdate - 90.
    John

  • Typecheck error and PLW NTR?

    I'm having trouble printing some PDF files. I use Adobe Acrobat Reader 5.0.5 printing to a Personal LaserWriter NTR. With maybe half the documents, the print-monitor window reports that the document will not print do to a PostScript error. Only once has the dialog box been more specific than that. Once it reported a "typecheck" error. I've searched the Web for this, and all I found in the Mac world is one article that reported Acrobat Reader 3.1 does not work with my printer, but that doesn't help much. I have not noticed any pattern to the type of documents that do not print. The one today is 7 pages long, but even so I cannot print the document even one page at a time.
    I don't know if it's coincidence but for the last couple of days that printer has another problem. On random printing jobs it prints two solid lines across the page. One time I saw that the second line broke down into a compressed image of a line or two of the text being printed on the document.
    Anyone recognize these symptoms?

    I looked at the prepressure website, and it shows many different types of postscript errors. While I am looking right now at typecheck errors, that is only because once out of many printing attempts I got a dialog box reporting a typecheck error. Every other time I get only a "postscript error." There is no further information about what type of error it might be. Is there a way to get Print Monitor to give me more information about what type of postscript error I am getting?
    Fortunately this problem occurs only with PDF files that I open with Acrobat Reader 5.0.5, so I don't think that the problem is a bad driver.

  • PLW-07204 Warning

    We are using SQLDeveloper and almost every stored procedure I compile I get this warning. If I had it my way, I would not use SQLDeveloper but due to budget restrictions this is all I have.
    Here is the piece of code I am getting this warning on.
    select count(*)
    into dup_cnt
    FROM trans
    WHERE trans.ID_SSN = SSN_NUM
    AND trans_cd = 'DU'
    and trans_date between '01-NOV-'||to_char(to_number(to_char(sysdate,'YYYY')-1)) and trunc(sysdate);
    Thank you for taking time to look at this.
    Sandeep.

    I don't get any errors compiling it (in SQL*Plus or
    SQLDeveloper) these are only warnings, but would like
    not to get any warnings.did you get any warning message when you tried to recompile it in SQL*Plus?
    i think it might have been because your start range is ahead of end range. if your 01-NOV is always fixed you need to define some mechanism that would allow your code to use the current year or prior year if the current month is not yet in november or ahead of november which is in december.
      decode(to_char(sysdate,'MON'),'NOV', to_date('01-NOV-'||to_char(sysdate,'YYYY'),'DD-MON-YYYY'),
                                    'DEC','to_date('01-NOV-'||to_char(sysdate,'YYYY'),'DD-MON-YYYY'),
                                    to_date('01-NOV-'||to_char(to_number(to_char(sysdate,'YYYY'))-1),'DD-MON-YYYY'))

  • PLW warning?

    The warning is highlighted at the bold:
    create or replace procedure portal_pro IS lv_count number;
    BEGIN
      SELECT COUNT(*)
      INTO lv_count
      FROM portal_log
      WHERE TRUNC(logtime) = TRUNC(sysdate);
      IF lv_count > 0 THEN
        UPDATE portal_log
        SET counter = counter + 1
    WHERE TRUNC(logtime) = TRUNC(sysdate);
      ELSE
        INSERT
        INTO portal_log(logtime,   counter)
        VALUES(sysdate,   1);
      END IF;
    END
    portal_log
    ===========
    logtime       DATE
    counter       NUMBERI got two warnings for this procedure (above). I need help in solving this 2 warning (below) .
    PLW 07204
    PLW 07202
    Can anyone help me on this issue?

    Can you expalin..?
    SQL> create table portal_log(logtime date,counter number);
    Table created.
    SQL> create or replace procedure portal_pro IS
      2   lv_count number;
      3   BEGIN
      4    SELECT COUNT(*)
      5    INTO lv_count
      6    FROM portal_log
      7    WHERE TRUNC(logtime) = TRUNC(sysdate);
      8    IF lv_count > 0 THEN
      9      UPDATE portal_log
    10      SET counter = counter + 1
    11      WHERE TRUNC(logtime) = TRUNC(sysdate);
    12    ELSE
    13     INSERT INTO portal_log(logtime,counter)
    14     VALUES(sysdate,   1);
    15    END IF;
    16   END;
    17  /
    Procedure created.Message was edited by:
    jeneesh
    I think you can use merge..
    SQL>  merge into portal_log p
      2   using (select sysdate dt from dual) s
      3   on (TRUNC(p.logtime) =trunc(s.dt))
      4   when matched then
      5     UPDATE SET counter = counter + 1
      6   when not matched then
      7      INSERT (logtime,counter)
      8     VALUES(sysdate,   1)
      9  /
    1 row merged.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Eliminate warings

    hi  i am working with SQL developer Tool,
    here i am some warings in my procedure.. but not errors.
    here my PM wants to eliminate those warings..
    how to do this issue..
    like below..
    Package body [email protected]...
    Warings(167,21): PLW-07204: conversion from column may result in sub-optimal plan
    Waring(1856,23): PLW-07202 bind type would result in conversion away column type

    The problem might be, that you cannot eliminate the warnings.
    E.g. if you have a package with many functions, each has an exception section where the error is logged and reraised without a RETURN. You won't see usefull warnings (Warning(1,1): Only first 20 issues are reported) for all those
    Warning(675,1): PLW-05005: function GETZAW returns without value at line 737Or if I get tons of
    Warning(1899,60): PLW-07204: conversion away from column type may result in sub-optimal query planin Selects like
    WHERE col1 = NVL(col2,col1)Or if you can't fix it because
    Warning(2134,17): PLW-06002: Unreachable codeshows a line that is reached regularily.
    I think compiler warnings are a good invention but they can be improved.
    Regards
    Marcus

  • Compiled with errors ... but "no errors" ... ?!

    Hi all,
    I am going crazy here.
    I am trying to migrate our code to 10g ...
    I have an issue with a package. I compile it with SQLDeveloper (hate that thing) and get some warnings, but no errors. Trying to start the package in sqlplus I get the message "invalid package" ...
    Then I type "alter package xxx compile debug" and get the info "compiled with errors". But when I type "show errors" it says "no errors" ...
    Does someone know how I teach this thing some sense?
    Thanks and merry Xmas and stuff,
    Steffi

    Usage: SHOW ERRORS [{ FUNCTION | PROCEDURE | PACKAGE
    |
    PACKAGE BODY | TRIGGER | VIEW
    | TYPE | TYPE BODY | DIMENSION
    | JAVA SOURCE | JAVA CLASS } [schema.]name]
    how err schema.package_nameRegards
    SinghThis really did it, thank you so much!!
    Unfortunately it does not really help me ... only some warnings on bind-variables ...
    LINE/COL ERROR
    110/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    110/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    114/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    114/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    LINE/COL ERROR
    118/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    118/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    122/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    122/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
    LINE/COL ERROR
             Spaltentyp führen
    186/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    186/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    187/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    LINE/COL ERROR
    187/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    227/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    229/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    229/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    LINE/COL ERROR
    230/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    230/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    357/53   PLW-07204: Konvertierung vom Spaltentyp weg kann zu einem
             nicht-optimalen Abfrageplan führen
    357/70   PLW-07204: Konvertierung vom Spaltentyp weg kann zu einem
    LINE/COL ERROR
             nicht-optimalen Abfrageplan führen
    364/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen

  • Date to number conversion?

    I want to select a number of rows created within last week.
    To do it I use a select statement with:
    WHERE sysdate-o.created_on <= days;
    (days is a number, created_on is a date)
    Everything works fine, but I get warnings like this one:
    PLW-07204: conversion away from column type may result in sub-optimal query plan
    I suppose I should convert date to number to get rid of them. How can I do it isnide a SELECT query?

    While the comments regarding re-writting the query to allow the possibility of index usage are valid, the warning will still appear even with the re-written query. I am sure that this query would use an index on dt1 if one was available.
    SQL>CREATE TABLE t (id number, dt1 date, dt2 date);
    Table created.
    SQL> CREATE PROCEDURE p1 AS
      2  BEGIN
      3     FOR r IN (SELECT * FROM t
      4               WHERE dt1 = sysdate - 7) LOOP
      5        NULL;
      6     END LOOP;
      7  END;
      8  /
    SQL>/
    SP2-0804: Procedure created with compilation warnings
    SQL>show error
    Errors for PROCEDURE P1:
    LINE/COL ERROR
    3/13     PLW-07204: conversion away from column type may result in
             sub-optimal query planThe warning in this case is clearly spurious, and the reason is, at the level the compiler is looking, they are different data types. dt1 was inserted as sysdate a few minutes before I did the dunp below.
    SQL> SELECT DUMP(dt1) tab_date, DUMP(dt1 - 3) calc_date,
      2         DUMP(sysdate) sys_date
      3  FROM t;
    TAB_DATE                            CALC_DATE                          SYS_DATE
    Typ=12 Len=7: 120,107,2,27,10,45,42 Typ=13 Len=8: 7,215,2,24,9,44,41,0  Typ=13 Len=8: 7,215,2,27,9,49,13,0A date field in a table is a type 12 while sysdate, and any date that has is a result of a calculation is a type 13. Clearly a "different" datatype.
    Practically speaking, in the SQL engine, the type 13 date would be cast to a type 12 date and used in an index probe, but the compiler is likely doing something similar to the DUMP conparision.
    I believe that the type 13 dates are a representation of the C time_t struct that Oracle's kernel would likely use internally.
    John

  • Warnings in stored procedure

    i am new to oracle i am writing a stored procedure of about 1600 lines when i compiled the stored procedure
    it is giving me warnings AND not any error and got compiled successfully which i write below
    warnings
    Warning(6,2): PLW-07203: parameter 'P_RN' may benefit from use of the NOCOPY compiler hint
    Warning(168,72): PLW-07204: conversion away from column type may result in sub-optimal query plan
    Warning(169,48): PLW-07204: conversion away from column type may result in sub-optimal query plan
    Warning(1,1): Only first 20 issues are reported -- coming at last
    and when check the status of the stored procedure by running the below query
    informing that object is INVALID
    select status from all_objects where object_name='USP_GENERATERUNNINGNUMBER';
    and as far as i know that if warnings come and no error then it means procedure has been
    compiled successfully and becomes VALID
    please help me somebody

    thanks for your reply but its status is coming INVALID this i am not understanding when the procedure has been compiled its status should become valid and this also giving me this message
    Warning(1,1): Only first 20 issues are reported
    what i am thinking that after 20 warnings there may be a error which it is not showing
    please guide me in this aspect

  • Syntax issue when having more than 20 warnings

    Hello,
    when having more than 20 warnings in a compilation unit (package, procedure ...),
    SQL Developer ( version 1.5.0.53)
    doesn't always flag an error (like, for example, a misspelled local variable),
    so instead of a compile-time error a runtime error is generated.
    I tried to reproduce the situation and here is a simplified case where i've
    encountered the same error.
    Best regards
    Alexander Andris, Prague
    [email protected]
    CREATE OR REPLACE
    PROCEDURE PROC AS
    l_arg1 pls_integer;
    l_arg2 pls_integer;
    -- declarations which issue PLW-07204 warnings ...( 20 or more ...)
    cursor c1 is
    select sysdate from dual
    where trunc (sysdate) = trunc(sysdate);
    cursor c2 is
    select sysdate from dual
    where trunc (sysdate) = trunc(sysdate);
    cursor c3 is
    select sysdate from dual
    where trunc (sysdate) = trunc(sysdate);
    cursor c4 is
    select sysdate from dual
    where trunc (sysdate) = trunc(sysdate);
    cursor c5 is
    select sysdate from dual
    where trunc (sysdate) = trunc(sysdate);
    cursor c6 is
    select sysdate from dual
    where trunc (sysdate) = trunc(sysdate);
    procedure proc1 is
    begin
    null;
    end;
    BEGIN
    l_arg_notdef := 42;
    -- next line would not be displayed.
    dbms_output.put_line (
    'Error in SQLDev 1.5.0 - error on the assignment line not flagged '
    || ' by the compiler when preceded by > 20 warnings ...' ||
    ' (Error not shown in navigator.Same behavior also in SQLDev 1.21 ...).');
    -- So, when lines 5 - 23 are commented out then line 31 is flagged as an
    -- error (PLS-00201), otherwise not (runtime error only).
    -- When working on a large package with more than 20 warnings and a lot of
    -- code, to find an error like a misspelled local variable one would need to
    -- a different IDE.Hope it is not difficult to fix this quickly ...
    -- Details:
    -- client platform: Windows XP
    -- SQLDev: Version 1.5.0.53 Build MAIN-53.38
    -- db.: Oracle 10.2 on Windows
    END PROC;

    Unfortunately, that's the intended behaviour.
    After complaining about errors not being reported in previous versions, they did add the "Only first 20 issues are reported" warning, but unless you know that can happen, almost nobody will notice.
    I keep advocating for reporting errors on top, next any warnings, until having used up the 20 spaces. If necessary, they could compile first with warnings turned off, then again with warnings turned on.
    I don't think I ever put a request for this on the SQL Developer Exchange, so take a look there if you're up for it.
    Also mind you can turn the warnings off yourself inside the preferences, so they won't bother (nor help) you again.
    Regards,
    K.

  • PLSQL warning

    Hi All,
    I have compiled a procedure which contains the below query, is giving the below warning...Can any one help me to get out of this issue...
    Warning(6,3): PLW-07204: conversion away from column type may result in sub-optimal query plan
    SELECT count(JOBAMTID) into l_cnt
    FROM JOBAMT, JOBDETL
    where JOBDETL.PLANTDATE= TO_NUMBER(TO_CHAR(JOBAMT.POSTINGDATE,'YYMMDD'));
    Plantdate -- NUMBER(10,0)
    Postingdate -- DATE
    Even I converted to this number type...getting same error
    Edited by: Raj Muthyala on Aug 2, 2012 3:20 PM

    Something to play with (considering your plantdate is a number) ;)
    with
    dates(plantdate) as
    (select 120802 from dual union all
    select 121314 from dual union all
    select 121100 from dual union all
    select 121101.75 from dual union all
    select 120229 from dual union all
    select 20130229 from dual union all
    select 201300.5 from dual union all
    select 20120802 from dual
    select plantdate,
           trunc(mod(trunc(plantdate),1000000)/10000) yy,
           mod(trunc(mod(trunc(plantdate),1000000)/100),100) mm,
           mod(mod(trunc(plantdate),1000000),100) dd,
           case when mod(trunc(mod(trunc(plantdate),1000000)/100),100)
                     between 1
                         and 12
                then case when mod(mod(trunc(plantdate),1000000),100)
                     between 1
                         and to_number(to_char(last_day(to_date(to_char(trunc(mod(trunc(plantdate),
                                                                                  1000000
                                                                                 ) / 10000
                                                                       ) ||
                                                                lpad(to_char(mod(trunc(mod(trunc(plantdate),
                                                                                           1000000
                                                                                          ) / 100
                                                                                 100
                                                                     2,
                                                                     '0'
                                                                'yymm'
                                               'dd'
                          then to_date(to_char(trunc(mod(trunc(plantdate),
                                                         1000000
                                                        ) / 10000
                                              ) ||
                                       lpad(to_char(mod(trunc(mod(trunc(plantdate),
                                                                  1000000
                                                                 ) / 100
                                                        100
                                            2,
                                            '0'
                                           ) ||
                                       lpad(to_char(mod(mod(trunc(plantdate),
                                                            1000000
                                                        100
                                            2,
                                            '0'
                                       'yymmdd'
                     end
           end the_date
      from datesRegards
    Etbin

  • That includes no information?

    I have a table in which I have a field that is filled with SYSDATE command, inserting the other fields ...
    table
    CREATE TABLE "SH_RECAUDO"."G_OCCIDENTE"
    (     "COD_REFERENCIA" NUMBER NOT NULL ENABLE,
         "DETALLE" VARCHAR2(64 BYTE) NOT NULL ENABLE,
         "FECHA_CREACION" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "MODICADO_POR" VARCHAR2(30 BYTE) DEFAULT USER NOT NULL ENABLE,
         "NUM_FACTURA" VARCHAR2(14 BYTE) NOT NULL ENABLE,
         "VALOR_FACTURA" NUMBER NOT NULL ENABLE,
         "TIPO_PAGO" VARCHAR2(14 BYTE) NOT NULL ENABLE,
         CONSTRAINT "G_OCCIDENTE_PK" PRIMARY KEY ("COD_REFERENCIA");
    which put these 3 files separately, but I left with the same creation date ....
    file #1
    7060035500000 275774591303200916:18:12 EFECT
    7060032948000 273106021303200916:18:17 EFECT
    7060033446000 273210971303200916:18:20 EFECT
    file #2
    706003376000 273104341303200916:18:23 EFECT
    706003974000 273194391303200916:18:25 EFECT
    7060037269000 273445961303200916:18:28 EFECT
    7060035521000 273235631303200916:18:32 EFECT
    7060032400000 273171601303200916:18:35 EFECT
    7060035916000 273236141303200916:18:38 EFECT
    file#3
    706003472000 273150321303200916:18:41 EFECT
    7060034000000 276062151303200916:18:49 EFECT
    706003800000 276061871303200916:18:53 EFECT
    7060032187000 273207591303200916:18:56 EFECT
    and when I run the following query
    select FECHA_CREACION display_value
    , To_char (FECHA_CREACION, 'dd / mm / yy') return_value
    from G_OCCIDENTE
    group by
    FECHA_CREACION;
    and as a result I get the following information
    DISPLAY_VALUE return_value
    2009-04-07 07/04/09
    2009-04-07 07/04/09
    2009-04-07 07/04/09
    2009-04-07 07/04/09
    4 rows selected
    by that I do not generate a return results only if the date is the same?
    DISPLAY_VALUE return_value
    2009-04-07 07/04/09
    I am committing that error?
    I appreciate your help
    Reynel Salazar Martinez ...
    Good day
    God bless ....
    Edited by: Rey-user6318244 on 7/04/2009 12:54 AM

    Alex Nuijten
    is correct ...
    applied the wrong command trunc (), but as I have corrected, and get the result we needed,
    Now I get a warning because I'm using the query within a procedure ...
    Thank you very much for your help ...
    I would like to know the warning removed
    The procedure is as follows
    create or replace Procedure archivo_G_O(pi_Fecha In Date)
    As
    v1 utl_file.file_type;
    v2 varchar2(100);
    fecha DATE;
    aux varchar2(10);
    Begin
    -- Aqui inicia el bloque de proceso que generar el archivo de Acuavalle.
    --dbms_output.put_line('LA FECHA QUE SE DESCARGA PARA LA CONSULTA ES: '||pi_Fecha);
    select max(fecha_creacion) into aux from g_occidente;
    --dbms_output.put_line('LA FECHA de la tabla es: '||aux);
    v1 := utl_file.fopen('PUBLIC_ACCESS','GASES0000'
    || to_char(pi_Fecha, 'ddMMyyyy') || '.txt', 'w');
    For rec in (SELECT GO.DETALLE cuerpo
         FROM G_OCCIDENTE GO
    WHERE   trunc(GO.FECHA_CREACION) = pi_Fecha) Loop
    utl_file.put_line(v1, rec.cuerpo);
    End Loop;
    utl_file.fclose(v1);
    -- Aqui termina el bloque de proceso que generar el archivo de Acuavalle.
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    End;
    Warning(20,23): PLW-07204: may not be the conversion rate column results in a suboptimal query plan
    I am grateful for your cooperation ... been excellent...
    this forum is the best thing that can exist thanks to everyone for their input ....
    good day

  • Can't print multi-pages; NT & NTR

    I had this problem with my old PLW NT, and now I have it with a PLW NTR. The problem is that I cannot usually print documents of more than one page from the cassette tray. When I order the printer to print such a document, the printer prints one page (or, occasionally with the NTR, a second page) and then stalls. To get the printer to work again, I have to turn it off and restart it.
    To avoid the problem, I either have to load all the blank papers through the manual feed tray or print my documents one page at a time. Both techniques are inconvenient and time-consuming.
    In addition, the NTR is showing--only occasionally--a new problem. That is that sometimes when I order it to print a page--through either the cassette or the manual feed tray--the printer runs one page through blank and then prints on the second page. That throws off my organization.
    Any ideas, anyone, for remedies? TIA

    It's a kit: it contains six replacement ROM ICs: the Apple part numbers are 341-0950, 341-0951, 341-0952, 341-0953, 341-0954 & 341-0955. Please tell me if you find a vendor selling it as I have a Personal LaserWriter NTR with Revision 2.0 ROMs that is also in need of a ROM upgrade. If your printer has Revision 2.0 ROMs it's impossible to upgrade it since the ROMs are soldered onto the IO Board.
    Only Revision 1.0 & Revision 3.0 IO Boards have the socketed ROMs. You might also need to replace the scanner motor too if you ever get a Error 57 displayed on your Macintosh while attempting to print a document. Error 57 is related to the scanner motor not spinning up to the right speed & means it needs to be replaced.

Maybe you are looking for