Field on f(:bind) not in graph

PAscal
2011-03-29
2013-04-15
  • PAscal
    PAscal
    2011-03-29

    Hello

    select * from Table T
    where T.field > TO_DATE(:3,'MM/DD/YYYY HH24:MI:SS'
    )

    Field is not in graph.
    This is a low priority demand

    Regards
    PAscal

     
  • alxtoth
    alxtoth
    2011-03-30

    Hi,

    this is about "simplifier precedence" . TO_DATE(:3,'MM/DD/YYYY HH24:MI:SS') gets reduced to **TO_DATE(:3)  ->  TO_DATE() -> empty  instead of being reduced to :3.

    -Alex **

     
  • alxtoth
    alxtoth
    2011-04-13

    Looks that :3 should be an identifier (not simplified ) rather than a constant

    -Alex

     
  • PAscal
    PAscal
    2011-04-13

    Not sure, :bind is a constant.
    I suspect simplifier behavior

    Select * from T
    where a=to_date('09-12-2009','DD-MM-YYYY')

    returns filter
    a='DD-MM-YYYY' that is wrong too.

    Regards
    PAscal

     
  • alxtoth
    alxtoth
    2011-04-14

    Hi,

    Well, there are two constant parameters. One constant is dropped.  Than the function itself is dropped, leaving one constant. Unfortunately, the remaining constant it is not the one you wanted to see. In general, one cannot say that first parameter is more important than the second.

    One solution would be to drop the function with several parameters and subtitute it with it's parameters. Of course, as long as the function is not aggregation function

    Exception is caused by inteprteting several columns as one -> there are too many dots

    -Alex