Drive Letter Finder

  • Comments posted to this topic are about the item Drive Letter Finder

  • 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


    Cursors are useful if you don't know SQL

  • 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