Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i have fields date_lastupdate,peiodicity(data type is interval),due_date.
What i'm trying to do is
when the date_lastupdate changes ,periodicity(which may be different for each row),due_date field gets updated by following formula
due_date=date_lastupdate+periodicity

when i queried with
select areaName,due_date from updation where due_date=date_lastupdate+periodicity



I get only columns areaName,due_date with no records...
plz help me

Thanks in advance

Hi patel
thanx for replying
it was my typing error
i did the same as u told
but only the column names with no records were returned.
Posted
Updated 21-Sep-11 5:02am
v2

Try this
SQL
select areaName,due_date from updation where due_date=date_lastupdate+periodicity


Why do you use due_date=due_date+periodicity?
 
Share this answer
 
Comments
shanboy 21-Sep-11 11:04am    
Hi patel
thanx for replying
it was my typing error
i did the same as u told
but only the column names with no records were returned.
If you are trying change the due_date field you should be using an update[^] statement.
 
Share this answer
 
v2
Comments
shanboy 22-Sep-11 10:48am    
Hi Andre
thanx
It works
i thought by combining select and the formula in the statement i could get the result
thanx a lot...
shanboy 22-Sep-11 10:49am    
Further i'm trying to use a trigger to update as soon as somre updation takes place

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900