[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: to_date



BOB SHIFLETT wrote:
>
> I'm having a problem using the oracle to_date function in SQR V3.0.12.1
>
> I get the error message :
>  (SQR 4008) Unknown function or variable in expression: to_date
>          to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd')
>
> I have successfully used this function on one of our other unix boxes
> running V2.4.2
> If you should happen to know of a problem with this release of SQR or spot
> errors
> in code below (I have tried many different variations) please let me know.
>
> thanks,
>
> Bob
>
> ==========================================================
> begin-procedure get_edi_date
>  BEGIN_DATE:
>    let $begin_date = ' '
>    show (7,20) clear-line
>    show (7,20) 'Enter Beginning EDI Date [DD-MON-YY] '
>     input $begin_date type=date status=#begin_date_status noprompt
>       if #begin_date_status <> 0 or
>           isnull ($begin_date)
>               show (7,20) clear-line
>               goto BEGIN_DATE
>       end-if
>   END_DATE:
>    let $end_date = ' '
>    show (8,20) clear-line
>    show (8,20) 'Enter Ending    EDI Date [DD-MON-YY] '
>     input $end_date type=date status=#end_date_status noprompt
>       if #end_date_status <> 0 or
>           isnull ($end_date)   or
>             to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd')
>             show (8,20) clear-line
>             goto END_DATE
>       end-if
> end-procedure

I believe the TO_DATE function is *NOT* an SQR function but an SQL
function. I suggest you use it in a SQL paragraph and then move the
variables to the appropriate area.

Good Luck

--
**************************************************************************
        Nick Moscaritolo         BBBB
  Principal Programmer/Analyst   B   B
                                 B   B
        BENTLEY COLLEGE          B   B
     MIS Dept./Waverly Hall      BBBB  EEEEE N   N TTTTT L     EEEEE Y   Y
       175 Forest Street         B   B E     NN  N   T   L     E      Y Y
       Waltham, MA 02154         B   B EEEEE N N N   T   L     EEEEE   Y
(617)891-2542 FAX:(617)891-2150  B   B E     N  NN   T   L     E       Y
 NET: nmoscaritolo@bentley.edu   BBBB  EEEEE N   N   T   LLLLL EEEEE   Y
**************************************************************************