Noobie SQL Question
Feb 19, 2004
I am getting this message when I try to open the database in the enterprise manager. In all other locations it is telling me that the database is running any thoughts on how to resolve this?
The SQL Server \CRISPINDB1 is not known to be running. Are you sure you wish to connect?
Anything at all will be a great help to me thanks in advance.
View 6 Replies
Mar 20, 2008
I've got two tables:
CallLog (one)
Repository (many)
They both have the shared id of CallID. I'm trying to write a trigger that when one adds a record to the repository table, I want the CallLog table flagged with 'T'. My existing code is flagging everything thing in the CallLog table that has CallID match from the Repository table... How do I update the single row in the CallLog table? Driving me nuts!
USE [HEATPROD]
GO
/****** Object: Trigger [dbo].[WriteAttachmentFlagNew] Script Date: 03/19/2008 12:29:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[WriteAttachmentFlagNew]
ON [dbo].[Repository]
AFTER Insert
AS
BEGIN
UPDATE CallLog
SET AttachmentFlagNew = 'T'
FROM repository
WHERE calllog.CallID= repository.CallID
END
View 6 Replies
View Related
Jan 28, 2008
Hi all,
I need to get a better understanding of alter procedure. If I Create a Procedure in SQL Server 2005, and want to modify that to Alter Procedure statement instead of create procedure... How do I do that??
I'm not an SQL Server person.. I dont understand why my work place needs Alter proceudre all the time but all our procedures have Alter procedure statement. Once they are created they have to be changed to Alter procedure...
Do I just need to change the keyword CREATE to ALTER?? because when I try to save it ,,, it saves it as a .sql file... Not the script.
Immediate reply would be appreciated
Thanks
View 7 Replies
View Related