|
REPLACE function [String] in Sybase Adaptive Server(ASE)
|
|
02-02-2010, 02:18 AM
Post: #1
|
|||
|
|||
|
REPLACE function [String] in Sybase Adaptive Server(ASE)
Function
Replaces all occurrences of a substring with another substring. Syntax REPLACE ( original-string, search-string, replace-string ) Parameters If any argument is NULL, the function returns NULL. original-string The string to be searched. This string can be any length. search-string The string to be searched for and replaced with replace-string. This string is limited to 255 bytes. If search-string is an empty string, the original string is returned unchanged. replace-string The replacement string, which replaces search-string. This can be any length. If replace-string is an empty string, all occurrences of search-string are deleted. Examples The following statement returns the value xx.def.xx.ghi. Code: SELECT REPLACE( 'abc.def.abc.ghi', 'abc', 'xx' ) FROM iq_dummyThe following statement generates a result set containing ALTER PROCEDURE statements which, when executed, repair stored procedures that reference a table that has been renamed. (To be useful, the table name needs to be unique.) Code: SELECT REPLACE(Use a separator other than the comma for the LIST function: Code: SELECT REPLACE( list( table_id ), ',', '--')Standards and compatibility SQL/92 Vendor extension. Sybase Compatible with Adaptive Server Enterprise. Ref: Sybase Inc |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Need help in converting String to Date format | surbhit4u | 0 | 206 |
06-22-2010 01:05 PM Last Post: surbhit4u |
|
| String concatenation operator in Sybase T-SQL | Joshi | 0 | 751 |
02-03-2010 11:06 PM Last Post: Joshi |
|
| SQL to Replace String in Sybase | john | 0 | 1,913 |
12-09-2009 05:15 PM Last Post: john |
|
| Replace string in Sybase | Joshi | 0 | 195 |
09-09-2009 01:49 AM Last Post: Joshi |
|
| sybase string functions with examples | john | 0 | 776 |
07-07-2009 02:30 AM Last Post: john |
|
| Sybase create function | zaadmin | 0 | 157 |
07-05-2009 06:42 PM Last Post: zaadmin |
|
| sybase dateadd function | Joshi | 0 | 1,253 |
03-12-2009 11:00 PM Last Post: Joshi |
|
| T-SQL: A Simple Way to Build a String from a Column | zaadmin | 0 | 266 |
10-10-2008 09:50 PM Last Post: zaadmin |
|


Chat Support
Search
Disclaimer & Rules
Help


