Viewing 15 posts - 2,911 through 2,925 (of 3,606 total)
If you have a parameter whose sign determines the sort order then you can eliminate the case statement altogether.
select top 10 * from Employee order SIGN(@SortOrder)*job_id
December 14, 2004 at 1:29 am
Kalen Delaney's Inside SQL Server 2000 is a good one.
December 14, 2004 at 1:24 am
I don't think there is any particular problem with what you have written unless the tables are huge.
I may have this wrong but I'm pretty sure that SQL joins the...
December 13, 2004 at 6:21 am
I also dropped all indices before importing data.
The difference in performance is very noticeable. If time allowed I also used to stop MSSQLSERVER and SQLSERVERAGENT and run a disk...
December 9, 2004 at 12:49 pm
This one caught me out a few times.
When I first switched from SQL 6.5 to 7/2000 I kept on using the sp_addalias procedure to get around this.
However, best practice is...
December 9, 2004 at 12:38 pm
Well no matter how much I would like to look like Aragorn from Lord of the Rings I just know that I will end up looking like Yoda eventually.
I'm just...
December 9, 2004 at 2:52 am
See SQL Server Central's most popular article http://www.sqlservercentral.com/columnists/jtravis/understandingthedifferencebetweenisnull.asp
Try IS NULL rather than = NULL unless you want to SET ANSI_NULLS OFF
December 9, 2004 at 2:49 am
I have a mental image of Chewbacca in a bikini
December 9, 2004 at 2:29 am
CROSS JOINING?
Mummy, what's a werewolf?
Shut up and comb your face!
December 8, 2004 at 3:36 am
SELECT SUM(Hair)
FROM dbo.AspiringDBA
Produces the same results that it did 15 years ago. The difference comes when you do
SELECT Location,SUM(HAIR)
FROM dbo.AspiringDBA
GROUP BY Location WITH ROLLUP
..and see NULL against head.
Actually I'm doing...
December 8, 2004 at 2:22 am
Do you ever get the feeling that the law is to enrich lawyers and tax law is to enrich accountants?
Someone once wrote that the upper classes make illegal those pleasures...
December 6, 2004 at 3:40 am
CHECKPOINT
GO
BACKUP LOG YourDatabase WITH TRUNCATE_ONLY
CHECKPOINT
GO
USE YourDatabase
GO
EXEC sp_helpfile
One you have run the above you should be able to use your DBCC SHRINKFILE on the files listed.
December 6, 2004 at 2:57 am
Its a bit off topic but a similar problem exists if you are trying to sell open-source solutions.
Firstly, open-source is mistakenly seens as "free" software.
Secondly, if the software is cheap...
December 6, 2004 at 2:51 am
Look on the bright side Frank. Germans have been voted the most desirable tourists in Europe and British the least! This means an extra £1,000 on the cost of a holiday...
December 6, 2004 at 2:40 am
If you can identify a particular column that will cause a negative result then simply multiply your entire formula by
sign(sign(MyNegativeColumn)+1)
The sign function returns
December 3, 2004 at 8:34 am
Viewing 15 posts - 2,911 through 2,925 (of 3,606 total)