Viewing 15 posts - 3,076 through 3,090 (of 8,416 total)
IF EXISTS
(
SELECT *
...
June 25, 2010 at 8:45 am
Do read Lynn's article - and make sure there's a useful index (leading on cdate).
If you are deleting a substantial proportion of the rows in the table, you might find...
June 25, 2010 at 8:36 am
Eugene Elutin (6/25/2010)
It just a bit unpredictable sometimes...My favoured one is "division by zero error" in SELECT Col1/Col2 FROM MyTable WHERE Col2 != 0
That's not unpredictable...it's a (good) design trade-off.
It's...
June 25, 2010 at 8:14 am
We can help the optimiser even more by adding a computed column. This won't add any data to the table - it's just a metadata change - but the...
June 25, 2010 at 8:09 am
skcadavre (6/25/2010)
June 25, 2010 at 8:00 am
mister.magoo (6/22/2010)
Another surprise (to me at least ) is that it only does one table scan of #test..
Only on 2005 and above, but it is an example of how sophisticated...
June 25, 2010 at 7:22 am
Gianluca Sartori (6/25/2010)
June 25, 2010 at 7:10 am
Eugene Elutin (6/25/2010)
June 25, 2010 at 7:03 am
Eugene Elutin (6/25/2010)
June 25, 2010 at 6:56 am
Try to avoid writing scalar user-defined functions. Try even harder to avoid writing scalar user-defined functions that access data tables. Instead of writing a function to process one...
June 25, 2010 at 5:09 am
SELECT SU.SystemUserID,
SU.ForeName,
SU.SurName,
SR.RoleName,...
June 25, 2010 at 5:05 am
Gianluca Sartori (6/25/2010)
I didn't know that. Thank you for pointing it out.I think I'll be adding schemabinding to LOTS of UDF soon. 😉
You're welcome. Be sure to test before...
June 25, 2010 at 4:39 am
Gianluca Sartori (6/25/2010)
Great code, Paul, as usual!!
Thanks. Sorry I didn't notice your reply before.
Just one question: what does schemabinding mean here? The return value depends only on the input...
June 25, 2010 at 4:01 am
Other options:
CREATE TABLE #TransactionTable
(
clientcode VARCHAR(50) NOT NULL,
...
June 25, 2010 at 3:57 am
CREATE FUNCTION dbo.IntToDate
(
@Input INTEGER
)
RETURNS TABLE
WITH...
June 25, 2010 at 3:40 am
Viewing 15 posts - 3,076 through 3,090 (of 8,416 total)