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.
3 REPLIES
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