Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Trim to a \

$
0
0

Have  table with a list of documents and their location in it, need to get just the document name (have over 64000 docs).  Table looks like:

\\Shared\db\A1\A1-422\EMAILDOC.000.HTML
\\Shared\db\A00001\A000010462\CP000A.000.doc
\\Shared\db\A00001\A000010521\LIT03.000.doc
\\Shared\db\a1\a1-522gmce\fax007.000
\\Shared\DB\A00001\A000010576\lp002.000.doc
\\Shared\db\A00001\A000010659\GEN003.000.doc
\\Shared\db\a00001\a000010659\gen011.000.doc
\\Shared\db\A00001\A000010813\COML0001.000.doc
\\Shared\db\A00001\A000010813\clp001.000.doc

Need it to return:

EMAILDOC.000.HTML
CP000A.000.doc
LIT03.000.doc
fax007.000
lp002.000.doc
GEN003.000.doc
gen011.000.doc
COML0001.000.doc
clp001.000.doc

Any help be appreciated as tried to declare it and trim to \ but keep getting an error.

Thanks in advance.


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>