updating column automatically based on system date

updating column automatically based on system date

hi,

can any one give solution for my question

i have a table called leave balanced(leave-id,leave balance,etc are column),in leave balance column each employee has some leave balance (like 4,5,8 etc)i need to add this leave-balance to another column(that also have common value like 25) i need to update this new column based on system time at the end of 31st December at 12.00am.

View Answers

October 21, 2010 at 4:19 PM

Hi,

You can't ask the database to update the value at the end of month. Instead write a program and then run it at 31st December 12.00am and then execute the following query:

update leave_balance set newcolumn=leave balance;

You can also run the program through Quartz scheduler or cron job scheduler.

Thanks









Related Tutorials/Questions & Answers:
updating column automatically based on system date
updating column automatically based on system date  hi, can any one...(that also have common value like 25) i need to update this new column based on system...,leave balance,etc are column),in leave balance column each employee has some leave
How automatically calculate age based on date of birth and current date using jsp and servlet?
How automatically calculate age based on date of birth and current date using jsp and servlet?  when user enters the Date of birth in one textbox then automatically age will be display on another textbox. event:Onlick Event
Advertisements
how to get current date without system date
how to get current date without system date  is there any possiblity to get current date instead of system date in Java, as i dont want to change date in program and if i change date in OS automatically change in program also
How to send Email automatically On Daily Basis Using Systems Date.
How to send Email automatically On Daily Basis Using Systems Date.  Hello Sir, I am working on a project in which i have to send emails automatically based on system dates with attchements .Kindly give me the code
getting current date without using system date - Date Calendar
getting current date without using system date  I want to get the current date but the Java code should not get System date as Current date. Pleae help me in getting current date without using system date. thanks in Advance
how to take system date in java servlet?????
how to take system date in java servlet?????  how to take system date in java servlet?????   Hi Friend, Try the following code:ADS...(); long time = System.currentTimeMillis(); Date date = new Date(time
JSP:How to get year of system date - Date Calendar
JSP:How to get year of system date  Please tell me how to get year of system date; I am doing import java.util.*; Date d = new Date(); d.getYear(); some times it reture 110, & some times 108 please help   Hi
store current system date in to database - Development process
store current system date in to database  Hi,this is my code . here iwant to store current system date in to database and want to store subdept..."].elements["combo2"].options.length=0; for (var i=0;i<% java.util.Date date
coding for updating profile
coding for updating profile  coding for updating profile
How to automatically change the value of the textbox based on the dropdown list?
How to automatically change the value of the textbox based on the dropdown list?  I want to know how to automatically change the value of price...'}); $('#inlineDatepicker').datepick({onSelect: showDate}); }); function showDate(date) { alert
date
date  can u tell me how to calculate difference between a user provided date and the system date in java
date
date  can u tell me how to calculate difference between a user provided date and the system date in java
date
date  i want difference between the date entered in a jtextfield and the system date in java
Web-based system development
Web-based system development  I have a system written in java application.my lecturer asks me to do in web-base. what should i do?what should i have and what should i know? i have read that the best architecture is 3-tier
Mysql Date Order By
return you the records from a table in the ascending order by column date... Mysql Date Order By       Mysql Date Order By is used to sort the records of the table by specific
Updating log4j programatically
Updating log4j programatically  Is there a ready made utility which I can use to edit the log4j.xml programmatically
updating & deleting an employee
updating & deleting an employee  can anyone help out me please? advance thanks warm regards
System
System  What is System in System.out.println() method? Is it a Class or a Package
Getting the current date
date of the system. In this section, through the given program you can get the current date in the proper format (Day/Month/Year). This program shows... Getting the current date     
date
database table name birthday (DOB date); dob with DATE data type in database while...=d.getTime(); java.sql.Date date = new java.sql.Date(t); try { System.out.println(date); Class.forName("oracle.jdbc.OracleDriver"); con
date
date   how to insert date in database? i need coding
Inser date in database - Development process
Inser date in database  Hi, In the follwing code i want to store system date in to database.First column as date field and Service_No ,UserName,CabinetSerialNo, ......... Thanks Prakash insert.jsp
updating a table in a database - SQL
updating a table in a database  give me complete source code in java to execute the sqlquery such that (update table_name set phone no=? where cous_id=?). or in simple way give me source code to update my table in MsAccess
Updating using AngularJS
Updating using AngularJS  Shopping.html <!DOCTYPE HTML PUBLIC... one more button for updating items in the table for Updating Items in Shopping.html. On clicking updating button for each row ( as like Remove button in each
date
date  how to insert date using html through the combobox
date
date  how to insert date using html through the combobox
date
date  how to insert date using html through the combobox
date
date  how to insert date using html through the combobox
DATE
DATE  I have the following as my known parameter Effective Date... of calcultion starts My question is how to find the date of Thursday This cycle repeats based on every cut off day   Here is an example that displays
Updating user profile
Updating user profile  how should i provide user to update his profile with edit option including entered data by user should be shown in jsp page fileds   The given code retrieve data from database and display
column matrix
column matrix  columan wise total matrix
column matrix
column matrix  columan wise total matrix
Need to get the Data based on Date
Need to get the Data based on Date  Hie , I am having a criteria where i need to get the data based on date . I have written the query as "from Balance as b where b.date like ?" But the date field in DB is in datetime2 format
php create pages automatically
php create pages automatically  How to create pages automatically in PHP
MySQL Column Type Database
of column in MySQL . MySQL supports the numeric type , Date and time type, and String... MySQL Column Type Database     ...,' value 2,' .....) 1 to 8 Byte 0 64 MySQL Store the Date
sorting folders automatically
sorting folders automatically  i want to sort folders automatically,let say the folders to be displayed in a webpage(hyperlinked to its resource... be done automatically.whenever a folder is created it should automatically get
audio file to play automatically
audio file to play automatically  I want to get an audio file to play automatically when someone visits my site
Updating multiple value depending on checkboxes
Updating multiple value depending on checkboxes  Hi .. I want to Update the multiple values of database using checkboxes and want to set the session for selected checkboxes..? please answer if any one knows as soon as possible
Check Date in PHP
Check Date in PHP The Checkdate()ADS_TO_REPLACE_1 The PHP Checkdate function is used for validating the system date. It validate the Gregorian date. It returns 'True' if finds the specified date valid, otherwise it returns false
Updating from MySQL 5.0 to 5.5 cPanel
Updating from MySQL 5.0 to 5.5 cPanel   Updating from MySQL 5.0 to 5.5 cPanel
Blob column
Blob column  Hi all... How to store an excel file in Blob column? I m using oracle 11 g database
Problem in updating query in Hibernate - Hibernate
Problem in updating query in Hibernate  Hi, I have used a query to update the existing columns of one table. The query updates the records in the main table but it does not update the tables that are mapped from the main table
Flash based Chat System - WebSevices
Flash based Chat System  Hi I would like to ask is it advisable putting the chat inside the Flash (integrated with the video), or putting it outside the the Flash using XMPP embedding in a website. What issues / pros
Column select
Column select   How i fetch Experience wise resume?   Create a column experience which consist of only two values either yes...; OR Create a column experience which consist of integer values, shows how many
Date & Time
Date & Time  How to insert System Date & Time in MS-ACCESS using Java
Date & Time
Date & Time  How to insert System Date & Time in MS-ACCESS using Java
multimodal biometric system based on palmprint and iris
multimodal biometric system based on palmprint and iris  sir, i need a source code for my project "fusion technique of palmprint and iris using LBP and Fractal Analysis method
Mysql Date Format codes
Mysql Date Format codes       The Tutorial illustrate an example from 'Mysql date format'. In this example we let you know ,how to display the current date and time in the system
How to Delete a column and Add a new column to database
How to Delete a column and Add a new column to database   How to Delete a column and Add a new column to database   Hi, The following query is executed for add and delete a column in a table-ADS_TO_REPLACE_1 for drop
how to Change column name and Make a unique column.
how to Change column name and Make a unique column.   how to Change column name and Make a unique column.   Hi, Following queries are used to rename a column and to make a column unique.ADS_TO_REPLACE_1 for rename

Ads