Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
bstaib — — source: Informix-list mailing list archive (1991-1998)
I am trying to formulate a SQL query to retreive rows by comparing two
DATE columns. The end result is to compare score values from a month in
the current year to a month in the previous year. While year and month
are obviously easy to identify, the particular day value may vary from
year to year (the last fiscal day of the month for Aug of 1997 may have
been the 27th and in 1996 it may have been the 30th).
"where date_column = current - 1 units year"
is not what I'm looking for because that would only match 8/27/97 to
8/27/96 and not any other days in Aug, 96. I've tried some DATETIME
formatting but my syntax seems to be off.
Any suggestions appreciated.
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.