amethystct
Programmer
I have 2 questions.
I have a query that I need to return the difference between 2 dates. One is a timestamp field the other is a char field but it's in timestamp format.
First question is, is the extend the way I have it correct? It works but only if there's a value.
Second question is, isn't there a case statement for informix sql? If column is this do this otherwise do this? Whenever the charfield is null I get an sql exception and it stops processing. If the field is empty I just need to set the diff field to 0.
Thanks!
select (time1 - (extend(charfield)) diff
from tablename
I have a query that I need to return the difference between 2 dates. One is a timestamp field the other is a char field but it's in timestamp format.
First question is, is the extend the way I have it correct? It works but only if there's a value.
Second question is, isn't there a case statement for informix sql? If column is this do this otherwise do this? Whenever the charfield is null I get an sql exception and it stops processing. If the field is empty I just need to set the diff field to 0.
Thanks!
select (time1 - (extend(charfield)) diff
from tablename