Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert URLs

Re: Insert URLs

From: joel garry <joel-garry_at_home.com>
Date: 12 Feb 2007 15:22:12 -0800
Message-ID: <1171322532.070164.35510@l53g2000cwa.googlegroups.com>


On Feb 12, 2:20 pm, cern..._at_gmail.com wrote:
> I use Oracle SQL Developer and am having an issue inserting urls as
> values to the DB. Here is a quick example.
>
> insert into state
> (state_code, homepage_url)
> values
> ('XX', 'http://www.wi.org?search=blah');
>
> It seems as though the '?' is being looked at as a variable when the
> entire single quote is as a value. Any ideas on how I can just insert
> the value as a value and not as something that gets interpreted?

You can concatenate in the ascii value

SQL> select 'A'||chr(63)||'B' from dual;

'A'

---
A?B

You perhaps want to write some procedure to translate all special
characters if you will be doing this a lot.   You also might want to
understand SQL injection, depending on where you are getting these
url's and what you will be doing with them.

Also see http://www.psoug.org/reference/utl_url.html

jg
--
@home.com is bogus.
"So let me get this straight: Intuit can predict tomorrow's stock
price, but not the coming of Vista?" - Robert X. Cringeley
Received on Mon Feb 12 2007 - 17:22:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US