a column named 'x' already belongs to the DataTable Follow

0
Avatar
Kevin Williams

Can anyone give me a hand?  Bartender should have this ability.  I've seen others on the forum post joins which are similar to mine

I get this error: “Unable to run action 'Execute SQL' due to a database error. Details: A column named 'Job' already belongs to this DataTable.”

I'm using the Execute SQL action.  I'm very familiar with SQL.  I started with a view that joined two tables,but kept getting the above error so I let Bartender build the join in the database connection wizard.  Still get the error.  Both tables have the field 'Job' which is what I'm joining on - see the join statement:

-------------------------------------------------------------------------------------------------------------------------------------------

Custom SQL command

SELECT [WipMaster].[Job],[WipReservedLots].[Lot]

FROM [dbo].[WipReservedLots]

INNER JOIN [dbo].[WipMaster] ON [dbo].[WipReservedLots].[Job] = [dbo].[WipMaster].[Job]

WHERE [dbo].[WipReservedLots].[Job] = %JobNumber% (this is the bartender variable)

-------------------------------------------------------------------------------------------------------------------------------------------

I've tried letting the wizard create everything without the WHERE clause and it still throws the error.

Any help would be appreciated. 

Kevin

 

 

2 comments

0
Avatar
Pete Thane
Comment actions Permalink

Not sure but you can have columns of the same name in different tables and so it looks like something maybe screwed up somewhere. 

Try removing both database connections and then add them one at time to see if that fixes it or if start a brand new label and just add the database tables to  it and see if that works, in the even your label itself is corrupted somehow

0
Avatar
Kevin Williams
Comment actions Permalink

I have successfully read from one table and also joined two tables without duplicate field names.  So it is something the Integration is doing because it is seeing two fields with the same name.  Seems that no one at Seagull has a clue how this actually works. I even have this in a view, so in theory, it should not look at the actual tables.

Please sign in to leave a comment.