Solved

whats are equivalent functions of sybase replace ,to_number of oracle

Posted on 2001-07-10
5
2,857 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
5 Comments
 
LVL 3

Accepted Solution

by:
mathavra earned 100 total points
Comment Utility
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
Comment Utility
seen a very similar question earlier .. maybe search in PAQ's
0
 
LVL 6

Expert Comment

by:ChrisKing
Comment Utility
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
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now