?
Solved

whats are equivalent functions of sybase replace ,to_number of oracle

Posted on 2001-07-10
5
Medium Priority
?
3,137 Views
Last Modified: 2010-08-05
whats are the equivalent functions in sybase for replace and to_number in oracle..,

Sridhar.
0
Comment
Question by:sriven3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Accepted Solution

by:
mathavra earned 400 total points
ID: 6270319
You can use convert function for to_number as below:

select convert(int, "12345")


You may be able to use "stuff" function for replace:


It Returns the string formed by deleting a specified number of characters from one string and replacing them with another string.

Syntax
stuff(char_expr1, start, length, char_expr2)

Arguments
char_expr1 - is a character-type column name, variable, or constant expression of char, varchar, nchar or nvarchar type.

start - specifies the character position at which to begin deleting characters.

length - specifies the number of characters to delete.

char_expr2 - is another character-type column name, variable, or constant expression of char, varchar, nchar or nvarchar type.

Examples
select stuff("abc", 2, 3, "xyz")
go
----
axyz

select stuff("abcdef", 2, 3, null)
go
---
aef

select stuff("abcdef", 2, 3, "")
go
----
a ef

0
 
LVL 5

Expert Comment

by:amitpagarwal
ID: 6273039
seen a very similar question earlier .. maybe search in PAQ's
0
 
LVL 6

Expert Comment

by:ChrisKing
ID: 9882571
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: mathavra

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

ChrisKing
EE Cleanup Volunteer
0
 

Expert Comment

by:dougsur
ID: 22723533
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question