troubleshooting Question

The multi-part identifier could not be bound error

Avatar of sdc248
sdc248Flag for United States of America asked on
Microsoft SQL Server 2008
2 Comments1 Solution1396 ViewsLast Modified:
Hi:

I am about to move some 30 stored procedures from one database to another. In order to do this I need to fully qualify the tables in the queries that are located in the current database. But after doing that some of the stored procedures stop working, either in the current database or in the destination database.

I am using SQL Server 2008 R2. The queries involved look like the following:
[before]
select *
from [server1].DB1.dbo.vw_MyView v
inner join myTable1 t1 on...
inner join myTable2 t2 on...

[after fully-qualifying the table]
select *
from [server1].DB1.dbo.vw_MyView v
inner join [CurrentServer].CurrentDB.dbo.myTable1 t1 on...
inner join [CurrentServer].CurrentDB.dbo.myTable2 t2 on...

Error messages:
Msg 8180, Level 16, State 1, Line 1
Statement(s) could not be prepared.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Tbl1020.objectSk" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Tbl1018.bbgcmd" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Tbl1018.isin" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Tbl1018.sedol" could not be bound.

Please help. Thanks.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros