Forum Replies Created

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

  • RE: Help Creating this trigger

    Some quirks with triggers:

    1. Triggers are invoked based on the statement but the statment may or may not have update any rows. For example, this statement will cause the...

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

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

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

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

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

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

  • RE: Lock Manager Deadlock search

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

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

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

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

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

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

  • RE: object level permissions through T-SQL

    See stored procedure sp_helprotects

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

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