Viewing 15 posts - 48,106 through 48,120 (of 49,571 total)
Rob Reid (12/7/2007)
SELECT@TrigType= 'I', --for insert U=update
@RecordID= RecordID,
@ViewStatus = ViewStatus
FROM
INSERTED
That's not a good construct in a trigger. What happens when an insert affects more than one row?
Triggers fire once for...
December 8, 2007 at 1:34 pm
Run profiler against the SQL server that AS is connecting to. The deadlock's coming from the database, not AS.
You can alse try switching on traceflag 1204 (on SQL Server) so...
December 8, 2007 at 1:30 pm
Derek Dongray (12/7/2007)
Can anyone explain why the CTE works so differently from the temporary table and why SQL server doesn't optimise both the same way?
A CTE is essentially a...
December 8, 2007 at 1:24 pm
Ramesh (12/7/2007)
Christian Buettner (12/7/2007)
Hi Ramesh,what makes you sure that the order of the rows is guaranteed in your example?
Index
An index on a column does not guarantee that data will be...
December 8, 2007 at 1:21 pm
Assuming that HistoryID is the primary key....
DELETE FROM HistoryTable
WHERE HistoryID NOT IN
(SELECT Top 15 HistoryID FROM HistoryTable
ORDER BY UpdTimestamp DESC)
December 8, 2007 at 1:13 pm
Grant Fritchey (12/7/2007)
The main reason I've received for not using bit fields is because they don't allow null values.
They accept nulls just fine (unless defined not null). At least...
December 8, 2007 at 1:03 pm
use Query analyser to run the delete.
Deletes can run for a long time, and the query time is probably exceeding the timeout value for the application that you're using. Query...
December 7, 2007 at 5:31 am
Note that that's for varchar(max) or nvarchar(max) The largest number that you can use to define a varchar is 8000 (as in varchar(8000)) and 4000 for nvarchar (nvarchar(4000))
December 7, 2007 at 1:26 am
Ramesh (12/7/2007)
Create a non-clustered index on columns server, customer and add audit_output as include column.
audit_output is ntext, and as such can't be used as an include column.
Even if changed...
December 7, 2007 at 12:43 am
As first suggestions... These may not be completely optimal, as I don't hav your queries, I don't know the data distribution and I can't see the exec plans
Clustered index on...
December 7, 2007 at 12:39 am
They are column statistics created by SQL when it filters or joins on a column that doesn't have an index or existing stats.
They're there to tell the optimiser aproximatly...
December 7, 2007 at 12:24 am
TheSQLGuru (12/6/2007)
December 6, 2007 at 11:54 pm
That's not a very nice trigger.
Frank Lain (12/6/2007)
select @key = cashlist_key from INSERTED
What happens if more than one row is inserted in a batch?
December 6, 2007 at 11:41 pm
Ramesh (12/6/2007)
Jai,I appreciate your feedback but, dynamic SQL is not always the best choice, but the last choice if all else fails!!!!!
Performance-wise, with this kind or requirement it sometimes...
December 6, 2007 at 12:47 am
Viewing 15 posts - 48,106 through 48,120 (of 49,571 total)