SQl Query Retreiving Data from globalmap.get("") function. JAVA ?

Highlighted
One Star

SQl Query Retreiving Data from globalmap.get("") function. JAVA ?

SYNTAX is my prob, but im not sure where. My capitolization is correct.
java.sql.ResultSet rs_tMSSqlInput_2 = stmt_tMSSqlInput_2.executeQuery("SELECT dbo.BASE_MODULE_NUMS.MATNR,dbo.BASE_MODULE_NUMS.MAKTX FROM dbo.BASE_MODULE_NUMS where dbo.BASE_MODULE_NUMS.MATNR ="((String)globalMap.get("row2.MATNR"))");
Thanks
Highlighted

Re: SQl Query Retreiving Data from globalmap.get("") function. JAVA ?

you need to concatenate strings in Java.
where dbo.BASE_MODULE_NUMS.MATNR = " + (String)globalMap.get("row2.MATNR"));

Talend also supports Perl which is a bit more "user friendly" when it comes to string handling.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog