How to create smart SQL group with older articles?

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Johan_A_M
Posts: 24
Joined: Thu Oct 19, 2017 8:30 am

How to create smart SQL group with older articles?

Post by Johan_A_M »

Hi!

I'm really bad at SQL so I'd love some help with this. I'm simply trying to create a group that will contain all articles older than let's say 25 years from "now". How would I do this?
Jon
Site Admin
Posts: 10202
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: How to create smart SQL group with older articles?

Post by Jon »

It's not possible now because of bug in the database engine that will cause a crash. This is fixed in the next update, though. Once it's out, if your date field contains just a year, this SQL will find references published on or before 1950.

cast(theDate as INT) <= 1950

Jon
Sonny Software
Post Reply