Forum Replies Created

Viewing 15 posts - 1,021 through 1,035 (of 1,131 total)

  • RE: Indexing Questions

    See system stored procedure sp_helpindex

    Not using the MS provided methods but there are some index related scripts at http://www.sqlservercentral.com/Scripts/listscripts.asp?categorynm=Index%20Management&categoryid=4

    This is a very complicated subject.

    I recommend Dr. Dennis Shasta's book...

    SQL = Scarcely Qualifies as a Language

  • RE: Restore Transaction Log

    Yes, this solution will allow full point in time recovery.

    Depending on the database size and the amount of data updated between the full and differential backup, you may find that...

    SQL = Scarcely Qualifies as a Language

  • RE: Grant permission on xp_CmdShell for special user

    See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp

    By default, only members of the sysadmin fixed server role can execute this extended stored procedure. You may, however, grant other users permission to execute this stored procedure.

    When...

    SQL = Scarcely Qualifies as a Language

  • RE: @@error problem

    As message 245 has a severity level of 16, this causes the batch to terminate and you cannot trap the error message.

    Try instead:

    declare @serialString varchar(128)

    , @SerialNumber integer

    set @serialString = 'MNO0101...

    SQL = Scarcely Qualifies as a Language

  • RE: Can''''t get UDF to replace Cursor

    The End for the CASE is in the wrong place. Here is a tested solution that results in

    1 1 Country One 10 11 , 2 Country Two...

    SQL = Scarcely Qualifies as a Language

  • RE: Raising an error to ADO

    With the SQL Server ODBC or OLEDB drivers, only the FIRST status code is available.

    The SQL statements:

    RAISERROR (50000,10,1)

    RAISERROR (60000,10,1)

    Returns a status code of 50,000 and the status of 60,000 cannot...

    SQL = Scarcely Qualifies as a Language

  • RE: Lock Manager Deadlock search

    Check the SQL server startup configuration and see if trace flags -T1204 or -T3605 have been set.

    SQL = Scarcely Qualifies as a Language

  • RE: Null comparison question

    The "SET ANSI_NULLS OFF" needs to be specified as a run time setting, and does not need to be set at creation time of the stored procedure. Just move...

    SQL = Scarcely Qualifies as a Language

  • RE: Can''''t get UDF to replace Cursor

    Your treatment of null and converts of numerics appears to be reversed. You need first to convert from numeric to varchar (which will convert null numerics to null varchars)...

    SQL = Scarcely Qualifies as a Language

  • RE: Access Violations

    I was able to reproduce the access violation under both 8.00.818 (SP3 with security patch MS03-031) and 8.00.2039 (SP4).

    Recommend calling Microsoft Product Support. As you have a reproducable problem,...

    SQL = Scarcely Qualifies as a Language

  • RE: fn_trace_gettable error

    Was SQL Server restarted while the trace was running? If so, then the "trace stop" event was not written to the trace file and fn_trace_gettable will throw an error...

    SQL = Scarcely Qualifies as a Language

  • RE: Query for Hierarchical datasets

    -- SQL 1 Parent and oldest child

    select Parent.*, OldestChild.*

    from MyTable as Parent

    join MyTable as OldestChild

    on Parent.ParentId = OldestChild.ParentId

    join (select ParentId

    , MAX(DateUpdated) as DateUpdated

    from MyTable

    group...

    SQL = Scarcely Qualifies as a Language

  • RE: object level permissions through T-SQL

    See stored procedure sp_helprotects

    SQL = Scarcely Qualifies as a Language

  • RE: Update using sub queries

    Probably a incorrect syntax. Here is a statement that should work:

    Update Customer

    set FirstOrderDt = New.FirstOrderDt

    , LastOrderDt = New.LastOrderDt

    FROM (

    SELECT

    dbo.Customers.CustomerID,

    MIN(dbo.Orders.dtOrderDate) AS FirstOrderDt,

    MAX(dbo.Orders.dtOrderDate) AS LastOrderDt

    FROM dbo.Customers

    INNER JOIN...

    SQL = Scarcely Qualifies as a Language

  • RE: scary? - changing sa password on production server

    No reboot or SQL Server/Agent restart is required.

    I am certain because on each of over 100 SQL Servers, a job runs on Wednesdays at 3PM that changes the...

    SQL = Scarcely Qualifies as a Language

Viewing 15 posts - 1,021 through 1,035 (of 1,131 total)