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.  Space between column names

    Employee
    Posted 11-17-2011 03:55

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

    Originally posted by: saravan

    How can i handle / avoid the space between table column name in the lavastorm graph (sqlrunner) node?

    Thanks
    Saravan


  • 2.  RE: Space between column names

    Employee
    Posted 11-21-2011 13:02

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

    Originally posted by: rboccuzzi

    Do you have an example? I want to understand your question a little better. Do you mean you are trying to avoid creating a table name with a blank in it? Or that you are trying to interact with a table that has a space? If you can provide a little more detail about what you are trying to avoid or do, especially with any example data or graphs, that would be helpful.

    Thanks


  • 3.  RE: Space between column names

    Employee
    Posted 11-23-2011 03:30

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

    Originally posted by: saravan

    Thanks for your reply,

    I would like to interact with a table's column name that has a space in between. for instances a column name as "Employee Name", i would like to avoid the space in between Employee and Name. Im getting the below error log while executing the query which contains the column name space.

    whether do we need to add/include any special characters for the space?

    "ERROR initializing expert output:
    unrecognized token: 'Employee'
    Installing log (11/09/2011 17:42:21) ...
    2011-11-09 17:42:21; Level: 2; Type: 0; Desc: "unrecognized token: 'Employee'"; File: "./../code/source/expert/Expr.cpp"; Line: 82; Context: "Expr::parseExpr()"
    2011-11-09 17:42:21; Level: 2; Type: 0; Desc: "...in expression starting on line 3"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2011-11-09 17:42:21; Level: 2; Type: 0; Desc: "...in statement starting on line 1"; File: "./../code/source/expert/ExprStatement.cpp"; Line: 158; Context: "Salmon::NED::Statement_Expr::tryParseStatemen t()"
    2011-11-09 17:42:21; Level: 2; Type: 0; Desc: "...in expression starting on line 1"; File: "./../code/source/expert/Expr.cpp"; Line: 89; Context: "Expr::parseExpr()"
    2011-11-09 17:42:21; Level: 2; Type: 0; Desc: "...handling expression #1 in file"; File: "./../code/source/brain/ExprTableIo.cpp"; Line: 86; Context: "Salmon::NED::ExprTableIo::initialize()"
    2011-11-09 17:42:21; Level: 2; Type: 0; Desc: "...exception seen"; File: "./../code/source/brain/NodeControl.cpp"; Line: 1152; Context: "Salmon::NED::NodeControl::initializeExpert()"
    Uninstalling log (11/09/2011 17:42:21) ..."

    Thanks


  • 4.  RE: Space between column names

    Employee
    Posted 11-24-2011 18:17

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

    Originally posted by: Tim Meagher

    Hey,

    For which node are you getting the error?
    At a guess, from the error log I would say that you are trying to reference the field simple as:
    Employee Name
    In BRAINscipt, when you are trying to reference a field which contains space (" ") characters, you need to surround the field name with single quotes (').

    In your case, this should be simply using the field name:
    'Employee Name'
    Using this notation is possible in all cases - even when there are no spaces in the field name - it's just the "long-hand" version.
    For instance, you could also refer to a field called "foo" as
    'foo'
    Rather than the "shorthand":
    foo
    From the information I'm not 100% sure that this is exactly the problem that you are running into.

    If not, can you post a sample graph where you run into this error (with obfuscated data if necessary)?

    Tim.


  • 5.  RE: Space between column names

    Employee
    Posted 11-24-2011 23:18

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

    Originally posted by: saravan

    Hi Tim,

    Thanks for your reply

    Pls find the attached sample graph.

    I'm getting the following error log while executing the sqlrunner node which contains the delete query in it.

    'EFFECTIVE DATE' field contains the space in between.

    Installing log (11/25/2011 16:55:51) ...
    2011-11-25 16:55:52; Level: 2; Type: 0; Desc: "OCI Error 1858: ORA-01858: a non-numeric character was found where a numeric was expected
    "; File: "./../../jigsaw/Code/Source/Oci/OciUtils.cpp"; Line: 83; Context: ""
    2011-11-25 16:55:52; Level: 2; Type: 0; Desc: "Error executing statement:

    DELETE FROM TIME_ZONE_OFFSET
    WHERE MONTHS_BETWEEN(sysdate, 'EFFECTIVE DATE') > 24

    . On connection: lvs_Schema@LAVAS1BA. ORA-01858: a non-numeric character was found where a numeric was expected
    "; File: "./../../jigsaw/Code/Source/Oci/OciSession.cpp"; Line: 226; Context: "OciSession::ExecuteStatement()"
    2011-11-25 16:55:52; Level: 2; Type: 0; Desc: "...exception seen in statement 'sql-non-select', line 8"; File: "./../code/source/expert/ExprStatement.cpp"; Line: 56; Context: "Salmon::NED::Statement_Expr::evaluate()"
    2011-11-25 16:55:52; Level: 2; Type: 0; Desc: "...exception seen in context: { 0(query):1 }"; File: "./../code/source/brain/ExprTableIo.cpp"; Line: 255; Context: "Salmon::ExprTableIo::processInputRows()"
    Uninstalling log (11/25/2011 16:55:52) ...


    NOTE: EFFECTIVE DATE column is DATE field.

    Appreciate for you quick response.

    Thanks
    Saravan
    Attachments:
    Time_Zone_Offset.brg


  • 6.  RE: Space between column names

    Employee
    Posted 11-30-2011 11:31

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

    Originally posted by: gharris

    Hi Saravan

    As you appear to be using Oracle you need to place the column Effective Date (my formatting) in double quotes (") and type the name EXACTLY how it appears in Oracle. To retrieve this information open you can either open sqlplus and issue the following command:
    desc time_zone_offset
    or run the following SQL statement:

    SELECT column_name FROM all_tab_columns WHERE table_name = 'TIME_ZONE_OFFSET'
    Either way copy the formatting of the column into your node and write the following SQL Statement (for the purposes of this post I am assuming that the column name is in all capital letters)

    SQL = "DELETE FROM time_zone_offset WHERE MONTHS_BETWEEN(SYSDATE, \"EFFECTIVE DATE\") > 24";
    sqlNonSelect(SQL);

    Hope this helps

    Graham Harris


  • 7.  RE: Space between column names

    Employee
    Posted 12-02-2011 01:32

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

    Originally posted by: saravan

    Hi Harris,

    I have modified the query as per your suggestion and ran the graphs, now issue is resolved.

    Thanks for your help.

    Thanks
    Saravan