I have to update 2 databases at once from a stored procedure. How can this be done? This is what I have so far. I get an error:
The multi-part identifier "magicCRM.dbo.courseScheduleID" could not be bound.
alter PROCEDURE [dbo].[usp_increment_registered] --usp_increment_registered 3128
-- Add the parameters for the stored procedure here
@courseScheduleID int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Update magicCRM_Web Table
UPDATE Course_Schedule
SET [Alternate_LocationID] = Alternate_LocationID + 1
WHERE courseScheduleID = @courseScheduleID
--update magicCRM Table
UPDATE [magicCRM].[dbo].[Course_Schedule]
SET magicCRM.dbo.[Alternate_LocationID] = magicCRM.dbo.Alternate_LocationID + 1
WHERE magicCRM.dbo.courseScheduleID = @courseScheduleID
END
Thank you!
Norbert