Forum Replies Created

Viewing 15 posts - 46 through 60 (of 166 total)

  • RE: Moving DTS Package

    You can save the DTS package as a Structured Storage File within the Save As Dialog box.  This will allow you to send or store the file as well as...

  • RE: Current Users in the system

    There is a stored procedure called sp_MSget_current_activity in the master database which returns all the current activity on the server.  This would be a good place to start.  You can...

  • RE: Setting login properties

    I'v run into things similar to this in the past.  What I do when I want to find exactly how to add something via a script is run profiler on...

  • RE: using variables in stored procedure

    In the past when I have had to work with this I have itilised the COALESCE feature.  For example:

    CREATE PROCEDURE sample

    @p_some_num INTEGER = NULL

    AS

    SELECT  field1, field2, field3, some_num

    FROM table

    WHERE sum_num...

  • RE: Restoring System Databases

    I'v done this same process for our DR plan and here are the steps I use:

    1.  Install SQL Server and all service packs on the new server, (If the file...

  • RE: Reducing Log File Size

    You can run this command to shrink the actual log file back to the default:

    DBCC SHRINKFILE (N'your log file name')

    DBCC shrinkdatabase(N'you db name',  TRUNCATEONLY )

  • RE: Comparison of empty string with string containing space characters

    Try replacing your = with LIKE.  It's better to use the LIKE indicator when comparing string information.  This should give you your expected results.

  • RE: xp_sqlagent_proxy_account Access Denied Error

    It's not the xp_cmdshell that I am getting the error returned on.  It's when I try to add the proxy account using xp_sqlagent_proxy_account.

  • RE: Maintenance Plan fails

    Do you have Integration Services installed?  I ran into a similar problem that was corrected once I installed

    integration services.

     

  • RE: Server Roles

    These is a Server Role called dbcreator which can create and alter databases.  In addition, there are roles called db_datareader/db_datawriter within each database if you need to grant access to...

  • RE: sql max() function

    This would work:

    SELECT MAX(SALARY)

    FROM SALARY

    WHERE SALARY < (SELECT MAX(SALARY) FROM SALARY)

  • RE: Conditional Summing

    First thought would be to use a CASE statement in your SELECT.  Something Like this:

    SELECT  ORDER_ID,

     CASE  WHEN SUM(ORDER_PRICE)<10 THEN SUM(ORDER_PRICE)

      WHEN SUM(ORDER_PRICE)>10 AND SUM(ORDER_PRICE)<20 THEN (SUM(ORDER_PRICE)-(ORDER_PRICE * .10))

      WHEN SUM(ORDER_PRICE)>0 THEN (SUM(ORDER_PRICE)-(ORDER_PRICE...

  • RE: Retrive rows using field number or column number

    I'v never scene this done.  I know you can use a column number that corelates to the filed order defined in your SELECT statement in the ORDER BY clause but...

  • RE: Alter Column - Add Not Null

    To Add a default constraint of 0 and then change the filed to NOT NULL I would use the following:

    ALTER TABLE DATA ADD CONSTRAINT

     DF_DATA_istested DEFAULT 0 FOR istested

    GO

    ALTER TABLE DATA

    ALTER...

Viewing 15 posts - 46 through 60 (of 166 total)