Home Forums SQL Server 2005 SQL Server 2005 General Discussion List Files In Directory Using SQL RE: List Files In Directory Using SQL
Fishbarnriots
SSCrazy
Points: 2568
More actions
September 15, 2010 at 2:34 am
#1221173
Hi,
The statement
SELECT SUBSTRING(Name,40,100) AS Files
FROM #DBAZ
Does not seem to work for me, but
SELECT ltrim(rtrim(reverse(SUBSTRING(reverse(Name), 1,charindex(char(32),reverse(Name))-1)))) AS Files
Does the trick