• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Talend Date in 'SQL' issue - Token error.

#1 2012-06-29 19:36:34

peri
New member
Registered: 2012-06-29
Posts: 3

Talend Date in 'SQL' issue - Token error.

Here is the 'string constructed in Talend'  and it gives token error but I don't see anything obvious.

"select (Audithis."Audit"),("Date")   from  Audithis,   Patient where  "TableName"='PATIENT'  and Audithis."Audit"=Patient."Audit"  and Audithis."Date">'"+ TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", context.last_change)+"'";

Date  & last_change are Date  and formatted using TatlendDate.

Appreciate any feedback on this.

thanks,
Peri

Offline

#2 2012-06-29 23:22:01

peri
New member
Registered: 2012-06-29
Posts: 3

Re: Talend Date in 'SQL' issue - Token error.

Surprised No feedback !!

Offline

#3 2012-07-02 08:14:12

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Talend Date in 'SQL' issue - Token error.

Hi Peri

Welcome to Talend Community!

Which DB do you use? Some dbs have their own function about formatting date.
Besides, please show us the error info.

Regards,
Pedro


Only Paranoid Survive.

Offline

#4 2012-07-02 18:29:28

peri
New member
Registered: 2012-06-29
Posts: 3

Re: Talend Date in 'SQL' issue - Token error.

Hi Pedro,

  The query is constructed against Oracle database. 

/*
Exception in thread "main" java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: Unresolved compilation problem:
    Syntax error on tokens, delete these tokens

    at
*/

I error code here in the talend as highlighted by the red dot. as follows ;

/*
String dbquery_tOracleInput_2 = "select (Audithis."Audit"),("Date")   from  Audithis,   Patient where  "TableName"='PATIENT'  and Audithis."Audit"=Patient."Audit"  and Audithis."Date">'"+ TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", context.last_change)+"'";

*/

thanks,
Peri

Offline

#5 2012-07-03 05:47:32

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Talend Date in 'SQL' issue - Token error.

Hi Peri

Because the info is limited.
Please send an email to me and attach this export job.
I will test it for you.

Regards,
Pedro


Only Paranoid Survive.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Talend Date in 'SQL' issue - Token error.

Board footer

Powered by FluxBB