Viewing 15 posts - 1,021 through 1,035 (of 1,132 total)
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...
October 16, 2005 at 9:55 am
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...
October 13, 2005 at 7:33 pm
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...
October 13, 2005 at 6:51 pm
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...
October 13, 2005 at 6:37 pm
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...
October 13, 2005 at 1:19 pm
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...
October 13, 2005 at 12:53 pm
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...
October 12, 2005 at 5:51 pm
Check the SQL server startup configuration and see if trace flags -T1204 or -T3605 have been set.
October 12, 2005 at 4:04 pm
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...
October 12, 2005 at 4:00 pm
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)...
October 12, 2005 at 3:52 pm
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,...
October 12, 2005 at 3:40 pm
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...
October 11, 2005 at 10:01 am
-- 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...
October 10, 2005 at 2:04 pm
See stored procedure sp_helprotects
October 10, 2005 at 6:26 am
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...
October 10, 2005 at 6:21 am
Viewing 15 posts - 1,021 through 1,035 (of 1,132 total)