Date query works in ServerStudio not with dbaccess
Posted in 2007
Topics: Server Administration, Data Types & Schema Design
When I run the following query in ServerStudio I get no errors:
select (today - (today - 10 units day ))::interval second(9) to
second::varchar(30)::integer avg_session
from table (set{1})
;
I get the expected answer - 86400
However when I run this using dbaccess I get a character conversion error:
===
> select (today - (today - 10 units day ))::interval second(9) to
second::varchar(30)::integer avg_session
> from table (set{1});
avg_session
1213: Character to numeric conversion error
Error in line 2Near character position 20
===
I am using Informix 9.x on Linux. I am very knowledgeable about Oracle, very
new to informix. Is there any dbaccess setting I am missing?
Thanks for your help,
John
IDS 10 works for this( no special dbaccess setting).
Frank
On 10/10/07, J M <jmathews@wagerworks.com> wrote:
>
> When I run the following query in ServerStudio I get no errors:
>
> select (today - (today - 10 units day ))::interval second(9) to
> second::varchar(30)::integer avg_session
>
> from table (set{1})
>
> ;
> I get the expected answer - 86400
>
> However when I run this using dbaccess I get a character conversion error:
> ===
> > select (today - (today - 10 units day ))::interval second(9) to
> second::varchar(30)::integer avg_session
> > from table (set{1});
>
> avg_session
>
> 1213: Character to numeric conversion error
> Error in line 2> Near character position 20
> ===
>
> I am using Informix 9.x on Linux. I am very knowledgeable about Oracle,
> very
> new to informix. Is there any dbaccess setting I am missing?
>
> Thanks for your help,
>
> John
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Thanks for letting me know that it works on IDS 10. I am having this problem in version 9.4. We are not planning to move to 10 anytime soon. I am not sure if this is a bug or if I am missing some config setting.