Solved

URL decode in Oracle

Posted on 2008-10-31
8
3,742 Views
Last Modified: 2013-12-19
What's the best way to decode URL characters when pulling data from Oracle?
0
Comment
Question by:stang1
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 14

Expert Comment

by:ajexpert
ID: 22854055
Can u give example like what is the input (URL) and which way you want to represent?
0
 

Author Comment

by:stang1
ID: 22854170
the fields is varchar2(4000) and contains: (for example)
'Feb.+20%2C+2008%2C+Director+%28'
and my desired result:
'Feb. 20, 2008, Director ('
I'm just spooling to a .txt file and want to convert the encoded chars....
Thanks for your help....
0
 

Author Comment

by:stang1
ID: 22854196
the field is varchar2(4000) and contains: (for example)
'Feb.+20%2C+2008%2C+Director+%28'
and my desired result:
'Feb. 20, 2008, Director ('
I'm just doing a select and 3 tbls and spooling to a .txt file and want to convert the encoded chars....
Thanks for your help....
0
 
LVL 14

Expert Comment

by:ajexpert
ID: 22854291
Hi,
To my knowledge, oracle does not provide any functions for decoding URL.

However, you can use perl or java script for the same and call from oracle.

Hope it helps
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 9

Expert Comment

by:MarkusId
ID: 22857803
I'm afraid, not in version 9, but in version 11 (just in case anybody else is looking for somethink like this):

http://www.psoug.org/reference/utl_url.html
0
 
LVL 7

Expert Comment

by:DiscoNova
ID: 22858093
To my knowledge, the UTL_URL -package exists in Oracle 9 Release 2, however I'm not entirely certain of Release 1.
0
 
LVL 7

Accepted Solution

by:
DiscoNova earned 500 total points
ID: 22858105
And, according to the page linked by MarkusId, it has indeed been first available in version 9.0.1.

So, to answer the original question, the solution to the example you gave (of course, you need to have execute privilege to the package SYS.UTL_URL, but I believe that has been granted to PUBLIC, so you propably don't need to worry about that) is:
SELECT UTL_URL.UNESCAPE('Feb.+20%2C+2008%2C+Director+%28') FROM DUAL;

Open in new window

0
 

Author Closing Comment

by:stang1
ID: 31512160
I just added a replace for the '+' and it worked really well.  Thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

744 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

10 Experts available now in Live!

Get 1:1 Help Now