[SGVLUG] Can SQL even do this?
Emerson, Tom (*IC)
Tom.Emerson at wbconsultant.com
Wed Oct 29 10:43:52 PDT 2008
While I was fairly certain that some form of suitable date-manipulation
routines exist in various flavors of SQL, I just wasn't sure of the
/specific/ syntax ;)
However, what I felt was the bigger problem is how to determine the date
given a possible/arbitrary "skip this date" value in the
"blackout-dates" table -- maybe I'm thinking about this too linearly --
I'm pretty close to figuring out that a given event might fall on a
blackout date and adjust accordingly, but I have no idea what to do when
it was a PRIOR record that fell on such a date. (my brain doesn't
function on the same quantum-level as an all-in-one SQL select...)
> -----Original Message-----
> From: sgvlug-bounces at sgvlug.net
> [mailto:sgvlug-bounces at sgvlug.net] On Behalf Of Alan Horn
> Sent: Tuesday, October 28, 2008 8:38 PM
> To: SGVLUG Discussion List.
> Subject: Re: [SGVLUG] Can SQL even do this?
>
>
>
> On Tue, 28 Oct 2008, John E. Kreznar wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > "Emerson, Tom \(*IC\)" <Tom.Emerson at wbconsultant.com> writes:
> >
> >> I've got an "interesting" problem -- ... I'm not even sure how to
> >> convert "11/02/2008 + 3" to get "11/16/2008" ...
> >
>
> A quick net search turns up this :
> http://www.devshed.com/c/a/MySQL/Date-Arithmetic-With-MySQL/3/
>
> mysql has the DATE_ADD and DATE_SUB functions.
>
> They do what you would expect.
>
> Cheers,
>
> Al
>
>
More information about the SGVLUG
mailing list