Solved

Run Time Error -2147217900 (80040014) - Ambiguous column name 'ID_Company'

Posted on 2014-02-20
3
404 Views
Last Modified: 2014-02-20
This is code I have inherited and have been asked to debug. Screen Shot 1 shows the form that is executed that generates the error. I click 'Debug' and What is seen in Screen Shot 2 appears. I believe the numeric code indicated a possible problem with a Join satement. The .txt file attached shows the SQL statement that the error points to, 'strSQL'.
Could someone verify that I am on the right track and advise what I should do to resolve this error?
Thanks in Advance.
Screen-Shot1.JPG
Screen-Shot2.JPG
SQLstr.txt
0
Comment
Question by:tesla764
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
Gary Dewrell earned 500 total points
Comment Utility
Both tables you are accessing have a column ID_Company. You need to fully qualify the column  table.collumn name so sql knows which ID_Company in which table you are referencing.
0
 

Author Comment

by:tesla764
Comment Utility
Yes I see that I need to preface the names to make them distinguished.
thanks.
0
 
LVL 12

Expert Comment

by:Gary Dewrell
Comment Utility
You are very welcome. Have a great day.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now