March 26, 2015 at 6:27 am
Hi Team,
I have a folder with 1000 text(.txt) files in it.
I want to insert the filenames into a table in sql server.
Is it possible in SQL Server 2008..?
March 26, 2015 at 6:33 am
Here's an example:
declare @FileList table
(
SubDir varchar(500)
,Depth int
,IsFile int
);
insert @FileList
(SubDir
,Depth
,IsFile
)
exec master.dbo.xp_dirtree "c:\users", 1, 1
select *
from @FileList fl
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 26, 2015 at 6:54 am
Thank you, Thank you.
Its working good.
March 30, 2015 at 3:52 am
Hi Team,
How to get the details from another server which does not have sql server installed on that machine.
March 30, 2015 at 4:26 am
Trying to access using below statement, but no results.
exec master.dbo.xp_dirtree "\\113.218.216.127\New folder\txt\", 1, 1
Please help to acccess the files names from different machine.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply