datetime sql question ,which function I can use
Posted in 2012
Topics: Platform-Specific Issues
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
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