Re: Problem with in a PRO*C

From: Brian E Dick <bdick_at_cox.net>
Date: Fri, 13 Sep 2002 12:11:38 GMT
Message-ID: <_Bkg9.17957$8F4.628225_at_news2.east.cox.net>


Since serdrec is used in the outer query and you verified that it works, I would be suspicious of sersite. Paste the query in sqlplus and substitute the host variable values.

"Chevalier Jerome" <jchevalier_at_gold-solutions.com> wrote in message news:220f9fd5.0209130140.79ce7c15_at_posting.google.com...
> Hello
>
> I work with an ORacle 8.1.7 Oracle database
> and the PRO*C 8.1.7
>
> When i open this cursor :
> exec sql declare toto cursor for
> SELECT aracinr
> FROM artuc, artrac, artvl, artul,
> ( SELECT relpere p1, level l1
> FROM ( SELECT relpere, relid
> FROM resrel
> WHERE TO_DATE(:serdrec,'DD-MM-RR HH24:MI')
> between relddeb AND reldfin )
> CONNECT BY PRIOR relpere = relid
> START WITH relid = :sersite )
> WHERE
> araseqvl = arlseqvl
> AND aracfin = :sercfin
> AND araccin = :serccin
> AND aracinr = artcinr
> AND aracinl = arucinl
> AND arasite = P1
> AND TO_DATE(:serdrec,'DD-MM-RR HH24:MI') between araddeb
>
> I have an 'ORA-01840: input value not long enough for date format ' error
> i verify all my host variable and the initialisation is good
> the problem come from the query :
> FROM ( SELECT relpere, relid
> FROM resrel
> WHERE TO_DATE(:serdrec,'DD-MM-RR HH24:MI')
> between relddeb AND reldfin )
>
> if i suppress this query , it's work
> I don't understand ;)
Received on Fri Sep 13 2002 - 14:11:38 CEST

Original text of this message