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
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
here are some examples and explanations about the usage of xp_cmdshell and bcp