Solved

whats are equivalent functions of sybase replace ,to_number of oracle

Posted on 2001-07-10
5
3,087 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 100 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

717 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