Re: For Jonathan - or connect seems to be toasted again
Posted in 1993
Jack Parker (jparker@hpbs2561.boi.hp.com) writes:
> ----- Transcript of session follows -----
>421 rent2.informix.com (tcp)... Deferred: No route to host
><johnl@rent2.informix.com>... Deferred: No route to host
***************************************************************************
** Anybody mailing direct to Informix employees needs to use the address **
** form whoever@informix.com, not whoever@machine.informix.com. We have **
** just changed our mail routing and the new sendmail configuration **
** clearly isn't happy with these machine names. (I don't know why -- **
** it always used to ignore them.) I'm sorry for the trouble, but MIS **
** are aware of it and are trying to fix it. **
***************************************************************************
>>>That is not very nice.
>>You're not going to like it. Not at all...
>>
>>But (with DBDATE=dmy4/), these are all accepted:
>>
>>SELECT * FROM Table
>>WHERE Datetime_fld > EXTEND(DATE("05/05/1993"), YEAR TO SECOND);>>
>>SELECT * FROM TABLE
>>WHERE Datetime_fld > DATETIME(1993-08-31 00:00:00) YEAR TO SECOND;>>
>>SELECT * FROM TABLE
>>WHERE Datetime_fld > EXTEND(DATETIME(1993-05-05) YEAR TO DAY, YEAR TO SECOND);
>I figured this and have opted, in the next table where they are required,
>to keep date in a date field and time in a datetime field.
Good scheme.
>I could not get the first statement to work.
I beg your pardon -- neither can I. I copied them all out of a history
file, and didn't trim it enough. Sorry!
>I fear that I don't understand the third. Does this mean that the
>DATETIME (1993-05-05) is a year to day which is then EXTENDED to YEAR TO
>SECOND
Correct.
> - must be jack?
Eh? Please translate into British English.
>How to I get this to work from the form into a construct forming a legible
>where statement. Also - is it just me or do ":" and "|" not work - when I
>try them I get a fatal error.
Using I4GL-RDS 4.11.UC1 on a Sun, I used:
Form:
database svs
screen
{
[f000 ]
}
end
tables dt
attributes
f000 = dt.dt1;
end
I4GL:
database svs
main
define wh char(200)
open form f_xx from "xx"
display form f_xx
construct by name wh on dt.dt1
close form f_xx
clear screen
display wh
end main
Table:
create table dt (dt1 datetime year to second);
Using ".." because ":" can't be used -- it is a valid part of a
datetime/interval -- I got:
dt.dt1 between "1992-12-31 00:0:0" and "1993-12-30 0:0:0"
Using "|", I got:
dt.dt1 in ("1992-1-1 1:1:1","1993-12-31 2:2:2")
As you can see, I was being lazy in my typing. I have to suggest that the
problem has been fixed, but let me know if you're using 4.11.UC1 and still
run into the trouble.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>