Solved

URL decode in Oracle

Posted on 2008-10-31
8
3,799 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle query help 36 82
Oracle DATE Column Space 11 59
history tablespace temp usage 2 30
SQL query question 8 33
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

919 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

21 Experts available now in Live!

Get 1:1 Help Now