Avatar of TimHudspith
TimHudspith
 asked on

Iterate through a collection of files in T-SQL

I want to iterate through all the jpeg files in a folder, inserting them into a filestream column in SQL Server. I have a stored procedure to insert the files, but I don't know how to read through a series of folders and files using T-SQL.
Microsoft SQL ServerMicrosoft SQL Server 2008

Avatar of undefined
Last Comment
Habib Pourfard

8/22/2022 - Mon
tigin44

you can achive this by using xp_cmdshell commands and bulk copy.
TimHudspith

ASKER
Can you give me an example?
tigin44

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Habib Pourfard

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.