Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert URLs
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. CringeleyReceived on Mon Feb 12 2007 - 17:22:12 CST