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.  "Insert into" SQL Error

    Employee
    Posted 10-25-2010 19:43

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

    Originally posted by: alvintoh

    I am having problems with the following SQL...it works on Local and odbc but not in Server and cli.

    INSERT_TABLE =

    "INSERT INTO EDWPRDE_WORK_ANLYT.{{^EDW_User_ID^}}_SIEBEL_BAN_GH DD1

    SELECT Siebel_Billing_Account_Number

    from

    (
    SELECT �Have replaced working SQL here�
    ) AS TEST

    Group by 1"


    sqlNonSelect (INSERT_TABLE)





    Error message on log is


    ****** Errors in node Save_Accounts_into_EDW_table

    --------- Errlog for Insert_into_Table
    ERROR processing data:
    '' ('0A'X) is not a valid Teradata SQL token.

    Installing log (10/25/2010 14:44:12) ...
    2010-10-25 14:44:14; Level: 2; Type: 0; Desc: "'' ('0A'X) is not a valid Teradata SQL token."; File: "./../../jigsaw/Code/Source/DB/Teradata/TDParcels.cpp"; Line: 88; Context: ""
    2010-10-25 14:44:14; Level: 2; Type: 0; Desc: "...exception seen in statement 'sql-non-select', line 48"; File: "./../code/source/expert/ExprStatement.cpp"; Line: 56; Context: "Salmon::NED::Statement_Expr::evaluate()"
    2010-10-25 14:44:14; 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 (10/25/2010 14:44:14) ...


  • 2.  RE: "Insert into" SQL Error

    Employee
    Posted 10-26-2010 08:33

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

    Originally posted by: timonk

    Good Day,

    While I am still looking into this issue, an initial general search of similar errors through google showed that other people who received the same exact error (irrespective of the interface or tool they were using) seemed to fix the error by updating the driver they were using to the newest version.

    Is there a newer version of the driver you are using available?
    Regards
    Timon Koufopoulos
    MDA Support.


  • 3.  RE: "Insert into" SQL Error

    Employee
    Posted 10-26-2010 08:46

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

    Originally posted by: timonk

    Good Day,

    It looks like ('0A'X) is a unix carriage return character, which must not be getting handled correctly. Certain query tools or text editors remove this character before submitting the query to Teradata.

    As an experiment, try trimming up your sql code to remove extra/leading/trailing lines and spaces where possible. But I would also still check to see if there is a more updated driver to be used.

    Regards
    Timon Koufopoulos
    MDA Support.


  • 4.  RE: "Insert into" SQL Error

    Employee
    Posted 02-05-2014 10:58

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

    Originally posted by: DanRosenblatt

    Problem report 5415 has been created for this issue. The issue will occur on the DB Execute node connecting to a Netezza database via CLI. As noted in comments above, the workaround is to remove line breaks from statements that are contained inside a pair of quotation marks.

    For example, if you are attempting to run:

    sqlNonSelect(
    "update table
    set column = 'foo'
    where id = 1"
    )

    and you receive ('0A'X) is not a valid Teradata SQL token, try:

    sqlNonSelect("update table set column = 'foo' where id = 1")