tMSSqlRow - How to use schema variables in query

Seven Stars

tMSSqlRow - How to use schema variables in query

Hi, 

 

I have tMSSqlRow component with 2 variables in schema, named UPC and ITEM_NO.

 

The tMSSqlRow  is holding the output of tMap as follows :

 

mssqlrowquery.PNG

 

How can I use the schema variables in Query ? i.e. in place of schema.ITEM_NO and schema.UPC ?

 

Thank you !

 


Accepted Solutions
Forteen Stars

Re: tMSSqlRow - How to use schema variables in query

You must use prepared statements - check on Advanced properties of tMSSQLRow

 

 

change parameters to ?

 

 Screen Shot 2017-07-23 at 12.25.29 AM.png

 

and assign properties on Advanced Tab

Screen Shot 2017-07-23 at 12.15.28 AM.png

 

in You case it will be

... SET ERP_WEST = ? WHERE UPC = ? ...

and parameters
index 1 - updae1.ITEM_NO
index 2 - updae1.UPC 

updae1 - same as on picture, think it update1

-----------

View solution in original post


All Replies
Forteen Stars

Re: tMSSqlRow - How to use schema variables in query

You must use prepared statements - check on Advanced properties of tMSSQLRow

 

 

change parameters to ?

 

 Screen Shot 2017-07-23 at 12.25.29 AM.png

 

and assign properties on Advanced Tab

Screen Shot 2017-07-23 at 12.15.28 AM.png

 

in You case it will be

... SET ERP_WEST = ? WHERE UPC = ? ...

and parameters
index 1 - updae1.ITEM_NO
index 2 - updae1.UPC 

updae1 - same as on picture, think it update1

-----------

View solution in original post

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 2

Part 2 of a series on Context Variables

Blog

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