1
0
-1

Hi all,

I'm running in uniface 9.7. 

In the read trigger of an entity (MB_PROJECT in this case) a request like

read where "TO_CHAR(MB_PROJECT.START_DATE,'YYYY-MM-DD') = '2012-09-25'" work well. START_DATE is a date field. But when i want a retrieve on year only :

read where "TO_CHAR(MB_PROJECT.START_DATE,'YYYY') = '2012'" or 

read where "EXTRACT(YEAR FROM MB_PROJECT.START_DATE) =2012" . those request doesn't work even though it's a valid request in sql developper.

How can i proceed?

Thanks

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Steph,

      If the database has thrown an error it should be available in $dberror and $dberrortext.

      Mike

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Steph,

        With UNIFACE 9.7.4 ORACLE 11G driver U7.0

        read where "EXTRACT(YEAR FROM DATE_DEB)=2018" work for us

        if the content of the where statement is bad, read return -3

        If read status return -2, you should verify your data.

        Gilles.

          CommentAdd your comment...