[dba-SQLServer] Wend Statement Not Allowed

Stuart McLachlan stuart at lexacorp.com.pg
Tue Feb 28 15:20:27 CST 2006


On 1 Mar 2006 at 0:22, Darren HALL wrote:
> The desired result is 
> From..... .C:\Program Files\Some Folder\some cool file.dll
> I want.....some cool file.dll
> But
> I am getting.....C:\Program Files\Some Folder

That's what I would expect from a function named "GetPath" <g>
.....
>GetPath = Left$(aPath, aSlash)

Left$ is returning everything in aPath *up to* the last "\".
If you want everything *after* this, change this line to read :
 = Right$(aPath,Len(aPath) - aSlash)

I would also change the name of the function to GetFilename() or something 
similar.


-- 
Stuart





More information about the dba-SQLServer mailing list