无法绑定由多个部分组成的标识列
大家好,請教個問題,我用的vs2005和sql2005,在查詢分析器中,我有這樣的語句:SELECT G_Location.BranchCode, G_Location.LocationCode, G_Location.LocationName, G_Location.LocationNickName, G_Location.LocalSectionCode, G_Location.CompanyCode, G_Location.GyoumuInfo, MR_HosenLocation.MenuPtnId, MR_HosenLocation.ShinkansenKbn, MR_HosenLocation.ZairaisenKbn, MR_HosenLocation.DenshiShoninHyojiFlg, MR_HosenLocation.DefaultBranchCode, MR_HosenLocation.DefaultLocationCode, MR_HosenLocation.PlantCode, MR_HosenLocation.HokanBasho, MR_HosenLocation.TsutatsuKeihatsuKbn, MR_HosenLocation.YosanSekininsha, MR_HosenLocation.TammuLevelPtnCode, MR_HosenLocation.MaintenanceKbn, MR_HosenLocation.HyojiJuni FROM DB_Mst.SCH_Mst.G_Location INNER JOIN DB_Mst.SCH_Mst.G_SystemUseLocation ON G_Location.BranchCode=G_SystemUseLocation.BranchCode AND G_Location.LocationCode=G_SystemUseLocation.LocationCode INNER JOIN DB_Mst.SCH_Mst.MR_HosenLocation ON G_Location.BranchCode=MR_HosenLocation.BranchCode AND G_Location.LocationCode=MR_HosenLocation.LocationCode WHERE G_SystemUseLocation.SystemCode = 'SR' 這個是可以正常執行的,我把它寫在了代碼里,一直以來也沒有問題,程序可以正常工作,可是就在昨天,程序運行到這里的時候,突然就出現了{"The multi-part identifier \"G_Location.BranchCode\" could not be bound.\r\nThe multi-part identifier \"G_SystemUseLocation.BranchCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.LocationCode\" could not be bound.\r\nThe multi-part identifier \"G_SystemUseLocation.LocationCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.BranchCode\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.BranchCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.LocationCode\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.LocationCode\" could not be bound.\r\nThe multi-part identifier \"G_SystemUseLocation.SystemCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.BranchCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.LocationCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.LocationName\" could not be bound.\r\nThe multi-part identifier \"G_Location.LocationNickName\" could not be bound.\r\nThe multi-part identifier \"G_Location.LocalSectionCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.CompanyCode\" could not be bound.\r\nThe multi-part identifier \"G_Location.GyoumuInfo\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.MenuPtnId\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.ShinkansenKbn\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.ZairaisenKbn\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.DenshiShoninHyojiFlg\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.DefaultBranchCode\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.DefaultLocationCode\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.PlantCode\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.HokanBasho\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.TsutatsuKeihatsuKbn\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.YosanSekininsha\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.TammuLevelPtnCode\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.MaintenanceKbn\" could not be bound.\r\nThe multi-part identifier \"MR_HosenLocation.HyojiJuni\" could not be bound."} 的錯誤,我調查了之后,將select的字段和where中的條件都加上了DB名和Schema名的前綴"DB_Mst.SCH_Mst.",再次執行到這里的時候就可以正常通過,我很疑惑,為什么在查詢分析器中可以正常執行呢,還有為什么以前沒有出現這樣的錯誤,就是現在,在其它的機器上,程序執行到這里也是一樣沒有異常的,我以為是DB服務器的配置出了問題,可是在連接不同的DB服務器是也還是這樣,只是這一臺測試機不通過,其它機器沒問題;因為這部分程序已經提交了,客戶那里沒有出現這樣的問題,我不便再去修改sql了,請問,這些問題是sql語句本身的錯誤嗎,還有沒有其它的原因,急盼賜知,不勝感激!