Jump to content
  • $X function does not support column name formatted by built-in SQL function with comma delimited parameters


    hxue
    Assigned User shertage
    CategoryBug report
    PriorityHigh
    ReproducibilityAlways
    ResolutionOpen
    SeverityMajor
    StatusFeedback Requested

    Jasper $X syntax does not support column name formatted by built-in SQL function with comma delimited parameters

     

    For example:

    $X{IN, dayname(from_utc_timestamp(timestamp,$P{Time_Zone})),Days}

     

    It will regard that "$P{Time_Zone}" as the name of parameter(the third token)

    And throw an exception



    User Feedback

    Recommended Comments

    Hi,

     

    the $X syntax does not accept parameters in the column name section.

    As a workaround, you could define a String parameter and use it in the query:

     

    $P{Days}.toString().replace("[","(").replace("]",")")

    ...

    select * from my_table where dayname(from_utc_timestamp(timestamp,$P!{Time_Zone})) IN $P!{Days_text}

     

    Please note the $P! notation used in the query, instead of $P.

    Try this workaround first and let us know if it works for you.

     

    Thank you,

    Sanda

     

     

     

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...