Viewing 15 posts - 136 through 150 (of 288 total)
You can also use @@ROWCOUNT UPDATE MyTable
SET Col1 = Val1 ...
IF @@ROWCOUNT > 0
BEGIN
-- DO other updates
ENDIf you have triggers on your table thay could affect the value of @@ROWCOUNT,...
April 6, 2010 at 1:14 pm
Missread the original post..
April 2, 2010 at 4:20 pm
This probably doesn't add much to the conversation, but as pointed out OR predicates often cause scans..
Since you have a compound index, you *might* see a gain by changing the...
April 1, 2010 at 1:56 pm
DrJogalog (3/31/2010)[hrThanks for the reply.
Our devlopers have a passion for writing 'no lock's' in their statements. The data returned in these queries should not actually change once written so there...
April 1, 2010 at 1:50 pm
Unfortunatly, I don't have much time to look at this right now. But, one quick thing that might help to improve the CTE is to get rid of the temp...
March 30, 2010 at 4:13 pm
More importatnly than speed is data integrity.
But, to your performance question, if you have a foreign key SQL can use that information optimize the query accordingly. Which, can...
March 26, 2010 at 2:21 pm
Paul White (3/17/2010)
puneet shadija (3/17/2010)
you need to join these two tables using left outer join as:
Select A.*
from Table2...
March 17, 2010 at 2:51 pm
There are several ways and I'm not sure any are all that great. Take a look in BOL for COLUMNS_UPDATED. That is one of the ways to determine which columns...
March 15, 2010 at 2:43 pm
Jeffrey Williams-493691 (2/17/2010)
February 17, 2010 at 4:10 pm
Here is a reply from Paul Randal (at the time the Dev Lead, Microsoft SQL Server Storage Engine) about why is shrinking a database not a good idea.. and I...
February 17, 2010 at 3:27 pm
Sounds like you are looking for more of a script that will generate all your tables. But, you can also script out the table with the idexes via SSMS if...
February 11, 2010 at 2:29 pm
Jeff Gray (2/10/2010)
I think you are the first person I've bumped into that gets this little "bit" of MSSQL trivia.
LOL! Thanks Jeff, that little quip made my day. 🙂
February 11, 2010 at 9:15 am
The firsrt thing is the second ON clause should be an AND:USING aaInventoryReorderLocalStock as source
ON (source.Location=target.IplStockLocation
AND source.AlternatePart=target.IplPartNumber)
...
February 10, 2010 at 1:42 pm
If I remember correctly SQL2000 and previous had "issues" with BIT columns.
I also was dealing with 100+ Million row tables that had many BIT columns and the simple act...
February 10, 2010 at 1:03 pm
Admittedly, I’m not sure I fully understand the problem. But, the simple solution seems to be to use a IDENTITY column. Perhaps you need a different table for you “Numbers.”...
February 5, 2010 at 2:03 pm
Viewing 15 posts - 136 through 150 (of 288 total)