Table: column update

Table  - TIME_RECORD

Manual Tabular Form query

SELECT APEX_ITEM.TEXT(31,E_TIME,30,35,'f31_'|| '#ROWNUM#')ETIME
FROM   TIME_RECORD

E_TIME column value is 11/29/2012 2:42:43 PM


When running the form the column displays  - 29-NOV-12, the time part is not displayed.


Please suggest why only date is displayed ? why Time is not displayed.

Sanjay

user12957777 ,

The implicit conversion of DATE in VARCHAR2 uses the DATE FORMAT NLS.
Try

SELECT APEX_ITEM.TEXT(31,TO_CHAR(E_TIME,'DD-MON-RR HH24:MI:SS'),30,35,'f31_'|| '#ROWNUM#')ETIME
FROM   TIME_RECORD

Use the format mask you need.

Tags: Database

Similar Questions

  • The Master Table column updated based on the sum of column Table detail


    With the help of JDev 11.1.1.6.

    I have a master-detail table based on a link to BC.

    The main table has a column that displays an InputText or an OutputText, based on the value in another column.

    If the InputText is displayed, the user can enter a value and the database will be updated with that value.

    If the OutputText is displayed, it must be a sum of a column in the secondary table.  Also, this value will be written in the database.

    Question:

    How can I fill the OutputText in the main table with the sum of the values in a column in the secondary table?

    The detail table column is a manually entered InputText field.

    Thank you.

    Create a spike in the main table and write in its expression as follows - DetailVoAccessorName.sum ("ColumnName");

    This will calculate the sum of column table detail and then you can set the value of the transient attribute to attribute DB on backup operation

    Ashish

  • Edit/view (data or Table column) value - cannot change the data, but it can be updated

    Hello

    According to the help of Oracle SQL Developer Center, the dialog ' Change/see value (data or Table column)' should "change the value of data" if we "are allowed to change the data." We strive to use this dialog box to modify/update data without having to write an Update statement, but is not to leave us. Us are not allowed to update the data, we can update via update statements. Even as the owner of the schema.table, it don't will change us the value in the dialog box "Edit/see value (data or Table column).

    Any ideas?

    We are on SQL Developer Version 3.0.0.4 build HAND - 04.34 and Oracle 11 GR 1 material (11.1.0.7) database.

    Thank you

    Alex Larzabal.

    You can still vote on the existing demand for this developer SQL to add Exchange of weight for implementation as soon as possible:
    https://Apex.Oracle.com/pls/Apex/f?p=43135:7:3974986722753169:no:RP, 7:P7_ID:4902

    Kind regards
    K.

  • Update of table column in this table corresponds with another table

    UPDATE of table column where this table corresponds to a column with another table of columns,
    Example:

    I need to update column in the table SIEBEL_ASSETS MATACH_FLAG = 'Yes' when less than the conditions of the
    Select a.*, SIEBEL_ASSETS a, gis_cad, c
    where upper (a.Province) = upper (c.province)
    and upper (a.TOWNSHIP_NAME_EXT) = upper (c.suburb)
    and a.Stand_ # = c.ERF_NO
    update siebel_assets a
    set    match_flag = 'yes'
    where  exists (select 1
                   from   gis_cad c
                   where  upper(a.Province) = upper(c.province)
                   and    upper(a.TOWNSHIP_NAME_EXT) = upper(c.suburb)
                   and    a.Stand_# = c.ERF_NO
                  )
    ;
    
  • Database column updates based on 2 fields being equal to two tables

    I get an error 1427 when you try to update a field in tables.

    I have about 30 000 records in tableA and about 2500 in tableB

    I'm trying to update a field in tableA based on equality of the 2 fields in each table.

    Update tableA a set a.Col1 =
    (select b.Col1 from tableB b where a.Col2 = b.Col2 and a.Col3 = b.Col3);

    There are several rows in tableA that should be whether the selection is true.

    I think I need to write some PL/SQL, but not sure.

    Any ideas?

    Thank you
    ANON

    Anon,

    I don't know how to put your data, but you can try a merger in tablea with a distinct subset of tableb.

    merge into tablea t
    using (select distinct col1, col2, col3 from tableb) s
    on (t.col2 = s.col2 and t.col3 = s.col3)
    when matched then
    update
       set  t.col1 = s.col1
     where  t.col1 != s.col1
        or (t.col1 is null and s.col1 is not null)
        or (t.col1 is not null and s.col1 is null);
    

    Concerning
    Peter

  • Update multi lines according to a table of update

    Hello!

    I want to update multiple rows in a table according to a table of update like this:

    key
    col_a
    col_b
    123ABCdef
    456XYZUVW
    888KLMIJK

    The table to be updated has this (and other) columns. I use this code to do the update:

    Update my_table set t0

    col_a = (select col_a updates t1 where the t1.key = t0.key)

    col_b = (select col_b from t1 updates where the t1.key = t0.key)

    where

    key (select updates button);

    It works very well, but...

    .. .it seems to be ineffective. It seems that the systems needed to create keys in the table updates. He must then go through my_table and search the table updates twice for each update. Right? OK, the system can optimize it. I hope that. Is it possible to see how the system will perform the foregoing.

    .. .is too laborious to write in code. Is there a better way to specify:

    "For any row from my_table where the key is the key of table updates, updates col_a and col_b my_table with values according to table updates?

    THX!

    Hello

    1010848 wrote:

    Hello!

    I want to update multiple rows in a table according to a table of update like this:

    key
    col_a
    col_b
    123 ABC def
    456 XYZ UVW
    888 KLM IJK

    The table to be updated has this (and other) columns. I use this code to do the update:

    Update my_table set t0

    col_a = (select col_a updates t1 where the t1.key = t0.key)

    col_b = (select col_b from t1 updates where the t1.key = t0.key)

    where

    key (select updates button);

    It works very well, but...

    .. .it seems to be ineffective. It seems that the systems needed to create keys in the table updates. He must then go through my_table and search the table updates twice for each update. Right? OK, the system can optimize it. I hope that. Is it possible to see how the system will perform the foregoing.

    .. .is too laborious to write in code. Is there a better way to specify:

    "For any row from my_table where the key is the key of table updates, updates col_a and col_b my_table with values according to table updates?

    THX!

    FUSION is often more effective than the UPDATE, precisely for the reasons you mentioned.

    Try using the MERGER: http://docs.oracle.com/database/121/SQLRF/statements_9016.htm#sthref7153

    something like:

    MERGE INTO my_table mt

    USING update u

    WE (mt.key = u.key)

    WHEN MATCHED THEN UPDATE

    SET mt.col_a = u.col_a

    mt.col_b = u.col_b,

    ;

    If you would care to post a small example of data (CREATE TABLE and INSERT statements for both tables) and outcomes from this data, I was able to test this.

    Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?

  • Select the data in a table and update in another table

    Dear experts,

    create the table TB_ENCRYPT

    (

    Identification number,

    Varchar2 (200) KEY

    );

    INSERT INTO TB_ENCRYPT VALUES(1,'HJUVHDUIFBSDGVU');

    SELECT * FROM TB_ENCRYPT;

    1 HJUVHDUIFBSDGVU

    create TABLE users)

    username, NUMBER of

    password VARCHAR2 (200)

    );

    Insert users

    values (1, 123 # "")

    Insert users

    values (2, 456 #')

    Select * from users;

    1 123 #.

    # 2 456

    I want to select the data KEY for table TB_ENCRYPT column and update in the column of tables for the respective key user password

    TB_ENCRYPT table contains only a single key value. Comparing this key, I want to update the old value of the key to the new value.

    For encryption and decryption I followed the java class method.no is worried about that.

    create or replace

    PACKAGE PCK_ENC AUTHID CURRENT_USER AS

    FUNCTION DECRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.decrypt (java.lang.String, java.lang.String) return java.lang.String ';

    FUNCTION ENCRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.encrypt (java.lang.String, java.lang.String) return java.lang.String ';

    END;

    SELECT PCK_ENC. ENCRYPT('1234','HJUVHDUIFBSDGVU') FROM DUAL;

    HERE,

    1234 - is the password of the users table column data

    HJUVHDUIFBSDGVU - represents the key of table TB_ENCRYPT column data.

    Comparing this key, I want to update the old value of the key to the new value.

    I tried with this method

    declare

    cursor c1 is

    Select the key

    of TB_ENCRYPT

    where id = 1

    update the id;

    Start

    for c1_rec looping c1

    update users

    password is PCK_ENC. Encrypt (Password, Key)

    the location being c1;

    commit;

    end loop;

    end;

    /

    Help, please

    You can use the MERGE statement.

    merge into users
    using tb_encrypt
       on (id = userid)
      when matched then
          update set password = PCK_ENC.ENCRYPT(password,key);
    

    And why you encrypt your password. This isn't a good idea. Just password hash.

  • ORA-01747: invalid user.table.column... on the REPLACEMENT notice

    Oracle 11g Release 2

    I run an UPDATE statement. In the 'set' I am trying to update a column by using a subquery on the right side. REPLACE the statement Gets the error ORA-01747: specification of invalid column, table.column, or user.table.column.

    create table tab1
    ( file_id   number  ,
      record_id number  ,
      part_type_id number ,
      part_number  number ,
      positon_id   number ,
      notes        varchar2(255) ,
      mapped       varchar2(1) default 'N'
    )
    /
    insert into tab1 values(1,1,123,777,1,'NEW|A/C COMPRESSOR KIT','N') ;
    insert into tab1 values(1,2,123,777,2,'REMAN|A/C LINE','N') ;
    insert into tab1 values(1,3,123,777,2,'TEST NOTE','N') ;
    commit;
    select * from tab1;
    /*
      FILE_ID  RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID NOTES                     MAPPED
    --------- ---------- ------------ ----------- ---------- ------------------------- ------
            1          1          123         777          1 NEW|A/C COMPRESSOR KIT         N
            1          2          123         777          2 REMAN|A/C LINE                 N
            1          3          123         777          1 TEST NOTE                      N
    */
    
    
    DECLARE
       v_note2 varchar2(255) := 'NEW' ;
    BEGIN
    UPDATE tab1 t 
             SET 
              , t.notes =  (select REPLACE(t.notes,v_note2,null) 
                            from dual )
          WHERE t.file_id = 1         -- value comes from another source
          AND   t.part_type_id = 123  -- value comes from another source
          AND   t.part_number = 777   -- value comes from another source
          AND   t.position_id = 1  ;  -- value comes from another source
    END ;
    /
    
    ERROR at line 3:
    ORA-01747: invalid user.table.column, table.column, or column specification
    

    Here's what the end result should be:

      FILE_ID  RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID NOTES                     MAPPED
    --------- ---------- ------------ ----------- ---------- ------------------------- ------
            1          1          123         777          1 |A/C COMPRESSOR KIT            N
            1          2          123         777          2 REMAN|A/C LINE                 N
            1          3          123         777          1 TEST NOTE                      N
    

    Hello

    orclrunner wrote:

    Oracle 11g Release 2

    I run an UPDATE statement. In the 'set' I am trying to update a column by using a subquery on the right side. REPLACE the statement Gets the error ORA-01747: specification of invalid column, table.column, or user.table.column.

    1. create table tab1
    2. (file_id number,
    3. number of record_id,
    4. number of part_type_id
    5. number of PART_NUMBER,
    6. number of positon_id
    7. Notes VARCHAR2 (255),
    8. mapped by default varchar2 (1) ' don't
    9. )
    10. /
    11. insert into tab1 values (1,1,123,777,1,'NEW |) Kit COMPRESSOR / it, ' don't);
    12. insert into tab1 values (1,2,123,777,2,'REMAN |) A/C LINE ',' don't);
    13. insert into tab1 values (1,3,123,777,2, 'NOTE of TEST', ' don't);
    14. commit;
    15. Select * from tab1;
    16. /*
    17. FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID MAPPED NOTES
    18. --------- ---------- ------------ ----------- ---------- ------------------------- ------
    19. 1 1 123 777 1 NEW | A/C COMPRESSOR KIT N
    20. 1 2 123 777 2 REMAN | A/C LINE N
    21. 1 3 123 777 1 TEST NOTES N
    22. */
    23. DECLARE
    24. VARCHAR2 (255) v_note2: = "NEW";
    25. BEGIN
    26. Tab1 t UPDATE
    27. SET
    28. t.notes = (select REPLACE(t.notes,v_note2,null)
    29. the double)
    30. WHERE t.file_id = 1 - value comes from another source
    31. AND t.part_type_id = 123 - value comes from another source
    32. AND t.part_number = 777 - value comes from another source
    33. AND t.position_id = 1;  -value comes from another source
    34. END;
    35. /
    36. ERROR at line 3:
    37. ORA-01747: invalid column, table.column, or user.table.column specification

    Here's what the end result should be:

    1. FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID MAPPED NOTES
    2. --------- ---------- ------------ ----------- ---------- ------------------------- ------
    3. 1          1          123         777          1 | A/C COMPRESSOR KIT N
    4. 1 2 123 777 2 REMAN | A/C LINE N
    5. 1 3 123 777 1 TEST NOTES N

    The comma after SET is a syntax error.

    Why you use double?  Why not just

    UPDATE tab1

    SET of notes = REPLACE (notes, v_note2)

    WHERE file_id = 1

    ...

    ?

  • Error in ODI, ORA-01747: invalid column, table.column, or user.table.column specification

    ODI-1227: SrcSet0 (load) task fails on the source of ORACLE STAGING_YYY connection.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-01747: invalid column, table.column, or user.table.column specification

    We get the above error whenever we run an ODI interface,
    This interface is straight forrwad a mapping update incremental IKM Oracle, although we have identified the problem but do not know how it could be fixed

    Source table that contains two columns that are generally identified as the key of DB

    NAME

    / / DESC

    the target too has the same columns. If we disable these mappings to columns from the Active maps the interface works very well, however, with the latter, it fails. We will not be able to change the name of the column in the target because it is a table of Oracle products and has several dependencies to the breast.

    Please suggest an alternative and also if our understanding is correct.

    Thanks in advance.

    Jay

    HI Jay

    change the column as DESC and put "DESC" in the name, and save it for all the source concerned target and remapping to remove the column from the interface

    Thank you

    P

  • Error Type 2 SCD: ODI - 1228:ORA - 01747: invalid column, table.column, or user.table.column specification

    ODI error. When you try to import.

    Error Type 2 SCD: ODI - 1228:ORA - 01747: invalid column, table.column, or user.table.column specification

    It is a common question.

    Allow your SCD SCD table column properties if you do not select "crush on change."
    This property simply

    -Online CPC IKM goto => select ignore option error on update of existing lines.

  • Insertion of a DML statement as string in a table column


    Hello

    Is there a way I can insert a dml statement (such as "update a SET COL1 = 10") in a table column using a procedure or a function.

    I can do it by simply running an INSERT statement. But how can I do with a proc or function without getting an error "Cannot perform a DML operation inside a query"

    Please advice

    Hello

    937454 wrote:

    In fact, it can be done through a procedure. I was trying to see if I can do this with a function.

    Of course, you can do so via a function; you just can not call this function of a SQL statement.

    If the function returns a VARCHAR2, then you could call it like this:

    DECLARE

    foo VARCHAR2 (100);

    BEGIN

    foo: = fun_a;

    END;

    or like this:

    BEGIN

    dbms_output.put_line (fun_a);

    END;

  • How to check the column updated whereby the package or procedure?

    Hi all

    Can someone help me how to check the column updated by which the package or procedure

    A.Mahesh

    Hello.

    You can check what object is a reference to the table of the column:

    Select *.

    of all_dependencies d

    where d.REFERENCED_NAME = '. '

    And you can find all the links to the object source data column:

    Select *.

    of s all_source

    where s.name = "."

    and s.OWNER = '. '

    and s.TYPE = "."

    and as s.TEXT '%%'

  • question on multi column update

    Hi all

    I'm trying a few updates on a column of several updates.

    This is the update that I am trying to run it.

    Can some pls check if what I try to do is correct or not.
    You want to know if I do no redundant checks on the data during the update of the table.


    UPDATE
    land_pp_sub_feature_temp_1 T4
    SET
    (
    esp_message_id
    esp_message_id_dt
    event_bus_channel
    esp_event_type
    event_source_system
    event_create_dt
    profile_id
    event_receive_id
    valid_to_dt
    feature_code
    transaction_dt
    ) =
    (
    SELECT
    esp_message_id
    esp_message_id_dt
    event_bus_channel
    esp_event_type
    event_source_system
    event_create_dt
    profile_id
    event_receive_id
    valid_to_dt
    feature_code
    transaction_dt
    sub_id
    msisdn
    feature_code
    Of
    (
    SELECT
    T1.esp_message_id
    T1.esp_message_id_dt
    T1.event_bus_channel
    T1.esp_event_type
    T1.event_source_system
    T1.event_create_dt
    T1.profile_id
    T1.event_receive_id
    T1.valid_to_dt
    T1.feature_code
    T1.transaction_dt
    T1.sub_id
    T1.msisdn
    T1.feature_code
    OF hold_pp_sub_feature_expire T1, land_pp_sub_feature_temp_1 T2
    WHERE t1.sub_id = t2.sub_id
    AND t1.msisdn = t2.msisdn
    AND t1.feature_code = t2.feature_code;
    ) T3
    WHERE t3.sub_id = t4.sub_id
    AND t3.msisdn = t4.msisdn
    AND t3.feature_code = t4.feature_code
    )
    WHERE (msisdn, sub_id, feature_code)
    IN (SELECT sub_id, msisdn, feature_code FROM hold_pp_sub_feature_expire);

    Thank you
    MK.

    May be you can simplify it like this

     update land_pp_sub_feature_temp_1 t2
        set
         (
                esp_message_id
              , esp_message_id_dt
              , event_bus_channel
              , esp_event_type
              , event_source_system
              , event_create_dt
              , profile_id
              , event_receive_id
              , valid_to_dt
              , feature_code
              , transaction_dt
         ) =
         (
                select  t1.esp_message_id
                   , t1.esp_message_id_dt
                   , t1.event_bus_channel
                   , t1.esp_event_type
                   , t1.event_source_system
                   , t1.event_create_dt
                   , t1.profile_id
                   , t1.event_receive_id
                   , t1.valid_to_dt
                   , t1.feature_code
                   , t1.transaction_dt
                   , t1.sub_id
                   , t1.msisdn
                   , t1.feature_code
                   from hold_pp_sub_feature_expire t1
                  where t1.sub_id       = t2.sub_id
                    and t1.msisdn       = t2.msisdn
                    and t1.feature_code = t2.feature_code
         )
      where
     exists (
              select null
                from hold_pp_sub_feature_expire t1
               where t1.sub_id       = t2.sub_id
                 and t1.msisdn       = t2.msisdn
                 and t1.feature_code    = t2.feature_code
         )
              
    

    Just make sure that the combination of (SUB_ID, MSISDN, feature_code) is unique in the table two

  • Update of the partition table and update rank with php.

    Hello

    I have a partition table on my site which is

    Scores: id - userid - ranking - points-

    Get points for doing things while using the site users. Points are updated, but I don't know how

    to update this user's position by comparing everyone elses points and rank numbers update

    based on the users with most points in php.

    Hope you can help. Thank you

    Weird, the link I provided is not what I wanted; It seems very different and is difficult to read. Anyway, you don't mention what goes wrong with the code you provided. I also don't think that you want to prepend rank alias with the table name 'notes' because it is not a table column. I do not use MySQL, but I think you want to use ' @' for your SQL local variables, so something like:

    $sqlgo = mysql_query ("SET @rank = 0; SELECT @rank: = @ row + 1 rank Users.id, Users.username, Users.profilepic, Scores.scoreid, Scores.userid, Scores.level, Scores.points, rank, Scores.badges OF Scores INNER JOIN users ON Scores.userid = Users.id ORDER BY invoking DESC LIMIT 30 ");

  • Insert rows in table (A) in tab. (B) a table (C) update?

    I have a table (C) if one of the columns (C1) of this table is updated, I want to insert all the rows of the table (A) in table (B).

    If I could use the trigger, it would look like this:

    CREATE OR REPLACE TRIGGER cn1_c2s_intr_trg
    AFTER the UPDATE OF protocols WE of call_no1
    WHEN (call_no1 IS NOT NULL)
    BEGIN
    INSERT INTO call2sites (protocol_id, site_id, site_relation_id)
    SELECT: P76_PROTOCOLID_1, rsnumber, 1
    OF researchsite
    ORDER BY 1;
    END;
    /

    But the database trigger side would not know what ": P76_PROTOCOLID_1" (the application page element) is. How the above can be achieved by APEX?

    Thank you for your time.

    Daniel

    Triggers are just use specified PL/SQL, but yes, you can certainly call a function or a procedure to manage cela and have this pulled by a process page of the APEX. I've done it before, and it works fine. I have read your initial post and understood that you were looking for a solution based on the trigger, but if a procedure call works fine. Here's what it might look like:

    --(APEX : PL/SQL Procedure firing On Submit - After Validations and Computations)
    begin
      PROC_UPDATE_ABC(:P76_PROTOCOLID_1, :P76_CALL_NO1);
    end;
    

    Your procedure could then be something like:

    create or replace PROCEDURE PROC_UPDATE_ABC(prot NUMBER, call NUMBER)
    IS
      v_prot       NUMBER  := prot;
      v_call         NUMBER  := call;
    begin
      INSERT INTO c VALUES (v_prot, 1, v_call);
      INSERT INTO c VALUES (v_prot, 2, v_call);
      INSERT INTO c VALUES (v_prot, 3, v_call);
      ...
    end;
    

Maybe you are looking for

  • What di I do it for My Google Search engine works because it does not yet all other seaches work?

    I have reset Firefox. I get all recently warning of security windows on a BTRoot certificate is not invalid. Before that, I used Google since originally installing Firefox, now when I try a search, I get a problem with page load error. I have firefox

  • How to measure the frequency of NOR-DAQmx RPM tasks

    Hello I'm trying to measure the frequency using the NI DAQmx task and then convert it to a RPM if possible. I have the following material available to me. I have a block SCXI-1327 terminal, as well as a 6289 PXI multifunction data acquisition Module

  • want to m6: Please help me remove admin password m6 want start! Thank you

    I have a problem because they try to pass the 3rd, I use win 10 64-bit, please help me! disabled system: 84036928

  • HEXAGONAL problem

    Hi again, I could really do with some help regarding sending the commands by using the code display string. Basically, I need to send a string of HEX 02 08 00 00 00 20 00 03 xx xx to device bluetooth as a command. The xx represents the changing data

  • AA3

    I just added 1 GB of ram for my windows xp home edition.  Hoping to play AA3. The series of ATI Radeon 200 graphics video is not good enough. can I upgrade it me? and how?  I need to upgrade to windows 7, then download a graphic/video card more up-to