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 |
|
binita007
Starting Member
2 Posts |
Posted - 2010-12-16 : 02:29:09
|
| Hi friends,I have a string that contains the full path to a file. How can I extract the directory path from the string in Oracle?For example, if I have a full file path as follows:'c:\windows\temp\example.xls'I want to retrieve the following:'c:\windows\temp'Thanks in advance. |
|
|
Devart
Posting Yak Master
102 Posts |
Posted - 2010-12-16 : 02:59:43
|
| Hello,For example:selectSUBSTR('c:\windows\temp\example.xls',1,LENGTH('c:\windows\temp\example.xls')-REGEXP_INSTR(replace(reverse('c:\windows\temp\example.xls'),'\','~*~'),'~*~'))from dual;Devart,SQL Server Tools:dbForge Schema ComparedbForge Data ComparedbForge Query Builder |
 |
|
|
binita007
Starting Member
2 Posts |
Posted - 2010-12-16 : 03:20:20
|
| Thanks. |
 |
|
|
|
|
|