Forum Stats

  • 3,874,138 Users
  • 2,266,670 Discussions
  • 7,911,736 Comments

Discussions

evaluate function with 2 input parameters

hi, I wanna know the syntax when evaluate functions with 2 input parameters

I tested this syntax,

EVALUATE('add_two_values(%1,%2)' , "tableA"."colA", "tableB"."colB")

but this returns an error.

the error is:


State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42015] Cannot function ship the following expression: Evaluate( add_two_values(%1,%2 ),D903.c3, D903.c5) . (HY000)

thanks !

Edited by: Forreging on Oct 15, 2009 10:09 AM
Tagged:

Answers

  • Goran Ocko
    Goran Ocko Member Posts: 554
    This works:
    EVALUATE('INSTR(%1,%2)', CHANNELS.CHANNEL_DESC, CHANNELS.CHANNEL_CLASS)
    EVALUATE('LEAD(%1,%2) OVER (ORDER BY %3)' as double, SALES.QUANTITY_SOLD, 2, TIMES.CALENDAR_MONTH_DESC)
    EVALUATE('LEAD(%1,%2) OVER (ORDER BY %3)' as double, SALES.QUANTITY_SOLD, COUNT(distinct TIMES.CALENDAR_MONTH_DESC), TIMES.CALENDAR_MONTH_DESC)

    This not:
    EVALUATE('LEAD(%1,%2) OVER (ORDER BY %3)' as double, SALES.QUANTITY_SOLD, RCOUNT(TIMES.CALENDAR_MONTH_DESC), TIMES.CALENDAR_MONTH_DESC)
    Cannot function ship the following expression

    Try to see why are you getting this error.

    Regards
    Goran
    http://108obiee.blogspot.com
This discussion has been closed.