tMSSqlRow - How to use schema variables in query

Highlighted
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

-----------

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

-----------

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch