Re: Problem with Intervals
Posted in 1998
ccremid wrote: > > Hello: > Can any of you, Informix gurus, provide an explanation why: > > SELECT current year to day - interval(99) day to day > from systables where tabid = 1 > Works just fine, but > > SELECT current year to day - interval(100) day to day > from systables where tabid = 1 > Fails with error -201 (Syntax error) > > As a mater of fact any time that interval goes over 99 > fails regarless of what the qualifier is. That's because the default number of digits is 2. Try: SELECT CURRENT YEAR TO DAY - INTERVAL(100) DAY(3) TO DAY FROM systables WHERE tabid = 1 Hope that helps, -- Mark. +----------------------------------------------------------+-----------+ |Mark D. Stock - Informix SA http://www.informix.com |//////// /| |mailto:mdstock@informix.com FAQ http://www.iiug.org |///// / //| | +-----------------------------------+//// / ///| | Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////| | Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////| |Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////| +----------------------+-----------------------------------+-----------+