Viewing 15 posts - 391 through 405 (of 1,315 total)
Getting back to the question of why the query performs differently in a procedure, an execution plan must be chosen when the procedure is compiled with no knowledge of the...
September 10, 2008 at 5:36 pm
After you add the maximum RAM to your server, I would recommend beefing up tempdb. All those cursors are going to be created in tempdb, so you would like...
August 26, 2008 at 8:36 am
I'm not able to test this at the moment, but it's worth a try:
OBJECT_SCHEMA_NAME(@@PROCID) + '.' + ERROR_PROCEDURE()
April 2, 2008 at 8:51 am
Page splits only occur in clustered tables because a clustered table must store records in the order specified by the index. If an update enlarges a record so it...
February 19, 2008 at 11:02 am
You can rebuild the indexes on the table, then check the table fragmentation regularly (daily?) with sys.dm_db_index_physical_stats. If the table becomes fragmented quickly after reindexing, you should probably lower...
February 13, 2008 at 8:08 am
The correct answer has to be 1+2+3. From "How Merge Replication Detects and Resolves Conflicts" in BOL:
As the Merge Agent enumerates changes to be applied during synchronization, it compares...
January 22, 2008 at 2:43 pm
The execution of a package isn't affected by where you store the package, but if you want to save the package as part of a solution, either to group it...
January 22, 2008 at 2:10 pm
Picking unique names is not the hard part, there are several ways to do it. It sounds like there are duplicate rows with the same name, and they may...
January 22, 2008 at 11:11 am
The CTE and the subquery versions are essentially identical in this case.
I am worried that you have multiple rows for some names that may have different subsets of columns populated....
January 21, 2008 at 12:40 pm
You can create database roles and grant all SQL rights to the roles, or give the new roles membership in db_datareader, db_datawriter, etc. Then you can add each Windows...
January 21, 2008 at 12:24 pm
A good source of WTF examples is thedailyWTF.com, and this is one of my all-time favorite T-SQL examples.
[Code]ALTER TRIGGER [tgIntegrity_InsertUpdateCampaignNumber] ON [customer_products]
FOR INSERT, UPDATE
AS
...
January 21, 2008 at 10:16 am
You could use: [font="Courier New"]'"' + REPLACE(UglyData, '"', '""') + '"'[/font]
but a there's a shorter way: [font="Courier New"]QUOTENAME(UglyData, '"')[/font]
For example:
[font="Courier New"]SELECT QUOTENAME(UglyData, '"')
FROM ( SELECT ...
January 17, 2008 at 7:57 am
In SQL 2000 the owner or schema of an object was indicated by the uid value in sysobjects and could be looked up in sysusers.
In SQL 2005 the owner of...
January 15, 2008 at 4:13 pm
First I'd like to say I agree that using Windows authentication is the best approach, but assuming you have no option than to use SQL logins and you want to...
January 14, 2008 at 9:41 am
You might be able to rewrite your trigger to avoid throwing errors. Instead of using "CONVERT(VARCHAR(25),..." you might try "LEFT(CONVERT(VARCHAR(max),...), 25)". Or use BEGIN TRY ... BEGIN CATCH...
January 14, 2008 at 8:24 am
Viewing 15 posts - 391 through 405 (of 1,315 total)