How to write an update a statement for this scenario

Hai all gurus

My table name is Daily_attend

Name varchar

Empcode number

Date of the respondent

Outtime date

Number of Cutmins

Date of Att_date

It is a daily presence of an employee table

Here, I need to update column cutmins in 15 minutes, when the employee is delivered between 0831 at 0835.

For example the table is like this


name empcode intimate outtime cutimins att_date


Sri 100-0815-1700 - 04/10/2010


SS 101 0832 1715 * 04/10/2010

102 0834 1722 mm * 10-04-2010



in this situation, I need to write an update statement how are employees comes between 0831 and 0835 I need to update in 15 min


Thanks in advance

Srikkanth.M

Srikkanth.M wrote:
Here I use time so if need to upgrade 15 min so I need to use 24 * 60 for 15 adding in the column;

What do you mean by that?

And another question if there is a value already in the cutmin IE 30 then while I am on day 15 if it is possible to add older value and update as 45

and Yes, you can do it,

update daily_attend set cutmins=nvl(cutmins,0)+15
where intime between 0831 and 0835

Tags: Database

Similar Questions

  • How to do the updates just announced for Photoshop CC?

    How can I get updates just announced for Photoshop CC because my version is 14.2.1 x 64 and also shows to date. However, there is no sign of the new direction selection tool or fuzzy, etc. in the program.

    You should have seen a lot of updates in the application creative cloud with the label '2014' after them. Once download you them, they are actually quite distinct from the installed instances, so you will have both 'Adobe Photoshop CC' and 'Adobe Photoshop CC 2014 "on your system. Be sure to run the version of 2014 to see what's new.

  • Query for this scenario

    Name ID Startdate Enddate
    AMIT a 1st October 09 3 October 09
    AMIT a 3 October 09 5 October 09
    AMIT B 5 October 09
    BANU C 1st October 09 3 October 09
    BANU D 3 October 09
    CAREN E 1st October 09 2 October 09
    CAREN F 2 October 09 5 October 09
    CAREN E 5 October 09

    Required result

    Name ID Date
    AMIT 5 October 09
    AMIT B
    BANU C 3 October 09
    BANU D
    CAREN E 2 October 09
    CAREN F 5 October 09
    CAREN E

    My required result is I should list the names that changed the ids.for for example if amit is having has as ID in the third row the name should not be displayed in the result itself because amit is having the same ID.
    How to query for this scenario?
  • May not know how to check the updates of Firefox for Ubuntu

    I'm under "Firefox 3.6.13 Mozilla Firefox for canonical Ubunto - 1.0". How can I verify updates? Here the user manual in the help site says to look for updates in the Help menu article, but there is no such a. I can't find it in the Tools menu or Edit > Preferences. Where he's hiding?

    Your user agent shows the version Ubuntu/10.04 (lucid) brand.

    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13
    

    These versions can only be updated from the repositories via software update and not via Firefox, so you have to check this and expect Ubuntu offers a such update.

    If you want to update yourself you need to install Firefox by downloading the relaes official of the Mozilla server.

  • How can I dynamically update records LCO for multi-inquiry forms in E10?

    We have recently upgraded to E10. The migration has apparently disappeared with a few hiccups, but there is no major errors.

    However, today, I came across an obstacle that I can't solve. We have landing pages that allow people to select several products on the form (e.g. Product1, Product2, etc.). The shape will collect the data and send the call suitable for SFDC.

    Here's where our business processes creates conflicts. In E9, we were allowed to update the table of perspective and Exchange on product codes based on the values of the HTML form. E10, we use CDO and update processing step allows more 'static values' of allowing only the mapped data. I found that the "CDO - with Custom Values update" will work but only for a CDO row. Our business process requires registration BY product. If you select three products, you will have three rows of data, each with unique product codes.

    How can I get on the ORDER of one-to-many of these products? Such a thing is possible in E10? Please note that we use the unique key in our CDO to allow one-to-many recordings.

    Todd

    We found a solution for this, and it's far from perfect. You must create a 'form CDO update' step computer and map your fields. This seems to give you a "handle" to the object; to update a field in a static value, you must insert another stage of "Update CDO of Custom Value" * immediately * after that to set your domain to the desired value. Order is very important. It seems to work.

    However, there is a problem. You cannot change the order of the processing steps. If get out you them in some sort of command, you must remove and re-do them in order. Eloqua has promised this be fixed in a next version...

    Hope this helps someone else!

    Todd

  • Pavilion a010dx x 360: update not validated for this computer

    Whenever I hit find my product and install a graphics driver for the pc detected, the finished download it is not validated for this computer.

    Johan1031 wrote:
    How can I change factory OS? If not, how am I supposed to update my drivers

    HP computers - get HP recovery disks or HP USB recovery disc
    Read this before ordering your recovery discs! (United States and Canada only)
    HP computers - performing a recovery of HP (Windows 8) system
    HP computers - using the Microsoft System Restore (Windows, 10, 8)

  • Bring back to the world of today.  I can't update unavailable because 'Update.' opening for this Apple ID  I know my current Apple ID and this iMac was bought with that and I thought opening no way of knowing what ID has been used?

    I have an iMac with an opening.  I get the error "update not available with this Apple ID".  I remember that I had a different ID years ago.  I can not find via my current emails.  In any case to find the ID who purchased this application?

    https://www.Apple.com/Asia/support/Mac/app-store/contact/

  • Suggestions for this scenario...

    Hello. I have a table named call_queue and call_history:
    Call_Queue:
    Name                                      Null?    Type
    ----------------------------------------- -------- -------------
    PARTICIPANT_ID                            NOT NULL VARCHAR2(10)
    LAST_ACCESS_DT                                     DATE
    LAST_ACCESS_BY                                     VARCHAR2(15)
    CREATE_DT                                 NOT NULL DATE
    CREATE_BY                                 NOT NULL VARCHAR2(15)
    MODIFY_DT                                 NOT NULL DATE
    MODIFY_BY                                 NOT NULL VARCHAR2(15)
    CALL_STATUS                               NOT NULL VARCHAR2(3)
    PARTICIPANT_TYPE                                   VARCHAR2(3)
    
    
    Call_History:
    Name                                      Null?    Type
    ----------------------------------------- -------- --------------
    PARTICIPANT_ID                            NOT NULL VARCHAR2(10)
    CALL_STATUS_IND                                    VARCHAR2(2)
    COMMENTS                                           VARCHAR2(100)
    CREATE_DT                                 NOT NULL DATE
    CREATE_BY                                 NOT NULL VARCHAR2(15)
    MODIFY_DT                                 NOT NULL DATE
    MODIFY_BY                                 NOT NULL VARCHAR2(15)
    On my request when a user interacts with the registration of Call_Queue of a Participant_Id I want to display the 5 most recent records of Call_History for this simple Participant_Id. looks pretty if I create a relationship master / detail between the two blocs.

    But my requirement is also that whenever I have show the Call_History more recent 5 records that I also provide an empty Call_History record to the user if the user can insert a new record of Call_History without having to 1) press a button insert or select a menu item. or (2) go down the 5 records displayed in order to insert the new record. In addition, I don't want the user to have to redundant enter the Participant_Id in the new record of Call_History.

    Is it possible to have an empty folder (always empty and ready for the inset) displayed at the top of my 5 most recent recordings Call_History? What is the best way to handle this?

    Two options in my opinion:
    1. take the WE-PEOPLE-DETAILS-trigger on the master-block and have an extra CREATE_RECORD with a GO_BLOCK in there.
    2. create an additional block that is similar to the call_history block and put its fields to the position above your call-history-block "real". Who use new block to insert it.

  • How to make the simple query for this scenario... ?

    Hello:

    Dummy table provided for simplicity.

    It's my database table (Table_A)

    Date1 | Plane1 | Category | Duration | Fees
    01/01/2011 | A | Gold | 5. 2
    01/01/2011 | C | Money | 4. 11
    01/01/2011 | B | Gold | 6. 2
    01/01/2011 | D | Gold | 2. 4
    01/01/2011 | B | Gold | 3. 5
    01/01/2011 | A | Money | 4. 8
    01/01/2011 | B | Gold | 1. 3

    I need to write a query to get the result below:

    Date1 | Plane1 | Sum_Duration | Sum_Charge | Sum_Gold_Duration | Sum_Gold_Charge | Sum_Silver_Duration | Sum_Silver_Charge
    01/01/2011 | A | 9. 10. 5. 2. 4. 8
    01/01/2011 | B | 10. 10. 10. 10. 0 | 0
    01/01/2011 | C | 4. 11. 0 | 0 | 4. 11
    01/01/2011 | D | 2. 4. 2. 4. 0 | 0

    This query will provide the 1st four columns:

    SELECT Date1,
    base1,
    Sum (Duration) Sum_Duration,
    Sum (load) Sum_Charge
    FROM TABLE_A
    GROUP BY date1, rarateplan

    But I need to know how to get the rest of the columns (i.e. Summary according to categories; from 5 to 8 columns)? Is this can be done in a single query without writing subqueries?

    Please let me know, (with code), the best way.

    Thank you-
    Tanvir

    Use like this:

    SELECT Date1,
    base1,
    Sum (Duration) Sum_Duration,
    Sum (load) Sum_Charge,
    SUM (decode(Category,'Gold',duration,0)) Sum_Gold_Duration,
    SUM (decode(Category,'Gold',charge,0)) Sum_Gold_charge,
    SUM (decode(Category,'Silver',duration,0)) Sum_Silver_Duration,
    SUM (decode(Category,'Silver',charge,0)) Sum_Silver_charge
    FROM TABLE_A
    GROUP BY date1, rarateplan

    Published by: SANT007 on August 11, 2011 11:04

  • Try to update windows - (8007000D - has no error code) stops windows completely updated. Fixes for this error code?

    I tried to completely update of windows, but the 8007000D error code keeps causing the update fails. The update is for - Cumulative Update for Media Center for Windows Vista (KB982480). Could you be it someone please let me know if there are patches to get rid of this error, or get the update to pass by? Thank you!

    Hello

    You are able to install some other updates?

    I suggest you follow these methods and check.

    Method 1: Run the fixit.

    The problem with Microsoft Windows Update is not working:

    http://support.Microsoft.com/mats/windows_update/   

    Method 2: Run the clean boot and install the updates.

    To do this, follow the steps in this link:

    http://support.Microsoft.com/kb/929135

    NOTE: After you check the clean boot feature configure Windows to use a Normal startup using step 7 proposed in the above mentioned link.

    If the method above does not work, proceed to the next method.

    Method 3: download and install the Cumulative update for Media Center for Windows Vista (KB982480) from this link.

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=6256

    If the method above does not work, proceed to the next method.

    Method 4: Rename the Software Distribution folder.

    Rename the temporary Windows Update Software Distribution folder. To do this, follow these steps:

    1. Open an administrative command prompt window.
    2. Run the following commands and press ENTER after each command:
      1. Net stop wuauserv
      2. CD %SystemRoot%\System32
      3. Ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
      4. Net start wuauserv
    3. Try to install updates again.

    Important: When you use this method, the following problems occur:

    ·         Updates that are currently downloaded but which have not yet been installed must be downloaded again by using Windows Update or Microsoft Update.

    ·         When you remove the Software Distribution folder, your download history is deleted.

    ·         If you currently receive updates from Microsoft Update and Windows Update, you will need to reselect this option from the Windows Update Web site.

    Note If the problem is resolved and you can successfully download and install the updates, you can safely remove the SoftwareDistribution.old folder to recover disk space.

    I hope this helps!

  • I put time and days of updates, but it installs ever at that time here. It always seems to install at the same time I don't want to have installed updates. a reason for this?

    can someone give me a solution to this problem of update?

    Hi Claytoncharles,

    1. When you have planned the time and days? It is in the automatic updates or in Task Scheduler?

    You can program in Task Scheduler and check.

    For more information, see the link:

    http://Windows.Microsoft.com/en-us/Windows-Vista/schedule-a-task

    Hope this information is useful.

  • How to use a regular expression using the model concept and match for this scenario?

    Hi guys,.

    I have a string "we have 7 tutorials for Java, 2 tutorials for Javascript and 1 tutorial for Oracle.

    I need to replace the numbers based on the condition below.

    If more then 5, replace with many

    If less than 5 then replace by a few

    If it is 1, replace by "only one".

    Here is my code, I'm missing the part equates to replace the numbers could one of please help me solve you this.

    private static String REGEX = "(\\d+)"; "

    private public static String INPUT = "we have 7 tutorials for Java, 2 tutorials for Javascript and 1 tutorial for Oracle."

    String pattern = "(.*) (\\d+)(.*)";

    private static String REPLACE = "replace with many";

    Public Shared Sub main (String [] args) {}

    Create a model object

    Model r = Pattern.compile ("REGEX");

    Now create object match.

    Matcher m = r.matcher (INPUT);

    Change the value to 7 by the replacement string

    How to assimilate (\\d+) greater than a number and use the code below.

    ENTRY = m.replaceAll (REPLACE);

    Print the final result;

    System.out.println (Input);

    Thank you and best regards,

    Hello

    Try the following makes use of 'appendReplacement"instead with the methods 'start' and 'end' to locate and check the search string"regExp"before dynamically set the string"replace ":

    String regExp = "\\d+";
    String input = "We have 7 tutorials for Java, 2 tutorials for Javascript and 1 tutorial for Oracle";
    String replace;
    Pattern p = Pattern.compile(regExp);
    // get a matcher object
    Matcher m = p.matcher(input);
    StringBuffer sb = new StringBuffer();
    while (m.find()) {
       Integer x = Integer.valueOf(input.substring(m.start(), m.end()));
       replace = (x >= 5) ? "many" : (x == 1) ? "only one" : "few";
       m.appendReplacement(sb, replace);
    }
    m.appendTail(sb);
    System.out.println(sb.toString());
    

    HTH.

    Kind regards
    Rajen

    PS: Please mark as answer/useful if it solves your problem to the benefit of all members of the community.

  • How can I get the serial code for this product

    Hi, I can't find serail number to install my new photoshop elements it is not on the package, can anyone help thanks

    Serial number FAQ recovery process. Point-of-sale activation products

    Mylenium

  • What is the good vShield produced for this scenario?

    Currently we are trying to design a solution for the creation of segmentation of traffic within the analogue of the virtual environment how it is segmented by VLANS on the same physical network.

    (see previous dissusion)

    http://communities.VMware.com/thread/284130?TSTART=0

    I just understand that vShield app provides this feature through "security groups", which can be used to create logical groupings of VMS in the sphere that cannot communicate with other virtual machines in their own group.  Indeed, security groups define the boundaries of a broadcast in the same way that one domain VLAN on the physical layer, but in a solution that is much more flexible and configurable.

    As one of the objectives was not to have to use NAT or a virtual firewall, we did not use the vShield Edge method to create these groups that would require the VM must have IP addresses internal used inside the virtual firewall and external IP addresses used outside-each VM should have only a single IP address.

    Therefore analyze the three different products more vShield that I came to this agreement given the above requirements

    -vShield App - would work

    -vShield Edge - does not work

    -vShield Zones - don't think that will work

    So now the question that remains is - App vShield does not come with the vmware license even more complete but must be purchased separately.  vShield Zones comes with our version of the license (Enterprise version).

    VShield Zones or any other free product is possible to operate in a manner similar to App vShield to meet these requirements without additional cost?  In addition, we want to continue to continue to use HA and FT without the solution we deploy inhibiting FT or HA.

    Thanks again for your contribution.

    Hello

    You must understand how each of these products...

    App vShield uses VMsafe to implement a FW just before each vNIC (on the penetration of the VM) and by consequence just after the vNIC on the virtual machine outgress. This FW is located between the vNIC and the vSwitch Portgroup to which it is attached. VMsafe devices (if App, Altor Networks, Checkpoint, reflex Systems, IBM VSS or TrendMicro Deep Security) require a driver must be installed in the vmkernel (hypervisor). So there are NO free versions of this feature. VMware controls which can be placed within the hypervisor, etc.. Indeed, VMsafe-net provides a vNIC of packet filtering firewall.

    vShield Zones, vShield Edge provide a firewall between two exchanges on the same vSwitch or between two different vSwitches of packet filtering. Areas and Edge are based on firewall mechanisms online m0n0wall, Smoothwall, ipcop, etc..

    If you design with these two points in mind. VMsafe-net applications as App vShield are firewall vNIC while vShield Zones/Edge are by Portgroup firewalls that include a certain vNIC.

    So, if you had several areas of trust and I wanted to use vShield App, you define the font by vNIC (and therefore your virtual machines within a Zone of confidence could live almost anywhere, you depend on VMsafe-net to do most of the work).

    However, with vShield Zones you define the strategy by combination portgroup/vSwitch. Their own vSwitch/portgroup would live in effect in each zone of confidence. When you configure this type of zone of confidence, in fact, I prefer vSwitch. Essentially, each host would have a vSwitch for each zone of confidence, and each zone of confidence would be protected by vShield Zones.

    You must decide at what granularity you want to define a strategy for the areas of your confidence. The vSwitch or the vNIC.

    Best regards
    Edward L. Haletky VMware communities user moderator, VMware vExpert 2009, 2010

    Now available: url = http://www.astroarch.com/wiki/index.php/VMware_Virtual_Infrastructure_Security'VMware vSphere (TM) and Virtual Infrastructure Security' [/ URL]

    Also available url = http://www.astroarch.com/wiki/index.php/VMWare_ESX_Server_in_the_Enterprise"VMWare ESX Server in the enterprise" [url]

    Blogs: url = http://www.virtualizationpractice.comvirtualization practice [/ URL] | URL = http://www.astroarch.com/blog Blue Gears [url] | URL = http://itknowledgeexchange.techtarget.com/virtualization-pro/ TechTarget [url] | URL = http://www.networkworld.com/community/haletky Global network [url]

    Podcast: url = http://www.astroarch.com/wiki/index.php/Virtualization_Security_Round_Table_Podcastvirtualization security Table round Podcast [url] | Twitter: url = http://www.twitter.com/TexiwillTexiwll [/ URL]

  • I want the query for this scenario will be someone help me?

    I have two tables table of markets and purchase...
    When a record is there in the market table, this means that pure Price shud be replaced by Mkt Price
    When I take the records between two particular date
    I shud get the mkt price if a record exists for a date between and to date in the table of mkt else I shud get price pure himself.
    How can I do this?
    Table Purchase
    Code date pure price
    A 2 01/01/2010
    A 3 01/05/2010
    A 4 10/01/2010
    A 6 15/01/2010
    B 15 15/01/20110


    Table of markets

    Code Date Mkt price
    A 10 01/05/2010
    A 5 01/12/2010

    When I take the records between 01/01/2010 and 01/04/2010

    my result should be as follows
    A 2 01/01/2010


    01/01/2010 and 01/10/2010

    A 01/01/2010 * 10 *.
    A 01/05/2010 * 10 *.
    A 4 10/01/2010

    01/01/2010 and 01/15/2010

    A 01/01/2010 * 5 *.
    A 01/05/2010 * 5 *.
    01/10/2010 * 5 *.
    A 6 15/01/2010
    B 15 15/01/20110

    Try this... NVL may not work in a scenario... also, if date of purchase is greater than the date of the contract, then he should show the purchase price and no market prices.

    PRAZY@11gR1> exec :from_date:='01/01/2010';
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    PRAZY@11gR1> exec :to_date:='04/01/2010';
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    
    select a.code,a.pur_date,
    case when pur_date <= mkt_date then
         DECODE(mkt_price,0,pur_price,mkt_price)
    else
         pur_price
    end  price
    from purchase_table a left outer join
    (
         select code,mkt_price,mkt_date from
         (
              select code,
              mkt_price,mkt_date,
              row_number() over (partition by code order by mkt_date desc) rn
              from market_table
              where mkt_date between to_date(:from_date,'DD/MM/YYYY') and to_date(:to_date,'DD/MM/YYYY')
         )
         where
         rn=1
    ) b
    on a.code = b.code
    where a.pur_date between to_date(:from_date,'DD/MM/YYYY') and to_date(:to_date,'DD/MM/YYYY')
    order by a.code,a.pur_date
    /
    
    C PUR_DATE       PRICE
    - --------- ----------
    A 01-JAN-10          2
    
    Elapsed: 00:00:00.00
    PRAZY@11gR1> exec :to_date:='10/01/2010';
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    PRAZY@11gR1> /
    
    C PUR_DATE       PRICE
    - --------- ----------
    A 01-JAN-10         10
    A 05-JAN-10         10
    A 10-JAN-10          4
    
    Elapsed: 00:00:00.00
    PRAZY@11gR1> exec :to_date:='15/01/2010';
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.01
    PRAZY@11gR1> /
    
    C PUR_DATE       PRICE
    - --------- ----------
    A 01-JAN-10          5
    A 05-JAN-10          5
    A 10-JAN-10          5
    A 15-JAN-10          6
    B 15-JAN-10         15
    
    Elapsed: 00:00:00.01
    PRAZY@11gR1>
    

    Decode added printing the purchase price if the market price is 0.

    HTH,
    Prazy

    Published by: Prazy on April 21, 2010 15:32

Maybe you are looking for