Home » SQL & PL/SQL » SQL & PL/SQL » Searching a part of string
Searching a part of string [message #8701] Fri, 19 September 2003 04:55 Go to next message
Taran
Messages: 21
Registered: December 2001
Junior Member
Hi , I want to serach from the column with following type of enteries
&REV&102036-0194-chq
From this I want only 102036 part.When I use any function like substr , instr or replace , translate,it takes & as for entering value.Like here it says
Enter value for REV
How shud I search the numbers in the string .Kindly help soon
Thanx
Re: Searching a part of string [message #8702 is a reply to message #8701] Fri, 19 September 2003 05:20 Go to previous messageGo to next message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Issue SET SCAN OFF in your SQL*Plus session first.

A.
Re: Searching a part of string [message #8703 is a reply to message #8702] Fri, 19 September 2003 07:15 Go to previous messageGo to next message
Dilip
Messages: 12
Registered: January 2002
Junior Member
Hi Art:
Is SET SCAN OFF any different from SET DEFINE OFF?

-Dilip
Re: Searching a part of string [message #8704 is a reply to message #8703] Fri, 19 September 2003 07:33 Go to previous message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
quote from Dilip:
----------------------------------------------------------------------
Hi Art:
Is SET SCAN OFF any different from SET DEFINE OFF?

-Dilip

----------------------------------------------------------------------

This link
should help answer your question:

----------------------------------------------------------------------
[b][font=Arial, Helvetica, sans-serif][i]DEF[[INE]]{[/i]&[i]&#124[i]c[/i]&#124[/i]ON[i]&#124OFF}[/i][/font][/b]

[list]
[list]

Sets the character used to prefix substitution variables to [i]c[/i]. ON or OFF controls whether SQL*Plus will scan commands for substitution variables and replace them with their values. ON changes the value of [i]c[/i] back to the default[i] '[/i]&'[i],[/i] not the most recently used character. The setting of DEFINE to OFF overrides the setting of the SCAN variable. For more information on the SCAN variable, see the [url="http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a82950/apf.htm#623418"]SET SCAN[/url] command in [url="http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a82950/apf.htm#623304"]Appendix F[/url].[/list][/list]

----------------------------------------------------------------------
HTH,

A.
Previous Topic: Java.exe Error
Next Topic: cursor reference out of scope
Goto Forum:
  


Current Time: Tue Apr 23 22:16:31 CDT 2024