LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Brianscript as graph parameter in DBQuery

    Employee
    Posted 04-19-2016 06:27

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    I am trying to use a parameter i have written as brainscript in i DBQuery to find the first day of the previous month.
    str(dateAdjust(date(date().str().left(8)+"01","CCY Y-MM-DD"),-1,"months")).replace("-","")


    I get the following error:
    WARN: OCI Error 1741: ORA-01741: illegal zero-length identifier

    Error Code: brain.node.OciUtils.cpp.83


    The string i get with the code works if i type the parameter as text.
    Is it that you cant use brainscript parameters as inputs in DBqueries?

    Br
    Thomas


  • 2.  RE: Brianscript as graph parameter in DBQuery

    Employee
    Posted 04-19-2016 08:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    You can use Parameters in your DBQuery node, but the code needs to be SQL not BrainScript.

    My recommendation would be to query the data you need using the DBQuery node, then use a filter node to apply the date logic you have coded above. One error in the code above. You have an extra space in the "CCYY-MM-DD" format.


  • 3.  RE: Brianscript as graph parameter in DBQuery

    Employee
    Posted 04-19-2016 23:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    Thank you Larry.

    The space in the code is actually not there, seems to appear only in this forum :-)
    I will do as you suggest..

    Cheers!
    Thomas