Get the date value. MinValue and insert it into the DB

Hello

I'm developing an adf application using jdev11g.

I need to recover the 3 values of page jsf (inputText 2 + 1 date. MinValue) and insert them into DB

so I create a method in appModuleImpl:

{public createAffAgVehNewRow (Date date, around km, veh Integer) Sub

Get the id of the current user

String ag = ADFContext.getCurrent () .getSessionScope ().get("idAg").toString ();

getSequenceNumber

oracle.jbo.domain.Number seq = new oracle.jbo.domain.Number (0);

SequenceImpl seqImpl = new SequenceImpl ("AFF_AV_SEQ", getDBTransaction());

SEQ = seqImpl.getSequenceNumber ();

Insert values into the DB table

Line r = getAffAgVehView1 () .createRow ();

ViewObjectImpl vo = this.getAffAgVehView1 ();

r.setAttribute ("IdAg", Integer.parseInt (ag.toString ()) ");

r.setAttribute ("IdAffAv", seq);

r.setAttribute ("KmDep", km);

r.setAttribute ("IdVeh", veh);

r.setAttribute ("DateAff", date);

r.setAttribute ("KmArriv", null);

r.setAttribute ("ConsoCarb", null);

vo.insertRow (r);

this.getDBTransaction () .commit ();

}

also, I changed the default value of the EO (AffAgVeh) to adf.currentDate () and the user interface as simpleDate format: "MM/DD/YYYY.

the problem as whene I enter 3 inputValues and click on the button I get this message:

Timestamp format must be yyyy-mm-dd hh: mm: [.fffffffff]

someone knows how to solve this problem

Thank you

Mark

Hi Dev

Please pass.

java.sql.SQLException: column type invalid in the adf

Thank you

Subramanian M

Tags: Java

Similar Questions

  • query data values abse, and going to a pdf form

    query data values abse, and going to a pdf form

    Hello
    Hello, I have this html report I wrote out of a report.
    now, I am assigned to pass the same fields on a pdf form so that the fields in the form of adaobe can be filled or the term pre-fill the form.

    can someone help me get started.

    first of all, I would like to know if it was possible.
    Second, what do I need get started (Tools)
    third how to do this.

    I'm really confused at this point.

    can someone give me advice on how to deal with this theme?

    It may be using Adobe Acrobat Designer is bundled with Acrobat
    7 Professional pro. It uses the XML to create and fill out forms.

    If you had the time, you can also create a to have
    their loan and just pass the info to it, if it automatically generates the PDF file on the
    fly.

  • Remove all lines and insert them into Oracle can make performance worse?

    I m working in a project that I need to make a batch update regularly (every 4 months) of excel files. These files have doesn´t excellent key in their ranks.

    The development of a code that deletes all lines and inserts the entire base again is easier than one who checks in all the ranks of its primary key and if necessary update. (sometimes may be a key to 5 columns).

    My question is: if I delete all the rows in the tables of the insert it again, it will cause tablespace fragmentation and in a future loss of performance?

    Is there a way to avoid this?

    Thanks in advance

    Alexander

    This response helped me a lot.

    Thank you all

    Remove all lines and insert them into Oracle can make performance worse? -Stack overflow

  • get the name of a directory file and insert it into a table

    Hello

    I have a requirement, I need to read the name of a Linux directory file and enter the file name in a variable,

    After that, I need to insert this file name in a table.

    EX: is it a file1.txt in Yearbook of the CBA, and I read that 'file name' in the v_file_name variable and I'm going to insert this file name in a table.

    Hello

    I think you've got your request of replied by Chantal.
    Shoul you have a kind of intelience in the name of the file itself so that ODI retrieves the correct file and insert into the table.

    Thank you
    Fati

  • Cannot insert date values using several insert in SQL option

    Hi all

    I'm trying to insert the date in the table I created using the code mentioned below

    Insert into TRX

    ('& Trx_ID ', "& amount',' & account_no', ' & dot");

    Enter the field value: 1

    Enter the value of the quantity: 2000

    Enter the value of account_no: 1001

    Enter the value corresponding to point: February 10, 13

    After you enter the data, I get the error,

    2 old: ('& Trx_ID ', "& amount',' & account_no', ' & dot")

    2 new: ('1 ', '2000', ' 1001', February 10, 13')

    ('1 ', '2000', ' 1001', February 10, 13')

    *

    ERROR on line 2:

    ORA-00928: lack of SELECT keyword

    Kindly help me to find the error in my code.

    Thank you...

    put a key word VALUES before your brackets

    Insert... values)

    HTH

  • divide a column value and insert it into several columns

    Hello
    am new to plsql.
    I want to divide a characters in a column and insert into multiple columns

    I tried the function substr used the symbol ',' vary its place dynamically, so I can't apply the substr function.


    for example: before split
    col1:
    col2:
    COL3:
    COL4:
    colu5: adsdf, fgrty, erfth, oiunth, okujt



    after separation

    col1: adsd
    col2: fgrty
    COL3: erfth
    COL4: oiunth
    col5: adsdf, fgrty, erfth, oiunth, okujt



    can someone help me

    Thank you

    Published by: 800324 on December 23, 2010 08:28

    Published by: 800324 on December 23, 2010 08:36

    What:

    SQL> create table t
      2  (col1 varchar2(30)
      3  ,col2 varchar2(30)
      4  ,col3 varchar2(30)
      5  ,col4 varchar2(30)
      6  ,col5 varchar2(30)
      7  );
    
    Table created.
    
    SQL> insert into t (col5) values ('adsdf,fgrty,erfth,oiunth,okujt');
    
    1 row created.
    
    SQL> insert into t (col5) values ('x,y');
    
    1 row created.
    
    SQL> insert into t (col5) values ('a,b,c,d');
    
    1 row created.
    
    SQL> select * from t;
    
    COL1                           COL2                           COL3                           COL4                           COL5
    ------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------
                                                                                                                                adsdf,fgrty,erfth,oiunth,okujt
                                                                                                                                x,y
                                                                                                                                a,b,c,d
    
    3 rows selected.
    
    SQL>
    SQL> merge into t a
      2  using ( with t1 as ( select col5||',' col5
      3                       from   t
      4                     )
      5          select substr(col5, 1, instr(col5, ',', 1, 1)-1) col1
      6          ,      substr(col5, instr(col5, ',', 1, 1)+1, instr(col5, ',', 1, 2)- instr(col5, ',', 1, 1)-1) col2
      7          ,      substr(col5, instr(col5, ',', 1, 2)+1, instr(col5, ',', 1, 3)- instr(col5, ',', 1, 2)-1) col3
      8          ,      substr(col5, instr(col5, ',', 1, 3)+1, instr(col5, ',', 1, 4)- instr(col5, ',', 1, 3)-1) col4
      9          ,      rtrim(col5, ',') col5
     10          from   t1
     11        ) b
     12  on ( a.col5 = b.col5 )
     13  when matched then update set a.col1 = b.col1
     14                             , a.col2 = b.col2
     15                             , a.col3 = b.col3
     16                             , a.col4 = b.col4
     17  when not matched then insert (a.col1) values (null);
    
    3 rows merged.
    
    SQL> select * from t;
    
    COL1                           COL2                           COL3                           COL4                           COL5
    ------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------
    adsdf                          fgrty                          erfth                          oiunth                         adsdf,fgrty,erfth,oiunth,okujt
    x                              y                                                                                            x,y
    a                              b                              c                              d                              a,b,c,d
    
    3 rows selected.
    
    SQL> 
    

    Assuming you're on 9i...

  • updated line and insert them into another table with trigger.

    Hi guys I have a table that looks like this.
    CREATE TABLE TEST
      (
        "COL1" VARCHAR2(20 BYTE),
        "COL2" VARCHAR2(20 BYTE),
        "COL3" VARCHAR2(20 BYTE)
      )
    I'm going to insert the col1 and col2 values, but I need to get the value of column 3 of table 2 and then insert the complete record in table 3. I love doing that with a trigger. I get an error message and I can't for the life of me figuere out what im doing wrong.
    So here is my nonfunctional trigger.


    Here are the two table

    CREATE TABLE TESTTABLE
      (
        "COLUMN1" NUMBER(15,0),
        "COLUMN2" NUMBER(15,0)
      )
     
    
    Insert into TESTTABLE (COLUMN1,COLUMN2) values (1,5);
    HERE IS THE CODE OF THE TRIGGER
    CREATE OR REPLACE TRIGGER TRIGGER1 
    AFTER INSERT ON TEST 
    FOR EACH ROW 
    BEGIN
      update TEST
      SET COL3 = (SELECT COLUMN2 FROM TEST, TESTTABLE WHERE COLUMN1 = :new.COL1);
    END
    I get an error of trigger mutation that I tried the other iterations of the above but I'm not getting anywhere. I have dumb down my problem at these 3 table.
    Can someone point me in the right direction.

    You'll have to do some reading, but it comes down to process the data on education instead of line level.
    You may even be not at all a trigger.
    See:
    http://www.Oracle-base.com/articles/9i/mutating-table-exceptions.php
    http://asktom.Oracle.com/pls/asktom/asktom.download_file?p_file=6551198119097816936

  • Look for patterns in a string and insert it into a new table

    I need to write a query that finds a number of location of employees that has been changed from old to new

    EMPLOYEE_DESC

    Description of the ID

    1 employee location was change from 877-287-8765 to 876-876-0976

    2 location of employee was passing of 877-287-8766 at 876-879-0976

    slot 3 is passed under NONE FOUND TO577-75-5951

    Once I get the identifier for the old and the new, I need to insert into the new table

    INSERT INTO TABLE_B

    (OLD_LOC_ID, NEW_LOC_ID)

    VALUES (OLD_LOC_ID, NEW_LOC_ID);

    TABLE_B

    ID OLD_LOC_ID NEW_LOC_ID

    1 287-877-8765 876-876-0976

    2 287-877-8766 879-876-0976

    3. NONE FOUND 577-75-5951

    The problem is that there is no fixed model for these records. I guess I have to insert the records that correspond to a fixed patten and snoop then through other manually. Is there a REGULAR expression feature that can help me grep values old and new location for the employee_desc number?

    Thank you

    Kevin

    Hello

    Kevin_K wrote:

    ...  The problem is that there is no fixed model for these records. I guess I have to insert the records that correspond to a fixed patten and snoop then through other manually. Is there a REGULAR expression feature that can help me grep values old and new location for the employee_desc number?

    Thank you

    Kevin

    Yes, you can do something like this:

    REGEXP_SUBSTR (description

    , ' ((NONE FOUND) |) (\d+-\d+-\d+)) * To * \d+-\d+-\d+'

    1

    1

    'i' - case-insensitive

    )

    It looks like for

    1. a "phone number" or the words "NOTHING FOUND", followed immediately by
    2. 0 or more spaces followed immediately by
    3. the word "TO", followed immediately
    4. 0 or more spaces followed immediately by
    5. a "phone number".

    where a "phone number" is defined as

    1. 1 or more digits, followed immediately
    2. a hyphen, immediately followed by
    3. 1 or more digits, followed immediately
    4. a hyphen, immediately followed by
    5. 1 or more digits
    6. You can also get the parts before and after 'TO' separately.
  • How can I program a button to retrieve an image from a user base and insert them into a form field?

    I need help (I have not the slightest idea) with a java script to program a button to retrieve an image from a user base and insert into a form field. To go to the menu select icon.

    [edited by moderator - he had no body to the post office and it was while heading a long title.] [Shorten the title and pasted the original title, plenty of length as the message body]

    Okay, that's actually quite easily. As the l' evenement event MouseUp button, select "Execute JavaScript" and enter this code:

    event.target.buttonImportIcon ();

    When you click the button it will open a file selection dialog and the selected file is displayed under the icon of the button.

  • How can I extract the data from a csv file and insert it into an Oracle table? (UTL_FILE)

    Hi, please help me whit this query

    Im trying to extrate the data in a file csv and im using the ULT_FILE package
    I have this query that read the file and the first field, but if the field has a different length does not work as it should

    For example if I had this .csv file:

    1, book, laptop

    2, pen, Eraser

    3, notebook, paper

    And in the table, I had to insert like this

    ID descrption1 description2

    laptop 1 book

    Eraser pen 2

    paper laptop 3

    For now, I have this query, which displays only with DBMS:

    Declare

    -Variables

    Cadena VARCHAR2 (32767).

    Vfile UTL_FILE. TYPE_DE_FICHIER;

    Dato varchar2 (200);                                             -Date

    dato1 varchar2 (200);

    dato2 varchar2 (200);

    Identifier varchar2 (5): = ', ';                             -Identifier (en)

    v_ManejadorFichero UTL_FILE. TYPE_DE_FICHIER;     -For exceptions

    -Table variables

    I_STATUS GL_INTERFACE. % OF STATUS TYPE.

    I_LEDGER_ID GL_INTERFACE. TYPE % LEDGER_ID;

    I_USER_JE_SOURCE_NAME GL_INTERFACE. TYPE % USER_JE_SOURCE_NAME;

    I_ACCOUNTING_DATE GL_INTERFACE. TYPE % ACCOUNTING_DATE;

    I_PERIOD_NAME GL_INTERFACE. TYPE % PERIOD_NAME;

    I_CURRENCY_CODE GL_INTERFACE. CURRENCY_CODE % TYPE;

    I_DATE_CREATED GL_INTERFACE. DATE_CREATED % TYPE;

    I_CREATED_BY GL_INTERFACE. CREATED_BY % TYPE;

    I_ACTUAL_FLAG GL_INTERFACE. TYPE % ACTUAL_FLAG;

    I_CODE_COMBINATION_ID GL_INTERFACE. TYPE % CODE_COMBINATION_ID;

    I_ENTERED_DR GL_INTERFACE. TYPE % ENTERED_DR;

    I_ENTERED_CR GL_INTERFACE. TYPE % ENTERED_CR;

    I_ACCOUNTED_DR GL_INTERFACE. TYPE % ACCOUNTED_DR;

    I_ACCOUNTED_CR GL_INTERFACE. TYPE % ACCOUNTED_CR;

    I_TRANSACTION_DATE GL_INTERFACE. TRANSACTION_DATE % TYPE;

    I_REFERENCE1 GL_INTERFACE. REFERENCE1% TYPE;

    I_REFERENCE2 GL_INTERFACE. REFERENCE2% TYPE;

    I_REFERENCE3 GL_INTERFACE. REFERENCE3% TYPE;

    I_REFERENCE4 GL_INTERFACE. REFERENCE4% TYPE;

    I_REFERENCE5 GL_INTERFACE. REFERENCE5% TYPE;

    I_REFERENCE10 GL_INTERFACE. REFERENCE10% TYPE;

    I_GROUP_ID GL_INTERFACE. GROUP_ID % TYPE;

    BEGIN

    Vfile: = UTL_FILE. FOPEN ('CAPEX_ENVIO', 'comas.csv', 'R');

    loop

    UTL_FILE. GET_LINE(Vfile,Cadena,32767);

    dato1: = substr (cadena, instr(cadena, identificador,1,1)-1, instr(cadena, identificador,1,1)-1);

    dato2: = substr (cadena, instr (cadena, identifier, 1, 1) + 1, instr(cadena, identificador,3,1)-3);

    dbms_output.put_line (dato1);

    dbms_output.put_line (dato2);

    -The evidence

    -dbms_output.put_line (cadena);

    -dbms_output.put_line (substr (dato, 3, instr(dato, identificador,1,1)-1));

    -dbms_output.put_line (substr (dato, instr (dato, identifier, 1, 2) + 1, instr(dato, identificador,1,1)-1));

    -dbms_output.put_line (substr (cadena, 1, length (cadena)-1));

    end loop;

    UTL_FILE. FCLOSE (Vfile);

    -----------------------------------------------------------------------------------EXCEPTIONS------------------------------------------------------------------------------------------------------------------------------------------------------------

    EXCEPTION

    When no_data_found then

    dbms_output.put_line ('Todo Correcto');

    When utl_file.invalid_path then

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20060,'RUTA DEL ARCHIVO NULLIFIED: (');)

    WHEN UTL_FILE. INVALID_OPERATION THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR ('-20061,'EL ARCHIVO NO PUDO SER ABIERTO ");

    WHEN UTL_FILE. INVALID_FILEHANDLE THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20062, 'INVALIDO MANAGER');

    WHEN UTL_FILE. WRITE_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20063, 'ESCRITURA ERROR');

    WHEN UTL_FILE. INVALID_MODE THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20064, 'MODO INVALIDO');

    WHEN UTL_FILE. INTERNAL_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20065, 'ERROR INTERNO');

    WHEN UTL_FILE. READ_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20066, 'LECTURA ERORR');

    WHEN UTL_FILE. FILE_OPEN THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR ('-20067,'EL ARCHIVO ARE ESTA ABIERTO ");

    WHEN UTL_FILE. THEN ACCESS_DENIED

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20068, 'REFUSED ACCESS');

    WHEN UTL_FILE. DELETE_FAILED THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20069, 'OPERACIÓN BORRADO FALLO');

    WHEN UTL_FILE. RENAME_FAILED THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20070, 'OPERATION SOBREESCRITURA FALLO');

    END;

    Hello

    Try something like this:

    POS1: = INSTR (cadena, idntificador, 1, 1);
    POS2: = INSTR (cadena, idntificador, 1, 2);

    ID: = SUBSTR (cadena, 1, pos1 - 1);
    description1: = SUBSTR (cadena, pos1 + 1, (pos2 - pos1)-1);
    Description2: = SUBSTR (cadena, pos2 + 1);

    where pos1 and pos2 are numbers.

    Rather than use UTL_FILE, consider creating an external table.  You won't have to write any PL/SQL, and this means that you won't be tempted to write a bad article of EXCEPTION.

  • Is it to extract data from a database and insert it into a session variable?

    $_SESSION ['Stud_FirstName'] = $row_rs_Login ["Stud_FirstName"];

    because it is not work. I swear to you that the more I learn, the less I know.

    What to do to change?

    Thank you!

    Yes. However, the recordset must exist before you can assign value to another variable. The last line of code that creates a recordset object looks like this:

    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    

    If you attempt to create the variable session before this line, as you are, I suspect, is not really surprising that it does not work.

    Even if you don't want to write all the code yourself, you must understand the code that Dreamweaver is written for you. Otherwise you will be constantly bumping your head on the keyboard. A PHP script is executed from top to bottom, and the flow of the script is controlled by loops and conditional statements. Get your head around these concepts, and you can find customizing Dreamweaver code much easier.

  • How to use OATS fall back data from DB and insert data to DB

    Hi all

    My requirement is bit different.

    I'll explain the scenario,

    I'm working on the application of the OTM, I read OAST supports OTM and already test the scripts are ready.

    My situation is as follows below,

    1. I need to extract data from a field for 18 000 shipments.
    2. I have an excel sheet in the formula below

      Shipment_Number Stop_Number Planed_Arrival_Date Planed_Departure_Date
      1

      1

      12
      13
      21
      22
    3. I could write the script in OATS while he logins OTM and research for specified shipping number and capture the Planed_Arrival_Date and the Planed_Departure_Date for the specific stop.
    4. But the problem is that I am not able to record the date in excel.

    Expected solution:

    1. One way to save the captured data back to Excel.
    2. A way to backup the data captured to a column in a table. If it is possible then to way to make OATMEAL reade the shipment of a database column number.

    Thank you

    Vishwamber Shetty

    Hi Vishwamber,

    Try to use Datatable in OATS. Using datatable, you can read and write to Excel.

    Kind regards

    Dembélé Muraleedharan

  • Separate a string in a field and insert it into 3 fields in another table

    I tried to do this with many examples in the forum using REGEXP_REPLACE and REGEXP_SUBSTR but nothing seems to work properly for me.

    I have this column in the t3_one table

    mergecode
    A8846
    A8847

    I need to use this mergecode to insert some values into the following three columns in the table t3_two

    dataCode mcprefix mcsuffix
    A A-8846, 8846
    A A-8847, 8847

    create table t3_one (mergecode varchar2 (10));

    create table t3_two (datacode varchar2 (10), mcprefix varchar2 (2), mcsuffic varchar (10));

    Insert into t3_one
    (mergecode)
    VALUES
    ("A8946");

    Insert into t3_one
    (mergecode)
    VALUES
    ('A8947");
  • Can I export data store files and import them into VMware Player?

    Hey guys,.

    I was wondering if this outcome is possible?

    I want to create a virtual machine (install the OS and software) and then export the virtual computer to use VMware Player or any viewer VM?

    Currently, I have ESXi 3.5 and can create virtual machines. I'm not able to find a way to simply export the virtual machine. Is this possible? If this isn't the case, I was wondering if it was possible to export the files in the data store, and then copy them to the VMware Player?

    The files in the data store (vmx, vmdk, nvram, vmxf, vmsd, vswp)

    Thank you!!!

    You can use the free VMWare Converter Standalone (available here: http://www.vmware.com/download/converter/). Use your ESX as target and convert the virtual machine to a VMWare Workstation. I've never tried, but I think it will work.

    Marcelo Soares

    VMWare Certified Professional 310

    Technical Support Engineer

    Chief Executive Officer of the Linux server

  • How to get the values based on the most recent date

    Oracle Version 8i



    How to get the new_value based on the most recent date

    SELECT max (MODIFIED_ON), the Group LOG_ITEM_CHARACTERISTICS by MODIFIED_ON new_value - does not

    Please, someone help me
    CREATE TABLE LOG_ITEM_CHARACTERISTICS
    (
      CHAR_LOG_ID          NUMBER(10)               NOT NULL,
      PIRM_ID              VARCHAR2(8)              NOT NULL,
      CONSTANT_FLAG        VARCHAR2(1),
      CHARACTERISTIC_NAME  VARCHAR2(25)             NOT NULL,
      TYPE_NAME            VARCHAR2(10)             NOT NULL,
      NEW_VALUE            VARCHAR2(3000),
      UOM                  VARCHAR2(10),
      MODIFIED_BY          VARCHAR2(30),
      MODIFIED_ON          DATE
    )
    
    SET DEFINE OFF;
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187376, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '1', 'AMPS', 'EMPXD88', TO_DATE('10/25/1999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187377, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMPXD88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187378, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '0', 'AMPS', 'EMDXB88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187384, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '2', 'AMPS', 'EMAXC29', TO_DATE('11/10/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187385, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55.1', 'VOLTS', 'EMAXC29', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_ON)
     Values
       (2400742, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (574093, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (574094, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131486, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131487, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '16-12-04', 'DD/MM/YY', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131488, '0307490N', 'Y', 'POWER SUPPLY', 'PS2030/WVL', 'ESSENTIAL', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131489, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759086, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759087, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759088, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '14/11/07', 'DD/MM/YY', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646012, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646013, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646014, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646015, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646016, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646057, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646058, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646059, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648577, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648578, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648579, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648580, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648581, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:10', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648634, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648635, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;

    user4587979 wrote:
    Hi Frank

    Yes, but I had more than 2 tables with item_characteristics, type_characteristics

    If there are other tables involved, then CREATE TABLE and INSERT statements for them (for the relevant columns only). You must not post a lot of examples of data; usually just a couple of lines per table is enough to show the problem.
    Also post the results desired from these data.

    What I try to do is, I'm comparing new_value in log_item_characteristics (whichever is most recent) with CHR_VALUE in the item_characteristics and the needs of different output values

    I am trying to query is not giving desired out put

    Point out some places where the output is wrong and explain how you get good results in these places, using specific examples from the data sample.

    select  lic.PIRM_ID, ic.CHR_ID, lic.CHARACTERISTIC_NAME,
    lic.TYPE_NAME, ic.CHR_VALUE, lic.NEW_VALUE,  lic.MODIFIED_BY,  lic.MODIFIED_ON,
    ic.CREATED_BY, ic.CREATED_ON,ic.MODIFIED_BY, ic.MODIFIED_ON
    from log_item_characteristics lic, item_characteristics ic,type_characteristics tc  where
    lic.TYPE_NAME=tc.TYPE_NAME
    and lic.CHARACTERISTIC_NAME=tc.CHR_NAME
    and lic.PIRM_ID=ic.PIRM_ID
    and tc.CHR_ID=ic.CHR_ID and ic.CHR_VALUE <> lic.NEW_VALUE
    and lic.pirm_id in ('0307490N','0307521C')
    order by lic.pirm_id
    

    Thank you; It is useful to see the existing query. Really, you have to format your code.

    Please can you help me

    What you've posted so far is like saying "I'm going 200 meters to the North, and then 500 meters East, but I'm not getting where I want to go." I would have a better chance to help you if you said, 'I'm out of my house, at 100, Elm Street and try to get to the supermarket at Broadway 279. I'm going 200 meters to the North... ', or, even better. "I want to buy a newspaper and some orange juice, so I thought I'd go to a convenience store. I start at my house, at 100, Elm Street... »
    Always post some examples of data (CREATE TABLE and INSERT statements, as you did in your first post) and the desired results from these data. Explain how you get these results from these data.

Maybe you are looking for

  • Default search engine &amp; homepage

    I think I have a bug. I have my default homepage set to MSN and Google search engine.  Since yesterday, whenever I open Safari, it opens on the Yahoo search engine.  Even when I do a search.  I checked the preferences of Safari and it still says MSN

  • When I opened a new tab I have AOL rather than tiles. How can I fix it?

    I made the mistake of downloading the 'new' Firefox with the AOL toolbar. I don't like it and remove the toolbar according to the instructions. However, everytime I open a new tab, it happens like AOL rather than the history of the tile. How to bring

  • DV7 won't turn on after deassambly

    Hello. I have DV7 deassambled to change the screen and when I plugged everything back it wouldn't start. Can you help me please?

  • Want 4502: Printer don't work on wireless or scan via USB

    Previously I had no problem printing or scanning from my Toshiba laptop wireless. All of a sudden it will not see my printer via the wireless network. I checked the network on the printer according to the troubleshooting of HP and he says that it is

  • Cannot connect to Windows 7 after Microsoft updates

    After the most recent series of updates to one of our laptops set up and configured, the office went into the log on screen. There is one main user on this laptop. When we click on the user icon, however, user, accessibility, and stop icons disappear