Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: datetime type of parameter cannot be compared by "<" or "<="?

  1. #1
    Join Date
    Dec 2011
    Posts
    16

    Default datetime type of parameter cannot be compared by "<" or "<="?

    Hi all,

    I'm designing a metadata based report which has data as parameter. I added the corresponding column (datetime type, say "lastupdate") to Conditions and selected ">=" as comparison operator, but it failed to query. It'll be fine if change it to "is not null". See this figure:
    Name:  datetime_para.jpg
Views: 45
Size:  35.4 KB
    Anybody knows what happened? There is no other operator to use in report designer for datetime type. The datetime is not supported? Thanks a lot!

  2. #2
    Join Date
    Dec 2011
    Posts
    16

    Default

    OK, guys, let me answer this post by myself! I found the answer at a post of Diethard Steiner. It seems Metadata treats the parameter as string in the old version, so it needs DATEVALUE to convert it to date type. In the current version, Metadata already has the ability to deal with date type, and so DATEVALUE is not necessary anymore. By default, the Query Editor in Pentaho Report Designer add DATEVALUE in front of the parameter, thats why the query will fail. So what we need to do is that going back to Metadata Data Source Editor in Designer and removing DATEVALUE! That's it. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.