RE: The multi-part identifier could not be bound
- From: dtatham <dtatham@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Jan 2007 09:46:18 -0800
Ignore this request. I got it to work by changing the script to use alias'
and it works fine now.
"dtatham" wrote:
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.
- References:
- The multi-part identifier could not be bound
- From: dtatham
- The multi-part identifier could not be bound
- Prev by Date: The multi-part identifier could not be bound
- Next by Date: Re: Inner join
- Previous by thread: The multi-part identifier could not be bound
- Next by thread: Re: Inner join
- Index(es):
Relevant Pages
|
|