Skip site navigation (1) Skip section navigation (2)

Re: calculation of pay based on dates

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: calculation of pay based on dates
Date: 2007-07-13 10:16:44
Message-ID: (view raw or whole thread)
Lists: pgsql-sql
On Friday 13 July 2007 11:12, Penchalaiah P. wrote:
> Hi ...
> I want to fix the pay based on joining date and antedate...antedate is
> the last date...
> Joining date is 01-07-2007
> Antedate is  04-07-2007..
> On joining date I will fix the pay but before fixing the pay I will
> check whether antedate is there or not, if its there then I will see
> difference between 2 dates..if difference is 2 years then I will fix the
> pay with increments...if difference is less than 2 years then I will fix
> the pay with out increments...
> Take an example of above 2 dates..there is no 2 years difference between
> two dates...
> 01-07-2007 I will fix the pay...after 3 days current date =
> again I have to fix the pay with out my intervention...
> Is there any jobs or schedules or triggers to call that function when
> current date and antedate is equal...
> Any one can help on this... I need it very soon....
> Regards
> Penchal

Surely this would easiest be done using a view rather than a trigger or 
function.  Simply have the salary calculated every time the view is selected.

Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     

In response to

pgsql-sql by date

Next:From: Radhika SambamurtiDate: 2007-07-13 20:01:21
Subject: Bitmap Index Scan
Previous:From: Penchalaiah P.Date: 2007-07-13 10:12:08
Subject: calculation of pay based on dates

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group