Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Maximum Open Cursors Exceeded

  1. #1

    Default Maximum Open Cursors Exceeded

    Hi,

    I have a issue. Can any one help me.

    1) I have to pass the timestamp into number field in the target table

    i.e: I want convert Timestamp(dd/mm/yyyy hh:mi:ssss) to
    ddmmyyyy and then i have to pass it to terget field


    I got the result through SQL script but i am getting the "Maximum Open Cursors Exceeded" after executing 300 rows

    How can I solve this problem. Please guide me.

    Thanks in Advance


    Regards
    Naren1984

  2. #2
    Join Date
    Aug 2007
    Posts
    27

    Default

    Just a guess, but is your SQL script closing and deallocating the cursor? If not you may be creating and opening a new cursor with every record.

    Lindsay

  3. #3
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    What do you mean by "I got the result through SQL script"?

    ------ PDI Possible Solution -----
    Take a Table Input step -> Modified JS Value and then convert your date field from "dd/mm/yyyy hh:mi:ssss" to "ddmmyyyy"

    (Note: I cleared the compatibility flag!)
    Code:
    var DateNum=str2num(date2str(Incoming_Timestamp_Field,"ddMMyyyy"))
    Click the "Get Variables" button
    Click OK

    I tried this on one of my tables, and was able to get valid output

    ------ SQL Possible Solution -----
    In your incoming select statement, convert the Timestamp there, rather than selecting it as a date/time field
    I can't help with writing that one!

  4. #4

    Default

    Hi,
    I had tried with one of my table. But
    While testing the following script " var DateNum=str2num(date2str(Incoming_Timestamp_Field,"ddMMyyyy"))"

    Following error is encountered
    “Couldn't execute this script! Error on position (2:0) :
    Could not convert to the given format. (script#2)”

    1)One more think my input field is string with “dd/mm/yyyy hh:mi:ssss AM “ From this I have to take “ddmmyyy” and pass it to number field

    Can u please help me

    Regards
    Naren

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.