Viewing 15 posts - 16 through 30 (of 66 total)
Dear IT-75, what a charming code you have. Thanks for your most appropriate advice using coalesce function. I am learning a lot everyday. -Terry
March 1, 2007 at 1:40 pm
What you need is design of your project.
First data model. According to your information...
February 28, 2007 at 10:19 pm
Read this in the forum: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=347999
February 28, 2007 at 8:09 pm
Try this: (I craeted tables and populated data for testing in the beginning.)
SET NOCOUNT ON
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Alias]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table...
February 28, 2007 at 7:34 pm
You did not specify your problem. Why you think trigger is not working??? Why you want to use Rule??? As Rule is a database object that is bound to columns...
February 28, 2007 at 5:53 pm
Thanks Administrator for your comments. But I understand fully what his new requirements are now. I updated my test data for his new requirement as in the script below.
I added...
February 28, 2007 at 3:34 pm
You may try something like this:
CREATE TRIGGER TriggerTest ON [dbo].[TransactionLineItems]
FOR INSERT
AS
Exec Master..xp_cmdshell 'C:\aaa.bat abcd, efgh'
-- Wait for 3 seconds for the bach file execution
Waitfor Delay '000:00:03'
-- Check if any failure reported...
February 27, 2007 at 7:35 pm
You do not have to use email task, but use
Exec Master..xp_sendmail @recipients = @Precipients
,@message = @Pmessage
,@query = @Pquery
,@attachments = 'Data.xls'
,@subject = @Psubject
,@attach_results = 'TRUE'
...
February 27, 2007 at 6:50 pm
Try this:
declare @SQLCommand Varchar(500)
declare @FullFilePath Varchar(100)
Select @FullFilePath='d:\cert' --FullFilePath From yourtable Where something unique
Set @SQLCommand='RD "' + @FullFilePath + '" /S /Q'
Print @SQLCommand
--Exec Master..xp_cmdshell @SQLCommand
Once you confirm the printed @SQLCommand...
February 27, 2007 at 6:44 pm
I am not 100 % sure what your requirements are but I will suggest you try this:
FOR INSERT
AS
Exec...
February 27, 2007 at 6:29 pm
Now I understand what your requirements are. You want to display hourly sales history. Even if there were no sales made you still need to display in a chart or something for...
February 27, 2007 at 5:53 pm
Try this:
SET NOCOUNT ON
-- Drop tables if alraedy exist
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Table1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Table1]
-- Creat table Table1 and populate...
February 26, 2007 at 8:43 pm
Follow the instruction below:
February 26, 2007 at 7:37 pm
First, visit here: http://support.microsoft.com/kb/312839
Then
February 26, 2007 at 3:41 pm
The dts package from enterprise manager or DTSRUNUI it works fine, but if I try to schedule the dts package it fails.
This is quite common symptom when you...
February 26, 2007 at 2:46 pm
Viewing 15 posts - 16 through 30 (of 66 total)