Wednesday 30 September 2015

Directory Inside View All Files Using Sql Server

 DECLARE @Dir VARCHAR(200)
 create   TABLE #tmpDir
                        (
                          subdirectory VARCHAR(MAX) ,
                          depth INT ,
                          [file] INT
                        )

 SET @Dir = FilePath
                    INSERT  #tmpDir
                            EXEC master.sys.xp_dirtree @Dir, 0, 1 ;

No comments:

Post a Comment

SqlDataBaseLibrary

using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using AOS.Repository.Infrastructure; using S...