Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
matrixr
Starting Member
26 Posts |
Posted - 2006-02-02 : 02:33:33
|
| i have a table with a list of urls, they look like this/Programming/CSharp/Default.aspx/Programming/CSharp/Intro.aspx/Programming/HowTo/Default.aspx/Store/Default.aspxwhat i want to do is get an output similar to thisProgramming/CSharpProgramming/HowToStoreall i got so far is SUBSTRING(Url, 2, LEN(Url)) which returns Programming/CSharp/Default.aspxany ideas?thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-02-02 : 02:39:29
|
| [code]select substring(url, 2, len(url) - charindex('/', reverse(url)) - 1)from( select '/Programming/CSharp/Default.aspx' as url union all select '/Programming/CSharp/Intro.aspx' union all select '/Programming/HowTo/Default.aspx' union all select '/Store/Default.aspx') as urls[/code]----------------------------------'KH' |
 |
|
|
matrixr
Starting Member
26 Posts |
Posted - 2006-02-02 : 02:46:37
|
| wow amazingthanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-02 : 03:32:26
|
| Also in ASP file system object, you can make use of AbsolutePath featureMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|