Rainbow Portal 2005改用SQL2005後,若將相容性層級(Compatibility Level)設定為SQL Server 2005 (90),則會造成錯誤,問題發生在 rb_GetModulesSinglePortal 這支Stored Procedure,修改方法如下: ALTER PROCEDURE [dbo].[rb_GetModulesSinglePortal] ( @PortalID int ) AS SELECT 0 AS ModuleID, 'NO_MODULE' AS ModuleTitle, -1 AS TabOrder UNION SELECT rb_Modules.ModuleID, rb_Tabs.TabName + '/' + rb_Modules.ModuleTitle + ' (' + rb_GeneralModuleDefinitions.FriendlyName + ')' AS ModTitle, rb_Tabs.TabOrder FROM rb_Modules INNER JOIN rb_Tabs ON rb_Modules.TabID = rb_Tabs.TabID INNER JOIN rb_ModuleDefinitions ON rb_Modules.ModuleDefID = rb_ModuleDefinitions.ModuleDefID INNER JOIN rb_GeneralModuleDefinitions ON rb_ModuleDefinitions.GeneralModDefID = rb_GeneralModuleDefinitions.GeneralModDefID WHERE (rb_Tabs.PortalID = @PortalID) AND (rb_GeneralModuleDefinitions.GeneralModDefID 'F9F9C3A4-6E16-43b4-B540-984DDB5F1CD2' AND ...