Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help: dates and cobol - this is bizarre, not to mention irritating
Here's the deal...
The only other option would be that u don't have data > criteria or database column referred to has time value in stored date.
REJ
Andrew wrote in message <6778df0f.0203280743.6964a267_at_posting.google.com>...
>I have a bizarre problem. I'm trying to pull data of a table with the
>following cursor:
>
>EXEC SQL
> DECLARE C_CURSOR CURSOR FOR
> SELECT BC_GROUP_ID
> ,BC_ID_NO
> ,BC_CARD_TYPE
> ,BC_DATE_STAMP
> ,BC_NO_OF_CARDS
> ,BC_TRANS_DATE
> ,BC_LANGUAGE
> ,BC_CORP_LOGO
> ,BC_COVERAGE_LOGO
> FROM MSC_CARDSTATS
> WHERE BC_TRANS_DATE >=
> TO_DATE(:WS-TEMP-START-DT,'YYYYMMDD')
> AND BC_TRANS_DATE <
> TO_DATE(:WS-TEMP-END-DT,'YYYYMMDD')
> ORDER BY BC_TRANS_DATE
> ,BC_LANGUAGE
> ,BC_CORP_LOGO
>END-EXEC.
>
>the two host variables used to interrogate bc_trans_date are derived
>by this select:
>
>EXEC SQL
> SELECT TO_CHAR(ADD_MONTHS(SYSDATE,-1),'YYYYMMDD')
> INTO :WS-DB-START-DATE
> FROM SYS.DUAL
>END-EXEC.
>
>Now here's the catch. If I run it as is i get no data found (-1403).
>If I hardcode the date values into the host fields I get data
>returned. Whats worse, when i compare the host variable with the hard
>coded value to the host variable with the derived date (from the
>select) cobol says there the same. Does anybody know what the heck is
>going on. platform is an HP, oracle 7.3.4, compiler is micro-focus.
>
>thanks in advnace,
>Andrew
Received on Thu Mar 28 2002 - 13:33:55 CST