From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com> |
Cc: | 'Doug McNaught' <doug(at)mcnaught(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: substitute variable in sql? |
Date: | 2002-10-29 17:05:49 |
Message-ID: | 20021029170549.GB5942@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Oct 29, 2002 at 11:35:42 -0500,
"Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com> wrote:
> --thanks for the reply
>
> --i just have an sql script that i launch
> --by hand (psql -U <user> -d <database> -f ./<script>)
>
> --the date is a rolling date which is supposed to
> --change every 3 months. and as variable 1 is moved
> --up every month, so should variable 2 move up every
> --month.
It sounds like you might be able to calculate the date based on the
current date. You would need to formula a precise rule for calculating
the two dates based on the date the script is being run. (And you may
still need another script if you need to be able to handle exceptions.)
If the script updates stuff than you may need to put in some extra care
in making sure that it can't be run twice or after skipping a time period
without some sort of override.
From | Date | Subject | |
---|---|---|---|
Next Message | Afra | 2002-10-29 17:26:48 | EXPLAIN times |
Previous Message | Bruno Wolff III | 2002-10-29 17:01:28 | Re: substitute variable in sql? |