November 11, 2009 at 7:24 pm
Comments posted to this topic are about the item Drive Letter Finder
November 17, 2009 at 4:33 pm
I think this'll give you the same result with a lot less work:
declare @Foo table (drive char(1),mbfree int)
INSERT INTO @Foo EXEC master..xp_fixeddrives
IF @@rowcount = 26
SELECT '*' as drive
ELSE
SELECT TOP 1 drive FROM @Foo ORDER BY drive
Or to see all the details:
declare @Foo table (drive char(1),mbfree int)
INSERT INTO @Foo EXEC master..xp_fixeddrives
SELECT * FROM @Foo
Warning; xp_fixeddrives IS undocumented
November 18, 2009 at 3:29 am
A small point - VERY SMALL - is that Available is spelt incorrectly. Thought you might want to correct the article.
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply