Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 REFERENCING MUTILPLE DATBASES

Author  Topic 

nguyenl
Posting Yak Master

128 Posts

Posted - 2008-09-26 : 18:44:43
Hi,

Nw2006 is in another database called Nox (same server), and The other tables are in the database called "ascend30". I am getting the error that Ascend30 tables cannot be bound. Why?

update NW_2006
set TOT_ACRES = [ASCEND30].[dbo].[property_char.value]
FROM
[ASCEND30].[dbo].[property] INNER JOIN
[ASCEND30].[dbo].[property_char] ON [ASCEND30].[dbo].[property.id] = [ASCEND30].[dbo].[property_char.property_id]
INNER JOIN nw_2006 on nw_2006.parcel_number = [ASCEND30].[dbo].[property.parcel_number]
WHERE [ASCEND30].[dbo].[property.eff_to_date] is NULL
AND ([ASCEND30].[dbo].[property_char.prop_char_typ_code] = 'size')
AND ([ASCEND30].[dbo].[property_char.tax_year] = 2006)

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-27 : 01:56:48
quote:
Originally posted by nguyenl

Hi,

Nw2006 is in another database called Nox (same server), and The other tables are in the database called "ascend30". I am getting the error that Ascend30 tables cannot be bound. Why?

update NW_2006
set TOT_ACRES = [ASCEND30].[dbo].[property_char.value]
FROM
[ASCEND30].[dbo].[property] INNER JOIN
[ASCEND30].[dbo].[property_char] ON [ASCEND30].[dbo].[property.id] = [ASCEND30].[dbo].[property_char.property_id]
INNER JOIN nw_2006 on nw_2006.parcel_number = [ASCEND30].[dbo].[property.parcel_number]
WHERE [ASCEND30].[dbo].[property.eff_to_date] is NULL
AND ([ASCEND30].[dbo].[property_char.prop_char_typ_code] = 'size')
AND ([ASCEND30].[dbo].[property_char.tax_year] = 2006)


are you using case sensititive collation?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-27 : 13:04:03
Should be like this:
quote:
Originally posted by nguyenl

Hi,

Nw2006 is in another database called Nox (same server), and The other tables are in the database called "ascend30". I am getting the error that Ascend30 tables cannot be bound. Why?

update [Nox].[dbo].[NW_2006]
set [Nox].[dbo].[TOT_ACRES] = [ASCEND30].[dbo].[property_char].[value]
FROM
[ASCEND30].[dbo].[property] INNER JOIN
[ASCEND30].[dbo].[property_char] ON [ASCEND30].[dbo].[property].[property.id] = [ASCEND30].[dbo].[property_char].[property_id]
INNER JOIN [Nox].[dbo].[nw_2006] on [Nox].[dbo].[nw_2006].[parcel_number] = [ASCEND30].[dbo].[property].[parcel_number]
WHERE [ASCEND30].[dbo].[property].[eff_to_date] is NULL
AND ([ASCEND30].[dbo].[property_char].[prop_char_typ_code] = 'size')
AND ([ASCEND30].[dbo].[property_char].[tax_year] = 2006)

Go to Top of Page
   

- Advertisement -