Can we use where clause in TPT Export selector

Tools
Enthusiast

Can we use where clause in TPT Export selector

can we use the WHERE clause in the sql used to extract data using TPT.

Thanks,

Karthik. N

6 REPLIES
Supporter

Re: Can we use where clause in TPT Export selector

Enthusiast

Re: Can we use where clause in TPT Export selector

Thanks Ulrich,

Yes, I tried before I posted.. actuall issue was there was some junk value in between where condition.

Thanks,

Karthik. N

Enthusiast

Re: Can we use where clause in TPT Export selector

Hello Everyone,

I have tried to use where cluase, but i am getting syntax error due to the quotes present in the IN LIST. Is there any way to solve it. May be using some escape character to escape the quotes inside the IN LIST. Thanks in advance.

 

 /*** Export Operator Definition ***/

   DEFINE OPERATOR EXPORT_OPERATOR

    DESCRIPTION 'TERADATA PARALLEL TRANSPORTER EXPORT OPERATOR'

    TYPE EXPORT

    SCHEMA PLT_IWH_BASE

    ATTRIBUTES

    (

      VARCHAR PrivateLogName = 'exportoper_privatelog',

       INTEGER MaxSessions    =  8,

       INTEGER MinSessions,

       VARCHAR TdpId          = 'XXXXX',

       VARCHAR UserName       = 'XXXXXX',

       VARCHAR UserPassword   = 'XXXXXX',

       VARCHAR SelectStmt     = 'SELECT BATCH_PK,

MATERIAL_PK,

SITE_PK,

BATCH_ID,

BATCH_DESCRIPTION,

MANUFACTURE_DATE_ACTUAL,

EXPIRATION_DATE_ACTUAL,

VERIFICATION_FLG,

CREATED_DATE,

UPDATE_DATE,

AUDIT_ID,

LANGUAGE_ID,

SOURCE_SYSTEM_ID,

GLOBAL_BATCH_ID,

BATCH_INSPECTION_DT,

RELEASE_DT,

BATCH_SEQUENCE_DATE,

STG_OUT_PK,

BATCH_STATUS from PLT_IWH_BASE.BATCH where BATCH_ID IN ('000362464WH', '20550K01A');'

    );

Supporter

Re: Can we use where clause in TPT Export selector

try to replace all ' with '' within the select. Something like

(''000362464WH'', ''20550K01A'');

Enthusiast

Re: Can we use where clause in TPT Export selector

Hi ulrich,

Thank you for your response!

I have tried that. But the select statement fails saying invalid timestamp. I think teradata is expecting some timestamp data between the double quotes.
Enthusiast

Re: Can we use where clause in TPT Export selector

Please note that '' is double single quotes and not the double qoutes..