How to convert this select statement in the update

Hai All

I have two tables namely Daily_attend, Train_mast

The Daily_attend are made up of fields are Train_mast are made up of fields are

Name varchar form no var

Date of empcode Num V_DATE

Intimate Date Train_name var

Outtime date Late_hrs var

Number IND_IN

Number IDE_OUT

Date of Attend_date


I need to update the table Depend of IDE_IN in Daily_attend in late_hrs in the Train_mast table

I got through in the select statement, it is my select statement

Select to_number (TO_DATE (TO_CHAR(Intime,'DD-MON-YYYY') |)) » '||
To_char (0815, '0000'), 'MON-DD-YYYY HH24') + late_hrs /(24*60)-respondent
) * 24 * 60 dail_Att, train_mast;

How can I convert to update

Any help is highly appricateable

Thanks in advance

Concerning

Srikkanth.M

Srikkanth,

Try this code. And 1 thing, I don't see any WHERE condition to join between the 2 tables, DAIL_ATT, TRAIN_MAST.

UPDATE DAIL_ATT A SET A.IDE_IN = (SELECT TO_NUMBER(TO_DATE(TO_CHAR(INTIME, 'DD-MON-YYYY')|| ' ' || TO_CHAR(0815, '0000'), 'DD-MON-YYYY HH24:MI') + LATE_HRS / (24 * 60) - INTIME) * 24 * 60 FROM TRAIN_MAST B WHERE );

Kind regards

Manu.

If my answer or the answer to another person has been useful or appropriate, please mark accordingly

Tags: Oracle Development

Similar Questions

  • How to write a select statement inside the case operator

    Hi all

    I want to write a query that get the result of another table of case operator.

    for example

    Select a, b, c of the double
    where a = 1
    and b = case when b is null then 'select any value from the other table' any other purpose;


    Please help me to write this query.

    Thank you

    Select a, b, c of the double
    where a = 1
    and b = case when b is null then 'select any value from the other table' any other purpose;

    Guilty plea

    Select a, b, c from tableA a
    where a.a = 1
    and a.b = (select decode (a.b, null, (select 1 from tableB b where rownum = 1), a.b) double)

  • How to create a select statement to the data in two tables?


    Hi all

    Table 1

    ID YEAR

    758 2013

    Table 2

    ID YEAR

    758 2014

    I want to create some that translates into two lines: function that does this?

    ID YEAR

    758 2014

    758 2013

    Thank you, best regards.

    Hello

    Perhaps a select * from table1 UNION ALL select * from table2 will help you.

    concerning
    Kay

  • How to block a select statement for a table of the specified until validation line

    Hello

    How to block a SELECT statement for a specified row in a table until willingness to engage occure?

    My procedure is part of a Stock request and if a user (X) get stock 1 piece, another user must wait for the user (Y) complete his reportoire.

    So, let say my stock have 10 pencils.

    When the X user starts the Stock_PLS procedure, in table Stock, line (e.g. R1) that user X should work with it, must be lock up to what the commit / rollback will appear.

    procedure Stock_PLS...

    Start
    ..
    pencils: pencils-1 =;
    ..
    End

    Observation-> pencils: = 9;


    This means that is a user there, run SELECT * stock of the table where rows_id = R1, SELECTION should wait the Stock_PLS started by user X will be completed (with commit or rollback) and his SELECT should return the value 9.

    What I need, is that Oracle has something like LINE EXCLUSIVE TABLE LOCK, but in my situation the SELECT statement should be denied on the specified lines, until the end of the procedure.

    Kind regards
    Michael

    Hello
    You can achieve this using the update with the Select clause.
    You can write your select statement like this
    SELECT * from stock of the table where rows_id = R1 for update;

  • How to convert a layer back to the text "T? He is currently uneditable (how did that happen?).

    How to convert a layer back to the text "T? He is currently uneditable and I want to change the font (also, how what happened?).

    According to your layers panel. The top layer is a text layer years the second layer is a raster layer. A raster layer once the case has been closed, cannot be cancelled. It will have to be re-created. If for some reason, you left the file open, then it is perhaps possible to cancel it, because it would show in the history stack. But by default that stack is set to 20 States, to more than 20 he would push the battery.

    I think that you have to bite the bullet and redo this layer.

  • How to convert Blu Ray Disc of the movie in general video and HD video formats

    How to convert Blu Ray Disc of the movie in general video and HD video formats

    Hello

    I doubt that this is possible because Bluray discs are mostly protected against copying.
    But if you have the Bluray m2ts file on your HARD drive, then you could try the tool called convertXtodvd. But I don't see that the reasons for this
    I mean that you will lose the quality of film converting the blueray to dvd.

  • to find the number of records retrieved in the select statement in the cursor

    Hi all
    with the cursor, I'm selecting select statement together and writing in the .txt file.
    his worksheet, but it should not open the file, if the cursor returns nothing.
    How to find the number of records returned by the select statement in the cursor.
    pls help me.

    Thank you...

    Don't understand what you're trying to say, but maybe it's...

    DECLARE
       vCounter NUMBER;
       -- Other variables...
    BEGIN
       vCounter:=0;
       FOR .. IN cursor LOOP
        IF vCounter=0 THEN
          -- Here open file...
          -- Here write one time data...
        END IF;
        -- Here write cursor data...
        vCounter:=1;
       END LOOP;
    END;
    

    -Clément

  • How to convert table 1 d of the only single

    Hye, I am brand new in Labview. Can someone help me how to convert arrray 1 d of the only sin

    GLE.

    Use Index

  • I am trying to download an application on my cable company, but it won't be over because my computer 'administrator' will not allow him. How to solve this. I'm the only person using the computer.

    I am trying to download an application on my cable company, but it won't be over because my computer 'administrator' will not allow him. How to solve this. I'm the only person using the computer.

    Start > run > control userpasswords2 > OK

    will take you to what you need to access and change permissions for logon not required

    On the users tab uncheck users must enter a user name and password to use this computer

    other options are available to facilitate access

    If a default administrator password has been entered it would probably be adminpass or empty field

    In both cases, it would be entered twice or white field, then move the cursor to confirm the blank

    as non-existent password then confirm white... you see an empty field is itself a password.

  • SELECT statement in the script output window

    Hello

    SQL Dev 4.0.3

    is it possible to include select statements from the command run the Script in the Script Output window?

    Is the result in the window:

    Select 1... ;

    results

    Select 2... ;

    results

    Joop

    try to put "set echo on" (without the quotes) as the first line and make sure that you use F5 to run the script... like sqlplus.

  • I can't open photoshop more. I get one commits by telling Finnish "photoshopin kannyistys yksityishenkiloita, koska loytyi odottamaton tiedoston loppumerkki. I do not know how to translate this, but something of the sort, photoshop couldn't open

    I can't open photoshop more. I get one commits by telling Finnish "photoshopin kannyistys yksityishenkiloita, koska loytyi odottamaton tiedoston loppumerkki. I don't know how to translate this, but something of the sort, photoshop could not open because it was a sign of unexpected file. I tried to delete phtoshop and download again, but nothing seems to work.

    If you have managed to delete the preferences file, uninstall, clean through the use of the Adobe Creative Cloud cleaning tool to solve installation problems, restart your computer and reinstall.

  • Whenever I try to download iOS 10, the settings app crashes. How should I do if I get the update?

    Whenever I try to download iOS 10, the settings app crashes. How should I do if I get the update?

    gswizzleeeee wrote:

    ... the settings application crashes.

    This is very unusual.  Two thoughts come to mind.

    1. Your storage space is too full?  Check the settings > general > storage & use iCloud > manage storage (in storage).  Make sure you have at least 10% (hopefully more than 15%) of total storage of your iPhone for free.
    2. Use iTunes (you must use the current version - 12.5.1, as this is the only version supporting iOS 10) to upgrade.  See 'Your device via iTunes update' here: update the iOS on your iPhone, iPad or iPod touch - Apple Support software
  • What is the 646 code and how can I get past to finish the updates for my computer?

    What is the 646 code and how can I get past to finish the updates for my computer?

    Hello Sonya Tapia,

    Thank you for your message.  Please click HERE to run the FixIt!  Let us know if this is or is not to solve your problem.

    See you soon

    Jason H. Engineer Support of Microsoft answers visit our Microsoft answers feedback Forum and let us know what you think.

  • How to get a select statement to pass a variable as the OUT parameter in PROC

    I have the underside of the nested select statement that returns the name of the missing table (data_table_name).

    How to be an effective way to modify the select statement, so that the returned 'data_table_name' is passed as OUTPUT in a procedure parameter
    select 'Missing Table Name : ' || data_table_name
         from   ( select upper(data_table_name) data_table_name
                  from   TABLE1
                  where  data_table_name in ('ABC',EFG','XYZ')
                MINUS
              ( select upper(fus_data_table_name)
                from   TABLE2
                where  fus_data_table_name in ('EFG',')
              group by
                     upper(fus_data_table_name)
              union
              select upper(fus_data_table_name)
              from   TABLE2
              where  fus_data_table_name = 'LMN'
              group  by
                     upper(fus_data_table_name)
            ));
    Any help is greatly appreciated.

    S
    CREATE OR REPLACE PROCEDURE myproc (tname OUT NOCOPY VARCHAR2) AUTHID CURRENT_USER IS
    BEGIN
      SELECT something
      INTO tname
      FROM whatever;
    EXCEPTION
      WHEN OTHERS THEN
        tname := ;
    END myproc;
    /
    
  • Need to know how long takes the Select statement of the cursor?

    Hi people
    I want to know the duration of execution of the cursor in a stored procedure.

    Piece of my code is provided below.

    procedure Process_PCN_MAT_Custs)
    p_PCN_OID in varchar2,
    p_days_back number
    ) is
    number of vcount;
    v_newoid varchar2 (16);
    date of pcn_create_date;
    T_DATE: = to_char (sysdate, ' dd/mm/yyyy hh24:mi:ss');
    cursor (SAP_Customers)
    x_PCN_OID varchar2,
    number of x_days_back
    date of x_pcn_create_date
    ) is
    Select
    KUNNR,
    Max (soldflag) soldflag,
    Max (shipflag) shipflag,
    Max (endflag) endflag,
    Max (custName) custname
    de)
    Select / * + DRIVING_SITE (bims_pcn_shipments) * /.
    KUNNR,
    SoldFlag,
    ShipFlag,
    EndFlag,
    custName
    Of
    bims_pcn_shipments_mview

    where
    material_number in (select sap_material_no from the pcn.material where pcn_oid = x_PCN_OID)
    and bdr_date > (x_pcn_create_date - x_days_back)

    UNION
    Select / * + DRIVING_SITE (bims_pcn_shipments) * /.
    KUNNR,
    SoldFlag,
    ShipFlag,
    EndFlag,
    custName
    Of
    bims_pcn_backlog_mview

    where
    material_number in (select sap_material_no from the pcn.material where pcn_oid = x_PCN_OID)
    and bdr_date > (x_pcn_create_date - x_days_back)

    )
    Group
    KUNNR;
    dbms_output.put_line to_char (v_date);

    Begin
    Open SAP_CUSTOMERS
    ---
    ---
    ---
    close SAP_CUSTOMERS
    end

    I get an error of compilation for this line [T_DATE: = to_char (sysdate, ' dd/mm/yyyy hh24:mi:ss');].
    Saying "+ Error (95,12): PLS-00103: encountered the symbol"="when expected as follows: constant exception < an ID > < a double quote delimited identifier > table Fedya double Ref char time timestamp interval date binary character national nchar"< an ID >"symbol has been replaced for"="continue +.»

    I would be grateful if someone can help me solve this weired compilation error.

    Thank you
    Vineet

    Then you need to go to the function [DBMS_UTILITY. GET_TIME. http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_util.htm#sthref7809].

    Something like that...

    n := dbms_utility.get_time;
    
    dbms_output.put_line( (dbms_utility.get_time-n)/100) || ' seconds....' );
    

    Published by: Karthick_Arp on January 16, 2009 05:07

Maybe you are looking for

  • Portege 4010: No Standby Mode and Hibernate mode

    Dear people, After you have reinstalled my P4010, I don't have the standby and hibernation Mode option more. I use Win XP pro, SP2, version 2002 Any suggestions? Kind Ragards,Jasper

  • Re: Satellite L670D does not load windows

    Hi, I have a toshiba L670D, who recently had a windows update and since then, every time I try to turn it on will not load windows, but just comes up with the error "error fatal c0000034 application update operation 207 0f 102311 (_00000...)" Is ther

  • Including complex.h fails

    I want to use the functions of complex numbers in C99 that this pagehttp://digital.ni.com/public.nsf/allkb/73AEAD30C8AF681A86257BBB0054A26B , should be possible. However, Labwindows cannot find the header complex.h file in the #include statement. How

  • Error 80070002 on my Dell XPS 420 Intel Core2 Quad running Windows Vista

    I spent over 12 hours searching for and perform the patches recommended at this problem and... NOTHING WORKS! I see that other users of DELL/Vista suffer from the same problem.  I have not received updates automatic download from April 2! Someone at

  • balanced traffic share

    Could someone tell me what the command