rstrdate() function problem
Posted in 2007
Topics: Data Types & Schema Design
hello everyone
im recentrly have an strange problem with rstrdate()
i have a column A varchar 20,1
and i must compare it with a column B date
to compare it, i use rstrdate() function and im very happy with that
now my problem start when execute the query from a procedure.
it have the next error
674: Routine (rstrtdate) can not be resolved.-1218 String to date conversion error.
The input to the rstrdate() function does not properly represent a
date: either it has nondigits where digits are expected, or an
unexpected delimiter, or numbers that are too large or are
inconsistent.
After try the procedure i always have the error 674
any idea what is happening ?
Looks like a typo in the procedure: rstrtdate should be rstrdate
Dale R. Gilbert
NCG Informix Database Engineering
Bank of America
dale.gilbert@bankofamerica.com
Phone: (302) 457-4186
Cell: (858) 449-7459
-----Original Message-----
From: informix-list-bounces@iiug.org
[mailto:informix-list-bounces@iiug.org] On Behalf Of
ngarimaldi@gmail.com
Sent: Monday, December 17, 2007 3:31 PM
To: informix-list@iiug.org
Subject: rstrdate() function problem
hello everyone
im recentrly have an strange problem with rstrdate()
i have a column A varchar 20,1
and i must compare it with a column B date
to compare it, i use rstrdate() function and im very happy with that
now my problem start when execute the query from a procedure.
it have the next error
674: Routine (rstrtdate) can not be resolved.-1218 String to date conversion error.
The input to the rstrdate() function does not properly represent a
date: either it has nondigits where digits are expected, or an
unexpected delimiter, or numbers that are too large or are
inconsistent.
After try the procedure i always have the error 674
any idea what is happening ?
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
ngarimaldi@gmail.com wrote:
> hello everyone
> im recentrly have an strange problem with rstrdate()
> i have a column A varchar 20,1
> and i must compare it with a column B date
>
> to compare it, i use rstrdate() function and im very happy with that
>
> now my problem start when execute the query from a procedure.
>
> it have the next error
> 674: Routine (rstrtdate) can not be resolved.> -1218 String to date conversion error.
>
> The input to the rstrdate() function does not properly represent a
> date: either it has nondigits where digits are expected, or an
> unexpected delimiter, or numbers that are too large or are
> inconsistent.
>
> After try the procedure i always have the error 674
>
> any idea what is happening ?
As the Fourth Cruncher (dcruncher4@somewhere.tld) said, you cannot
invoke arbitrary ESQL/C functions from SQL - not without a lot of
infrastructure that isn't there (by default - it could be provided, I
suppose, but it would be hard, and there are arguments in ESQL/C that
make no sense in SQL).
Additionally, if the error message you quote is verbatim, you
mis-spelled rstrdate by including an extra t.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/
publictimestamp.org/ptb/PTB-2053 haval 2007-12-18 03:00:04
FC17470E2B59642AA81A2F78FEAE869A
On 17 Dec, 20:31, ngarima...@gmail.com wrote:
> hello everyone
> im recentrly have an strange problem with rstrdate()
> i have a column A varchar 20,1
> and i must compare it with a column B date
>
> to compare it, i use rstrdate() function and im very happy with that
>
> now my problem start when execute the query from a procedure.
>
> it have the next error
> 674: Routine (rstrtdate) can not be resolved.> -1218 String to date conversion error.
>
> The input to the rstrdate() function does not properly represent a
> date: either it has nondigits where digits are expected, or an
> unexpected delimiter, or numbers that are too large or are
> inconsistent.
>
> After try the procedure i always have the error 674
>
> any idea what is happening ?
create database jj_to_date with buffered log;
create table tab1 (col1 serial, col2 date, col3 varchar(20,1));
insert into tab1 values (0,"01/02/2007","01012007");
insert into tab1 values (0,"01/02/2007","01012007");
insert into tab1 values (0,"01/02/2007","01012007");
insert into tab1 values (0,"01/02/2007","01022007");
insert into tab1 values (0,"01/02/2007","01022007");
insert into tab1 values (0,"01/02/2007","01022007");
insert into tab1 values (0,"01/02/2007","01022007");
insert into tab1 values (0,"01/02/2007","01032007");
insert into tab1 values (0,"01/02/2007","01032007");
insert into tab1 values (0,"01/02/2007","01032007");
insert into tab1 values (0,"01/02/2007","01032007");
select * from tab1 where col2 < to_date(col3,"%d%m%Y");