Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
SQL Date_Sub function in Informix
Name: skisalomon77 Date: April 1, 2008 at 14:17:37 Pacific OS: XP Pro CPU/Ram: Intel - 2GB Product: Dell Optiplex
Comment:
I'm trying to incorporate the date_sub/subdate function into the below query with an interval of 30 days. Does Informix support this function? Or does it go by another name? I'm using the Informix 3.33 32 bit driver. The below query works fine until I start using date_sub/subdate.
SELECT * FROM informix.table WHERE column < {fn CURDATE()}
Here's the full query, which doesn't work.
SELECT * FROM informix.table WHERE column < {fn DATE_SUB({fn CURDATE()}, INTERVAL 30 DAY)}
Name: nails Date: April 1, 2008 at 20:12:42 Pacific
Reply:
First, I'm not familiar the window's version of Informix - just the Unix version. I executed the following query from informix dbaccess:
select * from informix_table where column < today - 30
I'm assuming column is a date type and you are asking for all data less than 30 days ago. today is an internal informix function that returns today's date.
Summary: Please help.I have to write a function in C language. Here it is.Function must return integer number in which bits from position m to position n are set to 1. For example input number is 17,and bits o...