Problem with tMSSQLInput, Invalid Column Name

One Star

Problem with tMSSQLInput, Invalid Column Name

HiI have a problem with the tMMSQLInput component, when I select the table from the "..." button near the Table Name Field, and then do a Select * from MyTable I get a column named Document_No_ but when I try to do a Select Document_No_ from MyTable I get an error message :
Exception in component tMSSqlInput_1
java.sql.SQLException: Ivalid column name : 'Document_No_'.
What should I do to solve this problem ?
Thanks for your help.
Seventeen Stars

Re: Problem with tMSSQLInput, Invalid Column Name

Check the query and try it with removed ` chars. Mostly they are more disrupting the code than help.
One Star

Re: Problem with tMSSQLInput, Invalid Column Name

I didn't used the quotes around the column name in the Query, it was only for the example. Here's my real query :
"SELECT *
FROM \"IEC$Purchase Header\", \"IEC$Purchase Line\"
WHERE \"IEC$Purchase Header\".No_ = \"IEC$Purchase Line\".Document_No_"
One Star

Re: Problem with tMSSQLInput, Invalid Column Name

Hi
Inusual name columns Smiley Wink
Try to put between square brackets each column name, something like this:
"SELECT *
FROM ,
WHERE = "
SQL is interpreting that the column Document_No_ has a schema called "IEC$Purchase Line" caused by the dot in the middle of the name.
Hope it helps you.
Cheers

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER 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

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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch