Geeks Talk

Prepare for your Next Interview




display string without having underscore if we send string with underscore

This is a discussion on display string without having underscore if we send string with underscore within the Oracle forums, part of the Databases category; By using Procedure,let display string without underscore, if we pass string like andhra_pradesh,it has to display andhrapradesh when procedure is called....


Go Back   Geeks Talk > Databases > Oracle

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-26-2007
Junior Member
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ausprem2000 is on a distinguished road
display string without having underscore if we send string with underscore

By using Procedure,let display string without underscore,
if we pass string like andhra_pradesh,it has to display andhrapradesh
when procedure is called.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-28-2007
Expert Member
 
Join Date: Jun 2006
Location: India
Posts: 411
Thanks: 15
Thanked 33 Times in 25 Posts
jamesravid is on a distinguished road
Re: display string without having underscore if we send string with underscore

The Replace built-in function in oracle serves for u,

select replace('andhra_pradesh', '_',null) from dual;

the above query removes '_' from the input string. You can also ignore the third parameter. that is the following query also returns the same value,

select replace('andhra_pradesh', '_') from dual;

Hope this helps you.
__________________
Cheers,
:) James:)
Reply With Quote
The Following User Says Thank You to jamesravid For This Useful Post:
Reply

  Geeks Talk > Databases > Oracle


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Difference between String.Convert Vs String.ToString jbanx C# 6 03-24-2008 01:02 PM
Extract String value suji Oracle 1 05-23-2007 02:21 PM
match string using sql query... psuresh1982 SQL 3 05-14-2007 08:21 AM
String and StringBuffer ramesh_etta Java 4 03-31-2007 09:25 AM
String into Long norman C and C++ 2 07-13-2006 10:51 PM


All times are GMT -4. The time now is 01:44 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved