Yes I am using Oracle but my client gave me an memory error msg when I used your SQL command.
Look at what I tried:
SELECT SUBSTR ('$DocFileAndPath$',(INSTR ('$DocFileAndPath$','\',-1))+1) FROM DUAL
The $DocFileAndPath$ is my string.
Mathieu Pitre
IT Business Systems Analyst
Production Operation
Computer
Sciences Corporation
Pratt & Whitney Canada, Plant 1
Sametime: Mathieu Pitre
office: 450-647-8008 x7030
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| "Eric Cleereman (IT)"
<[EMAIL PROTECTED]>
Sent by: "Action Request System discussion list(ARSList)" <[email protected]> 26/07/2006 10:48 AM
|
|
Hi Mathieu,
Don't know if you are using Oracle, but if you are, try the following SQL:
SELECT SUBSTR ('\\path\...\FileName.ext',(INSTR ('\\path\...\FileName.ext','\',-1))+1) FROM DUAL
This will return only the file name and extension.
Eric Cleereman
-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] Behalf Of Mathieu Pitre
Sent: Wednesday, July 26, 2006 10:42 AM
To: [email protected]
Subject: HOW-TO Change a string?
Hi all,
I would like to know how to modify the following string whitin a Set field
Action:
\\path\path\path\path\FileName.ext
I would like to separate the file name out of the file path. The path can
always change and the file name too. I am trying to find the location
(integer) of the last "\" by using the STRSTRC function but it returns "0"
since the path always starts with a "\".
Any suggestion?
Mathieu Pitre
ARS 6.3
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

