KB Issue
When you generate code from SQL Server Management Studio [SSMS] and edit it later, you can encounter the following error.
Issue Details
This problem occurs when you edit the SQL script after you enter it into your page. Errors like this are bound to happen more times over than they would if you 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
[SQK Server - Incorrectly Formatted SQL Select Statement]
CFFCS | CarrzSynEdit: | SQL Script
SELECT Cat.SCID, Cat.SubName, SubCat.SCName, SubCat.SCID, SubCat.Image, SubCat.SCDesc FROM Cat INNER JOIN Cat ON Cat.SCID = SubCat.SCID

With code sample, we have the
Cat INNER JOIN Cat
Copy
Search Site
Search Google
This SQL is incorrectly written and will throw an error.
Resolve Issue
The proper way to write the SQL is to ensure all names are correct and all joins are connected to the proper ID.
Cat INNER JOIN SubCat
Copy
Search Site
Search Google
[SQK Server - Correct SQL Query Statement]
CFFCS | CarrzSynEdit: | SQL Script
SELECT Cat.SCID, Cat.SubName, SubCat.SCName, SubCat.SCID, SubCat.Image, SubCat.SCDesc FROM Cat INNER JOIN SubCat ON Cat.SCID = SubCat.SCID