Forum Replies Created

Viewing 15 posts - 16 through 30 (of 66 total)

  • RE: Query without using ''''UNION''''

    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

  • RE: import from excel

    What you need is design of your project.

    1. Create data model
    2. Specify requirements
    3. Consider how to provide data
    4. Then worry about how to use SQL 2005 for your project.

    First data model. According to your information...

  • RE: Query without using ''''UNION''''

    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...

  • RE: postgreSQL migration problem!!!!

    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...

  • RE: need help from all DBAs and developers

    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...

  • RE: run a program as a result of a trigger?

    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...

  • RE: Fire Email Task Base on A Condition

    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'

       ...

  • RE: execute dos command on results of a query.

    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...

  • RE: run a program as a result of a trigger?

    I am not 100 % sure what your requirements are but I will suggest you try this:

    1. Create a trigger in a table as below:
    2. CREATE TRIGGER TriggerTest ON [dbo].[TestTable]

      FOR INSERT

      AS

      Exec...

  • RE: need help from all DBAs and developers

    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...

  • RE: Select All Where SUM(column) 0

    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...

  • RE: Need to create csv file from script output on mysql database

    Follow the instruction below:

    1. Open DTS designer in the Enterprise Manager.
    2. Create a connection using Other Connection. This is your source database - MySQL database. For this you need to create an...
  • RE: Problem with sending mail in SQL Server 2000

    First, visit here: http://support.microsoft.com/kb/312839

    Then

    • check services in your SQL server. See if SMTP(Simple Mail Transport Protocol) is started. If disabled, set it to Automatic or Manual then start it.
  • RE: DTSRun error

    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...

Viewing 15 posts - 16 through 30 (of 66 total)