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.
Mars Chen, on IDS 11.5, wanted a select returning rows whose datetime column was more than 30 seconds old. Fernando and Jack Parker suggested comparing inserttime with CURRENT YEAR TO SECOND - 30 UNITS SECOND. Art Kagel suggested (current - inserttime) > INTERVAL (30) SECOND(9) TO SECOND. No confirmation of which was used.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Greeting !!
In IDS 11.5 running in Linux , I need a function in select sql which get
datetime field < "current - 30 seconds" , for example :
select * from orderrecord
where (current - inserttime) > 30 secs .
What this sql do , is to get all data from orderrecord
whose inserttime is 30 seconds ago , I know there are several functions
about datetime field , but can not figure out which one can satisfy my needs,
any advice , comments are welcome , thanks !!!
SELECT * FROM orderrecord
WHERE inserttime < CURRENT YEAR TO SECOND - 30 UNITS SECOND;
Regards.
On Mon, Jan 16, 2012 at 12:43 AM, MARS CHEN <hedgezzz@yahoo.com.tw> wrote:
> Greeting !!
>
> In IDS 11.5 running in Linux , I need a function in select sql which get
> datetime field < "current - 30 seconds" , for example :
>
> select * from orderrecord
> where (current - inserttime) > 30 secs .>
> What this sql do , is to get all data from orderrecord
> whose inserttime is 30 seconds ago , I know there are several functions
> about datetime field , but can not figure out which one can satisfy my
> needs,
> any advice , comments are welcome , thanks !!!
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--20cf303b42d3d4bfe104b69b31b9
select *
from orderrecord
where (current - inserttime) > INTERVAL (30) second(9) to second;
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Sun, Jan 15, 2012 at 7:43 PM, MARS CHEN <hedgezzz@yahoo.com.tw> wrote:
> Greeting !!
>
> In IDS 11.5 running in Linux , I need a function in select sql which get
> datetime field < "current - 30 seconds" , for example :
>
> select * from orderrecord
> where (current - inserttime) > 30 secs .>
> What this sql do , is to get all data from orderrecord
> whose inserttime is 30 seconds ago , I know there are several functions
> about datetime field , but can not figure out which one can satisfy my
> needs,
> any advice , comments are welcome , thanks !!!
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae93406531f44e904b69c3e14
↪ replying to MARS CHEN
Jack Parker — — source: IIUG Forums & Mailing Lists
select * from orderrecord
where datetime_col < (current year to second - 30 units second)
j.
On Jan 15, 2012, at 7:43 PM, MARS CHEN wrote:
> Greeting !!=20
>=20
> In IDS 11.5 running in Linux , I need a function in select sql which =
get=20
> datetime field < "current - 30 seconds" , for example :=20
>=20
> select * from orderrecord=20
> where (current - inserttime) > 30 secs .=20>=20
> What this sql do , is to get all data from orderrecord=20
> whose inserttime is 30 seconds ago , I know there are several =
functions=20
> about datetime field , but can not figure out which one can satisfy my =
needs,=20
> any advice , comments are welcome , thanks !!!=20
>=20
>=20
> =
**************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20=
>=20
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.