Problems with NoScan parameter

Database
Enthusiast

Problems with NoScan parameter

Hi,

I'm facing SQL error "Syntax error, expected something like an 'IN' keyword or a 'CONTAINS' keyword between ')' and '|'." when run statement:

DELETE FROM  aidar.time_ansi  a WHERE (

        a."id_1"  

        ) IN (

        SELECT     

        cast(substr(rk_1,11) as INTEGER) k_1

        FROM

        (SELECT OP_ROOT_KEY_ROWID,

        MIN(CAST(CAST(OP_NUM_IN_TX AS FORMAT'-9(10)') AS CHAR(10)) || CAST(id_1_OLD AS VARCHAR(70))) rk_1,

        MIN(CAST(CAST(OP_NUM_IN_TX AS FORMAT'-9(10)') AS CHAR(10)) || OP_CODE) first_op_in_chain,

        MAX(CAST(CAST(OP_NUM_IN_TX AS FORMAT'-9(10)') AS CHAR(10)) || OP_CODE) last_op_in_chain

        FROM  aidar.time_ansi_LOG 

        GROUP BY OP_ROOT_KEY_ROWID) b

        WHERE substr(first_op_in_chain,11)!='I' and substr(last_op_in_chain,11)='D'

        )

When I try to run it from Teradata Administrator with enabled 'Desable parsing' option it's OK. When I try to run it from Teradata Studio I have the same error.

I'm running this statement from my application, which connects to Teradata via connection string:

DRIVER={Teradata};DBCName=192.168.219.143;uid="dbc";pwd=********;QUIETMODE=YES;LoginTimeout=210;UseNativeLOBSupport=Yes;NoScan=Yes;

When I remove NoScan from connection string all works fine. But as I know NoScan is the same thing as 'Disable Parsing' in connection settings in ODBC drivers window.

Can anybody answer to me please why this happens?

Thank you.

2 REPLIES
Enthusiast

Re: Problems with NoScan parameter

Forgot to mention. I'm running my application in Windows.

DDLs of tables are:

CREATE MULTISET TABLE aidar.time_ansi ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      id_1 INTEGER NOT NULL,

      col_1 TIME(3),

      col_2 VARCHAR(20) CHARACTER SET LATIN CASESPECIFIC, 

PRIMARY KEY ( id_1 ));

CREATE MULTISET TABLE aidar.time_ansi_log ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      OP_TIME TIMESTAMP(0),

      OP_CODE CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,

      OP_CMT_SCN DECIMAL(20,0) NOT NULL,

      OP_CMT_SCN_LOW DECIMAL(20,0) NOT NULL,

      OP_CMT_TIME TIMESTAMP(0),

      OP_XID VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,

      OP_NUM_IN_TX INTEGER NOT NULL,

      OP_KEY_LEVEL INTEGER,

      OP_ROOT_KEY_ROWID INTEGER,

      id_1_old INTEGER,

      id_1_new INTEGER,

      col_1_old TIME(3),

      col_1_new TIME(3),

      col_2_old VARCHAR(20) CHARACTER SET LATIN CASESPECIFIC,

      col_2_new VARCHAR(20) CHARACTER SET LATIN CASESPECIFIC)

PRIMARY INDEX ( id_1_old );
Enthusiast

Re: Problems with NoScan parameter

Sorry guys. I've read again ODBC driver manual and see that NoScna is only for UNIX, in Windows I should use DisableParsing parameter.

Problem has been resolved.