CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft OLE DB Provider for SQL Server error '80040e14' FROM clause have the same exposed names Use correlation names to distinguish them
- Article ID:
162 - Date Created
Thursday, January 12, 2012 - Last Updated
Wednesday, June 20, 2012 - This Article Has been Viewed
1911 times - Short Desc
When you generate code from SQL Server, the code will not generate this error. However, if you edit the code once you post it to your page, you can in-mistakenly make this simple error, of which, is easy to correct. - Details
When you edit your SQL Script, you will sometimes run into a problem that is simple to correct. This problem happens when you edit the code once you enter it into your page, (or), you may try to hand code the SQL Script, in that case, errors like this are bound to happen more times over than what would happen, if your use SQL Server Management Studio to generate your SQL Script.
Microsoft OLE DB Provider for SQL Server error '80040e14'
The objects "Cat" and "Cat" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
/Cat.asp, line 68 - Recreate Issue
To recreate this issue.<%
SELECT Cat.SCID, Cat.SubName, SubCat.SCName, SubCat.SCID, SubCat.Image, SubCat.SCDesc FROM Cat INNER JOIN Cat ON Cat.SCID = SubCat.SCID
%>
As you can see in the above code sample, we have the
Cat INNER JOIN Cat
This is incorrectly written, and will throw the error. - Resolve Issue
To resolve this issue.<%
SELECT Cat.SCID, Cat.SubName, SubCat.SCName, SubCat.SCID, SubCat.Image, SubCat.SCDesc FROM Cat INNER JOIN SubCat ON Cat.SCID = SubCat.SCID
%>
As you can see in the above code example. We corrected the table name.
Cat INNER JOIN SubCat
This is the proper way to write the above code.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19545
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16826