SQL Query over I-STAR
Posted in 1993
What gives here?
I have two systems each running Informix OnLine and Informix Star (5.0).
The following query runs just fine when executed locally on either
system:
select * from rate
where
counter_id = 61 and
timestamp > (current year to minute - interval(30) minute to minute)
(Note the two systems have the same schema). Timestamp is of type
"datetime year to second".
Now I try the same query from Machine A referencing the rate table on
Machine B using a synonym:
select * from remote_rate
where
counter_id = 61 and
timestamp > (current year to minute - interval(30) minute to minute)
and I get:
1261: Too many digits in the first field of datetime or interval.
Huh?
If I remove the "timestamp" search condition the query does indeed work
so the synonym and Informix STAR appear to be OK. And the timestamp
condition works fine as long as it is issued LOCALLY.
My only other idea was to check the clocks on the two systems and I
verified that they are synchronized down to the second (we run xntpd).
So what's my problem?
Ken Miles
HP Vancouver Division
kenm@vcd.hp.com