From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql@postgresql.org
Subject: Re: calculation of pay based on dates
Date: Fri, 13 Jul 2007 11:16:44 +0100
Message-ID: <200707131116.45147.gary.stainburn@ringways.co.uk> (raw)
In-Reply-To: <A70AE049E81A6A40879D5DC0AC8C38C9096184BA@venus.infics.com>
References: <A70AE049E81A6A40879D5DC0AC8C38C9096184BA@venus.infics.com>
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 =
> antedate...so 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gary.stainburn@ringways.co.uk
Subject: Re: calculation of pay based on dates
In-Reply-To: <200707131116.45147.gary.stainburn@ringways.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox