
October 19th, 2004, 09:44 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 6
Time spent in forums: 43 sec
Reputation Power: 0
|
|
|
Need help with insert statement
I am trying to insert the following string into a varchar2(4000) column using sql insert.
Here is the sql:
insert into table1
column1
values
('http://server/servlet/ADPTable?_bm=y&-tree_id=302&-BucketID=NO&-context=adp&-type=null&-all_geo_types=N&-Tables=(ACS_2002_EST_G00_DP4)&-subject=Air%20Conditioning%20and%20Heating%20Fuel&-subject=Kitchen%20Facilities&-subject=Owner%20Costs&-subject=Plumbing%20Facilities&-subject=Renter%20Statistics&-subject=Rooms%20and%20Bedrooms&-subject=Telephone%20Service%20Available&-subject=Units%20in%20Structure&-subject=Value%20of%20Home%20(Owned%20and%20Vacant)&-subject=Vehicles%20Available&-subject=Year%20Householder%20Moved%20Into%20Unit&-subject=Year%20Structure%20Built&-redoLog=true&-EC_NAME=NO&-_lang=en&-geo_id=D&-ExpandSubject=NO&-CONTEXT=adp&-format=null&-what=1&-what=2&-what=3&-what=4&-what=5&-what=6!&-what=7&-what=8&-what=9&-ds_name=D&-qr_name=ACS_2003_EST_G00_DP4&-table=(ACS_2002_EST_G00_DP4)&-WhatTable=pr,qt,adp,np,myp,gct,grt,tm,dt,&-ExpandItem=NO')
When i execute the statement, i get an oracle error ORA-00917, missing comma.
Does it have anything to do with commas in the string i'm trying to insert. Do I need to escape them?
I'm using a Java Statement to perform the insert.
The way I am assuming the insert works is once it encounters the first single quote, it should keep parsing the string until it finds another single quote, and everything else inside the quotes should be treated as data for the string. Is this right?
Any help??
|