Viewing 15 posts - 286 through 300 (of 367 total)
Are you using a slash (/) or a backslash (\) to separate server from instance name ? Just a guess from experience 🙂
June 1, 2011 at 5:18 pm
Jeff's article is very nice, but I'll try to give you a direct answer in much simpler form.
In the result, letters A,B,C are unique per row. So, you have to...
June 1, 2011 at 5:13 pm
If you don't care to have special handling of the error case:
SET XACT_ABORT ON -- in case of error, there will be implicit rollback and procedure stop
Begin Tran
Insert into Table1...
May 31, 2011 at 8:37 am
Comment out HAVING clause and if that doesn't help, comment-out WHERE also.
Please use aliases, e.g:
SELECT mt.Name
from myDatabase.mySchema.MyTable mt -- mt is alias from this long full table name
May 31, 2011 at 8:27 am
See why your query is slow, what it is waiting for. You can find a very nice sp_who2 replacement here:
http://sqlblog.com/files/default.aspx
It is procedure sp_WhoIsActive from Adam Mechanic, and displays wait info.
Very...
May 31, 2011 at 8:19 am
Thank you all 🙂
May 11, 2011 at 2:47 pm
select * from dbo.Abbreviate(' aaa .. bbb ,, ccccc ')
--Result (without ;):
&#;x20;
Sory, result text was eaten by some html machinery - strange result...
May 11, 2011 at 5:39 am
Jeff, what your function Abbreviate supposed to do ?
It seems to me that it does not do much:
select * from dbo.Abbreviate('aaa bbb ccccc')
Result:
a
select * from dbo.Abbreviate(' aaa...
May 10, 2011 at 5:38 pm
You claim 700% faster yet I see no test data.
Jeff, did you run the script ?
May 10, 2011 at 1:03 am
Jeff Moden (5/9/2011)
Vedran Kesegic (5/9/2011)
I could easily write it in the form of the non-RBAR, but the performance would not be as fast.
You have test code that proves that,...
May 9, 2011 at 8:41 pm
Why count at all ?
If you want to check that all rows from the source table (tblimportdaily_ageukdif_tvl) are successfully inserted into target table (tblTvlInvites) you could check if @@rowcount after...
May 9, 2011 at 3:46 pm
I could easily write it in the form of the non-RBAR, but the performance would not be as fast. How many times do we pass through the loop here ?...
May 9, 2011 at 3:33 pm
This handles different separator characters (not just space),
handles multiplication of the separators (e.g. double space or space at the beggining of the string),
and works from SQL 2000 and up:
DECLARE @string...
May 8, 2011 at 2:07 pm
Your COMMIT and ROLLBACK commands are both under IF's and it can happen that none of them is executed (e.g. if one of the variable in logical expression is NULL...
May 8, 2011 at 12:56 pm
My guess is that you should not join "MyTable" several times in your UPDATE statement.
Instead of:
UPDATE MyTable SET .... FROM (SELECT FROM MyTable ...) x WHERE x.id = MyTable.id
Use:
UPDATE t
SET...
May 8, 2011 at 12:48 pm
Viewing 15 posts - 286 through 300 (of 367 total)