All Forums Tools
karthik_2244 36 posts Joined 12/10
20 Jul 2012
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

ulrich 816 posts Joined 09/09
21 Jul 2012

Yes, but why didn't you just try?

but also check the manuals

http://developer.teradata.com/tools/reference/tpt-user-guide/13-10

http://developer.teradata.com/tools/reference/teradata-parallel-transporter-reference/13-10

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

karthik_2244 36 posts Joined 12/10
22 Jul 2012

Thanks Ulrich,

 

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

 

Thanks,

Karthik. N

zammohan 6 posts Joined 04/14
28 Apr 2014

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');'
    );

Best,
Shyam

ulrich 816 posts Joined 09/09
29 Apr 2014

try to replace all ' with '' within the select. Something like
(''000362464WH'', ''20550K01A'');
 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

zammohan 6 posts Joined 04/14
29 Apr 2014

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.

Best,
Shyam

Jinesh 10 posts Joined 05/07
30 Apr 2014

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

You must sign in to leave a comment.