The multi-part identifier could not be bound



I have the following query that runs fine in SQL 2000 but get errors in 2005.


insert into dss_afe_actual_estimate_fact
SELECT dbo.dss_gl_detail_fact.account_key,
dbo.dss_gl_detail_fact.reference_key,
SUM(ISNULL(dbo.dss_gl_detail_fact.balance, 0)) AS afe_actual_amt,
MAX(ISNULL(calsql.share..dbo.AFE_ESTIMATE.amount, 0))
AS afe_estimate_amt
FROM calsql.share.dbo.AFE_ESTIMATE RIGHT OUTER JOIN
dbo.dss_gl_detail_fact ON
calsql.share..dbo.AFE_ESTIMATE.seg3 = dbo.dss_gl_detail_fact.seg3_code AND
calsql.share.dbo.AFE_ESTIMATE.seg1 =
dbo.dss_gl_detail_fact.seg1_code AND
calsql.share.dbo.AFE_ESTIMATE.comp =
dbo.dss_gl_detail_fact.control_company AND
calsql.share.dbo.AFE_ESTIMATE.afe =
dbo.dss_gl_detail_fact.reference_code
GROUP BY dbo.dss_gl_detail_fact.account_key,
dbo.dss_gl_detail_fact.reference_key, dbo.dss_gl_detail_fact.posted_flag,
dbo.dss_gl_detail_fact.reference_code,
dbo.dss_gl_detail_fact.seg3_code
HAVING (dbo.dss_gl_detail_fact.posted_flag = 1) AND
(dbo.dss_gl_detail_fact.reference_code LIKE 'A%') AND
(dbo.dss_gl_detail_fact.seg3_code <> 'ZZZ')

This runs fine in SQL 2000 but when I copy it over to SQL 2005 I get the
following errors.

Note that the only change I made was to prefix the SHARE with the server
name CALSQL everything else is local.

The errors are as follows:

Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "calsql.share..dbo.AFE_ESTIMATE.seg3" could not be
bound.
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "calsql.share.dbo.AFE_ESTIMATE.seg1" could not be
bound.
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "calsql.share.dbo.AFE_ESTIMATE.comp" could not be
bound.
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "calsql.share.dbo.AFE_ESTIMATE.afe" could not be
bound.
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "calsql.share..dbo.AFE_ESTIMATE.amount" could not
be bound.


Any help would be appreciated.





.



Relevant Pages

  • Re: freetexttable query never completes nor times out?
    ... Full text does not perform with a nested loop because the search is done for each iteration, if your server doesn't have much memory you will have a huge IO issue. ... When I get properties for the FT catalog, ... The company I am currently working for is a heavy consumer of SQL FTS ... dB (this time from the actual ASP page that passes the query to the ...
    (microsoft.public.sqlserver.fulltext)
  • Re: freetexttable query never completes nor times out?
    ... Full text does not perform with a nested loop because the search is done for each iteration, if your server doesn't have much memory you will have a huge IO issue. ... When I get properties for the FT catalog, ... The company I am currently working for is a heavy consumer of SQL FTS ... dB (this time from the actual ASP page that passes the query to the ...
    (microsoft.public.sqlserver.fulltext)
  • Re: freetexttable query never completes nor times out?
    ... if your server doesn't have much memory ... and the "executing query" ball just kept ... When I get properties for the FT catalog, ... The company I am currently working for is a heavy consumer of SQL FTS ...
    (microsoft.public.sqlserver.fulltext)
  • Re: freetexttable query never completes nor times out?
    ... SQL Server MVP ... This is a dev server so I hadn't even been ... When I get properties for the FT catalog, ... I just ran a similar query on ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Single-Threading / Performance issues
    ... SQL Server MVP ... > Early this year my database was migrated from a single CPU, ... (when a long select query is running, ... server guy also sez it's not his problem. ...
    (microsoft.public.sqlserver.server)