Error in inserting data into tables... '/'

I am trying to use cfhttp to create a query out of a text
file and then loop
and insert it into a database. Easy enough and works fine.
However, I am
getting a forward slash in some of the fields which is
causing an error.
'SOUTH OF SOUTH BLVD AND EAST OF BEACH RD\'
It is being entered into a LONGTEXT field in MySQL 5. Any way
to get the '\'
to be ignored and just be entered?
Here is my script block:
<cfhttp timeout="3600" url="
http://www.bpoprosonline.com/property/#ResFile#"
method="GET" name="Property" delimiter="|" textqualifier=""
firstrowasheaders="yes" />
<cfloop query="Property">
<cfquery name="loopProperty" datasource="bpopros">
Insert Into Property
(MLSNumber, ListOfficeCompany, ListOfficeId, Basement, Baths,
BFK_Dimen,
BR2_Dimen, BR3_Dimen, BR4_Dimen, BR5_Dimen, City, County,
Din_Dimen,
Directions, Directions_E_W, Directions_N_S, East_West,
Fam_Dimen, Fireplace,
Garage, Grt_Dimen, Kit_Dimen, Lib_Dimen, ListPrice,
Liv_Dimen, Lot_Dimen,
MBR_Dimen, No_Bedrooms, North_South, Remarks1, Remarks2,
Remarks3, Remarks4,
Remarks5, Remarks6, School_District, State, Street_Dir,
StreetName,
StreetNumber, SummerTax, Tot_Baths, Tot_Lavs,
Tot_Square_Feet, Winter_Tax,
Year_Built, Zip5, Appliances, Basement_Type, Bath_Desc,
Cooling, Exterior,
Foundation, Garage_Type, Heating, Other_Rooms, Site_Desc,
Style, PhotoURL,
DisplayAddress, Agent, weight)
VALUES
<cfif #MLSNumber# EQ
"">0<cfelse>#MLSNumber#</cfif>,
'#ListOfficeCompany#',
<cfif #ListOfficeId# EQ
"">0<cfelse>#ListOfficeId#</cfif>,
'#Basement#',
<cfif #Baths# EQ
"">0<cfelse>#Baths#</cfif>,
'#BFK_Dimen#',
'#BR2_Dimen#',
'#BR3_Dimen#',
'#BR4_Dimen#',
'#BR5_Dimen#',
'#City#',
'#County#',
'#Din_Dimen#',
'#Directions#',
'#Directions_E_W#',
'#Directions_N_S#',
'#East_West#',
'#Fam_Dimen#',
'#Fireplace#',
'#Garage#',
'#Grt_Dimen#',
'#Kit_Dimen#',
'#Lib_Dimen#',
<cfif #ListPrice# EQ
"">0<cfelse>#ListPrice#</cfif>,
'#Liv_Dimen#',
'#Lot_Dimen#',
'#MBR_Dimen#',
<cfif #No_Bedrooms# EQ
"">0<cfelse>#No_Bedrooms#</cfif>,
'#North_South#',
'#Remarks1#',
'#Remarks2#',
'#Remarks3#',
'#Remarks4#',
'#Remarks5#',
'#Remarks6#',
'#School_District#',
'#State#',
'#Street_Dir#',
'#StreetName#',
'#StreetNumber#',
'#SummerTax#',
<cfif #Tot_Baths# EQ
"">0<cfelse>#Tot_Baths#</cfif>,
<cfif #Tot_Lavs# EQ
"">0<cfelse>#Tot_Lavs#</cfif>,
<cfif #Tot_Square_Feet# EQ
"">0<cfelse>#Tot_Square_Feet#</cfif>,
'#Winter_Tax#',
<cfif #Year_Built# EQ
"">0<cfelse>#Year_Built#</cfif>,
<cfif #Zip5# EQ "">0<cfelse>#Zip5#</cfif>,
'#Appliances#',
'#Basement_Type#',
'#Bath_Desc#',
'#Cooling#',
'#Exterior#',
'#Foundation#',
'#Garage_Type#',
'#Heating#',
'#Other_Rooms#',
'#Site_Desc#',
'#Style#',
'#PhotoURL#',
'#DisplayAddress#',
0,
<cfif #ListOfficeId# EQ
340169>1<cfelse>0</cfif>)
</cfquery>
</cfloop>
Thanks
Wally Kolcz
MyNextPet.org
Founder / Developer
586.871.4126

It seemed to have worked. I managed to loop and insert 55,345
records
without a hitch. I may move it to a cfqueryparam and see if
that works too.
"Dan Bracuk" <[email protected]> wrote in
message
news:fc1r5n$dal$[email protected]..
> What happened when you tried it? Did you have a similar
problem with
> apostrophes?
>
> cfqueryparam will probably escape all the weird
characters you are likely
> to encounter.

Similar Messages

  • Error While Inserting Data into table using OAF

    Hi Experts,
    I am learning OAF; i am trying into insert the data into table using OAF. I followed the below procedure.
    My table(OLF_TEST_TBL) Columns:
    EmpID (Number), Ename(VARCHAR2 100), Sal Number, and who columns.
    1. created Application Module (AM).
    package: oracle.apps.mfg.simplepg.server
    name: oaf_test_tbl_am
    2. created simple page
    name:EmployeePG
    package:oracle.apps.mfg.simplepg.webui
    3. Assigned the Application Module to Page
    4. Created Entity Object(EO)
    name:oaf_test_tbl_eo
    package:oracle.apps.mfg.simplepg.schema.server
    schema:apps
    table:OLF_TEST_TBL
    note:
    1. EMPID column is selected as primary key
    2. selected create method, remove method and validation method.
    3.checked generate default view object
    VO:
    name:olf_test_tbl_vo
    note: Entity Object was assigned to VO
    Coming To page:
    page main region:EmployeeMainRN
    1.under main region i created one more region using wizard
    selected AM and VO, region style-default single column
    2. under main region i created one more region
    region style- pagebuttonbar, ID:pagebutoonsRN
    3. under pagebuttonRN, created two submit buttons(ID:SUBMIT, ID:CANCEL).
    In AM java page:
    created a method to insert row and for commit.
    Insert Method:
    public void insertrow(){
    OAViewObject vo=(OAViewObject)getoaf_test_tbl_vo1();
    if(!vo.isPreparedForExecution()){
    vo.executeQuery();
    Row row=vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Commit Method:
    public void savaDataTooaftesttable(){
    getDBTransaction().commit();
    In EmployeeMainRN, created a controller.
    In this controller process request method, 'insertrow' method was called.
    import oracle.apps.fnd.framework.OAApplicationModule;
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("insertrow");
    To commit the transaction when SUBMIT button pressed, commit method was called in process form request method.
    import oracle.apps.fnd.framework.OAViewObject;
    public void processformRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("SUBMIT") != null)
    am.invokemethod("savaDataTooaftesttable");
    Error After clicking the submit button_
    I ran the page, page was opened successfully. Once i enter data and click submit button, it's giving the following error.
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example). If the browser's navigation buttons were not used, this error could have been caused by coding mistakes in application code. Please check Supporting the Browser Back Button developer guide - View Object Primary Key Comparison section to review the primary causes of this error and correct the coding mistakes.
    Cause:
    The view object oaf_test_tbl_am.oaf_test_tbl_vo1700_oaf_test_tbl_vo1_practice_test_prc1_oracle_apps_mfg_simplepg_server_oaf_test_tbl_am.oaf_test_tbl_vo1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    Experts, Kindly help me why i am getting this error.
    Awating your replies.
    Thanks in advance.

    If you dont want to create message. You can throw exception like below as well
              throw new OAException("Emp Id is "+empId+" and employee name is "+empName, OAException.CONFIRMATION);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Insert data into table from JSP page using Entity Beans(EJB 3.0)

    I want to insert data into a database table from JSP page using Entity Beans(EJB 3.0).
    1. I have a table 'FRIENDS', (in Oracle 10g database).
    2. It has two columns, 'NAME' and 'CITY'. Both have datatype strings(varchar2).
    3. Now from a JSP page, having two textfields, 'NAME' and 'CITY', I want to insert data into table 'FRIENDS'.
    4. In between JSP and database is a Entity Bean(EJB 3.0) and a stateless session bean.
    5. I am using JDev as editor.
    Please provide me code ASAP or link with similar example.
    Thank you.
    Anurag

    Hi,
    I am also trying that scenario. So u can
    Post the jsp form data to a Servlet which will act as a Controller.
    In the servlet invoke the business method.
    Similar kind of app is in www.roseindia.net
    Hope this would help u.
    Meanwhile if u get any optimal solution, pls post it.
    Thanks,
    Happy Java Coding.

  • How to insert data into table control

    hi experts,,
           i have inserted data into data base table through table control .
    now i want to insert data into table control through database table.
      how to delete data from table control for selected row

    Hi
    go through this link.
    http://www.****************/Tutorials/ABAP/TableControl/Demo.htm

  • Please recommend if we have options to read xml file and insert data into table without a temporary table.

    Please recommend if we have options to read xml file and insert data into table without a temporary table. 

    DECLARE @data XML;
    SET @data =N'<Root>
    <List RecordID="946236" />
    <List RecordID="946237" />
    <List RecordID="946238" />
    <List RecordID="946239" />
    <List RecordID="946240" />
    </Root>'
    INSERT INTO t (id) SELECT T.customer.value('@RecordID', 'INT') AS id
    FROM @data.nodes('Root/List')
     AS T(customer);
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Insert data into table 1 but remove the duplicate data

    hello friends,
    i m trying to insert data into table tab0 using hints,
    query is like this..
    INSERT INTO /*+ APPEND PARALLEL(tab0) */ tab NOLOGGING
    (select /*+ parallel(tab1)*/
    colu1,col2
    from tab1 a
    where a.rowid =(select max (b.rowid) from tab2 b))
    but this query takes too much time around 5 hrs...
    bz data almost 40-50 lacs.
    i m using
    a.rowid =(select max (b.rowid) from tab2 b))....
    this is for remove the duplicate data..
    but it takes too much time..
    so please can u suggest me any ohter option to remove the duplicate data so it
    resolved the optimization problem.
    thanks in advance.

    In the code you posted, you're inserting two columns into the destination table. Are you saying that you are allowed to have duplicates in those two columns but you need to filter out duplicates based on additional columns that are not being inserted?
    If you've traced the session, please post your tkprof results.
    What does "table makes bulky" mean? You understand that the APPEND hint is forcing the insert to happen above the high water mark of the table, right? And you understand that this prevents the insert from reusing space that has been freed up because of deleted in the table? And that this can substantially increase the cost of full scans on the table. Did you benchmark the INSERT without the APPEND hint?
    Justin

  • Insert Data into Table from TXT or CSV file !!!!!

    Dear All,
    Recently I have started working on APEX. In Oracle Forms, we used to use TEXT_IO for inserting records into tables from txt files. Now I want to do the same thing in apex 3.2. How can I insert data into tables from txt of csv files.
    Waiting of your valuable suggestions.
    With kind regards,
    Yousuf.

    Yousuf
    wwv_flow_files is used by APEX to hold uploaded files.
    If you incorporate a file browse item on you page, browse for the selected file, then submit the page (having the PL/SQL process described as an on suibmit process) then what I detailed should work.
    If you don't need users to have access to this then just go to Home>Utilities>Data Load/Unload in APEX and there is a handy load utility there that does it all for you.
    Cheers
    Ben

  • Error while inserting data into a table.

    Hi All,
      I created a table.While inserting data into the table i am getting an error.Its telling "Create data Processing Function Module".Can any one help me regarding this?
    Thanx in advance
    anirudh

    Hi Anirudh,
      Seems there is already an entry in the Table with the same Primary Key.
    INSERT Statement will give short dump if you try to insert data with same key.
    Why dont you use MODIFY statement to achieve the same.
    Reward points if this Helps.
    Manish

  • Insert data into table

    When I try to insert data into the table, I get the error message:
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The name 'uniqueID' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
    What is wrong in the following code?
    String uniqueID, GenericType;
    float elevation, CalcTotalHeight, CalcTotalArea, CalcTotalVolume;
    stmt.executeUpdate(
    "INSERT INTO IFCData VALUES (uniqueID, GenericType, elevation, CalcTotalHeight, CalcTotalArea, CalcTotalVolume)" );

    No, sorry, now that I look at it for more than five seconds, your SQL is wrong.
    You don't have a list of columns that you are updating; I'm not sure whether this is bad SQL or whether the database will assume you meant to update all the columns in their declared order. But more to the point, the "values" you are assigning to those columns are not what you want. For example, the value you assign to the first column is uniqueid, meaning either the column named uniqueid or some SQL constant named uniqueid. There isn't any such thing, hence the message.
    I suppose you wanted to put the value of the Java variable "uniqueid" there. Of course the database and the JDBC driver don't know anything about the names of variables in your code, so they can't replace the string "uniqueid" by the value of the variable. The way to do that is to use a prepared statement, like this:PreparedStatement ps = conn.prepareStatement("INSERT INTO IFCData VALUES (?, ?, ?, ?, ?, ?)");
    // fix this SQL so you name the columns you are inserting into as well
    ps.setString(1, uniqueID);
    ps.setString(2, GenericType);
    ps.setFloat(3, elevation);
    // and so on
    ps.executeUpdate();PC&#178;

  • Error while inserting data into BFILE datatype

    Dear Experts,
    I am trying to insert data into resume table, but it is throwing error:
    create table resume(resume blob);
    declare
    f_lob bfile;
    b_lob blob;
    begin
    insert into resume(resume) values(empty_blob())
    return documents into b_lob;
    f_lob := bfilename( 'RESUME_SAVE', 'Pawan-resume.doc' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile
    ( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    return documents into b_lob;
    ERROR at line 8:
    ORA-06550: line 8, column 10:
    PL/SQL: ORA-00904: "DOCUMENTS": invalid identifier
    ORA-06550: line 7, column 2:
    PL/SQL: SQL Statement ignored
    Please help
    Regards
    Sunil Kumar

    Thank you very much Mihael................... It works
    But I think there is a mistake in oracle documentation, please check following link:
    http://docs.oracle.com/cd/B10501_01/appdev.920/a96591/adl14cas.htm
    Thanks & Regards
    Sunil Kumar

  • How do you access a web service to insert data into table?

    Ok I have a simple html/jsp survey form to host on our web site. Because of firewall issues I cannot do a direct connect to the database and insert the data from the form. So I need to take the data from the survey form, and pass it to an existing web service, or create a web service that will insert this information for me into the database table?
    Thanks again.
    orozco

    Thanks for the reply shanu. Well, because of firewall issues, as a work around we use a web service to insert data into the database table. Since the Web Service already exist, we just thought it would be easy enough just to pass the parameters to it, and have it do the insert. So really all I need is just to communicate with the already existing web service. I will be honest though I have not really worked with web services before.
    orozcom

  • Error by inserting data into a field of datatype LONG

    Hi,
    When inserting data into a field of datatype long in oracle8 database via SQL Plus or SQL worksheet there occurs the following error message: "field in data file exceeds the maximum length".
    If I access to the database from a selve written program via odbc there is no problem when inserting the data by the same sql statement.
    So what can I do?
    Thanks in advance!
    Juergen

    What does your SQL statement look like?

  • Query for inserting data into table and incrementing the PK.. pls help

    I have one table dd_prohibited_country. prohibit_country_key is the primary key column.
    I have to insert data into dd_prohibited_country based on records already present.
    The scenario I should follow is:
    For Level_id 'EA' and prohibited_level_id 'EA' I should retreive the
    max(prohibit_country_key) and starting from the maximum number again I have to insert them
    into dd_prohibited_country. While inserting I have to increment the prohibit_country_key and
    shall replace the values of level_id and prohibited_level_id.
    (If 'EA' occurs, I have to replace with 'EUR')
    For Instance,
    If there are 15 records in dd_prohibited_country with Level_id 'EA' and prohibited_level_id 'EA', then
    I have to insert these 15 records starting with prohibit_country_key 16 (Afetr 15 I should start inserting with number 16)
    I have written the following query for this:
    insert into dd_prohibited_country
    select     
         a.pkey,
         b.levelid,
         b.ieflag,
         b.plevelid
    from
         (select
              max(prohibit_country_key) pkey
         from
              dd_prohibited_country) a,
         (select
    prohibit_country_key pkey,
              replace(level_id,'EA','EUR') levelid,
              level_id_flg as ieflag,
              replace(prohibited_level_id,'EA','EUR') plevelid
         from
              dd_prohibited_country
         where
              level_id = 'EA' or prohibited_level_id = 'EA') b
    My problem here is, I am always getting a.pkey as 15, because I am not incrementing it.
    I tried incrementing it also, but I am unable to acheive it.
    Can anyone please hepl me in writing this query.
    Thanks in advance
    Regards
    Raghu

    Because you are not incrementing your pkey. Try like this.
    insert
       into dd_prohibited_country
    select a.pkey+b.pkey,
         b.levelid,
         b.ieflag,
         b.plevelid
       from (select     max(prohibit_country_key) pkey
            from dd_prohibited_country) a,
         (select     row_number() over (order by prohibit_country_key)  pkey,
              replace(level_id,'EA','EUR') levelid,
              level_id_flg as ieflag,
              replace(prohibited_level_id,'EA','EUR') plevelid
            from     dd_prohibited_country
           where level_id = 'EA' or prohibited_level_id = 'EA') bNote: If you are in multiple user environment you can get into trouble for incrementing your PKey like this.

  • Error Message When Inserting Data Into Table

    Hi,
    I am trying to insert the following value into my customer table, however i get the following error on doing so.
    ERROR: date format picture ends before converting entire input string
    STATEMENT:
    insert into phonecall (start_date_time)
    values(10-JAN-2006 11:53:09)
    any ideas as to what might be wrong with my insert statement to bring up this error ??
    start_date_time is a DATE field by the way.

    Or
    SQL> alter session set nls_date_format='DD-MM-YYYY HH24:MI:SS';
    Session altered.
    SQL> create table aa (test date)
      2  /
    Table created.
    SQL> insert into aa values ('11-12-2006 12:11:22')
      2  /
    1 row created.
    SQL> select * from aa ;
    TEST
    11-12-2006 12:11:22
    SQL>

  • Error while Inserting data into flow table

    Hi All,
    I am very new to ODI, I am facing lot of problem in my 1st interface. So I have many questions here, please forgive me if it has irritated to you.
    ========================
    I am developing a simple Project to load a data from an input source file (csv) file into a staging table.
    My plan is to achieve this in 3 interfaces:
    1. Interface-1 : Load the data from an input source (csv) file into a staging table (say Stg_1)
    2. Interface-2 : Read the data from the staging table (stg_1) apply the business rules to it and copy the processed records into another staging table (say stg_2)
    3. Interface-3 : Copy the data from staging table (stg_2) into the target table (say Target) in the target database.
    Question-1 : Is this approach correct?
    ========================
    I don't have any key columns in the staging table (stg_1). When I tried to execute the Flow Control of this I got an error:
    Flow Control not possible if no Key is declared in your Target Datastore
    With one of the response (the response was - "FLOW control requires a KEY in the target table") in this Forum I have introduced a column called "Record_ID" and made it a Primary Key column into my staging table (stg_1) and my problem has been resolved.
    Question-2 : Is a Key column compulsary in the target table? I am working in BO Data Integrator, there is no such compulsion ... I am little confused.
    ========================
    Next, I have defined one Project level sequence. I have mapped the newly introduced key column Record_Id (Primary Key) with the Project level sequence. Now I am got another error of "CKM not selected".
    For this, I have inserted "Insert Check (CKM)" knowledge module in my Project. With this the above problem of "CKM not selected" has been resolved.
    Question-3 : When is this CKM knowledge module required?
    ========================
    After this, the flow/interface is failing while loading data into the intermediar ODI created flow table (I$)
    1 - Loading - SS_0 - Drop work table
    2 - Loading - SS_0 - Create work table
    3 - Loading - SS_0 - Load data
    5 - Integration - FTE Actual data to Staging table - Drop flow table
    6 - Integration - FTE Actual data to Staging table - Create flow table I$
    7 - Integration - FTE Actual data to Staging table - Delete target table
    8 - Integration - FTE Actual data to Staging table - Insert flow into I$ table
    The Error is at Step-8 above. When opened the "Execution" tab for this step I found the message - "Missing parameter Project_1.FTE_Actual_Data_seq_NEXTVAL RECORD_ID".
    Question-4 : What/why is this error? Did I made any mistake while creating a sequence?

    Everyone is new and starts somewhere. And the community is there to help you.
    1.) What is the idea of moving data from stg_1 and then to stg_2 ? Do you really need it for any other purpose other than move data from SourceFile to Target DB.
    Otherwise, its simple to move data from SourceFile -> Target Table
    2.) Does your Target table have a Key ?
    3.) CKM (Check KM) is required when you want to do constraint validation (Checking) on your data. You can define constraints (business rules) on the target table and Flow Control will check the data that is flowing from Source File to Target table using the CKM. All the records that donot satisfy the constraint will be added to E$ (Error table) and will not be added to the Target table.
    4.) Try to avoid ODI sequences. They are slow and arent scalable. Try to use Database sequence wherever possible. And use the DB sequence is target mapping as
    <%=odiRef.getObjectName( "L" , "MY_DB_Sequence_Row" , "D" )%>.nextval
    where MY_DB_Sequence_Row is the oracle sequence in the target schema.
    HTH

Maybe you are looking for

  • Home Sync never completes on a logout from OSX Server

    I have a Mac Pro running 10.6.4 and MacBook running same rev level. Seemed to have successfully configured Open Directory on the Mac Pro to manage mobile accounts. Mac Pro OD also is configured with AFP file sharing turned "on" and /Network share for

  • Contacts and calendar syncing issue

    I have both an iPhone 3G and 3Gs with the latest software. In the past, if I had conflicting or different contacts in either my address book or iPhone, iTunes would ask me which is correct before syncing. Now, it just syncs whatever it thinks is corr

  • How to configure Additional acquisitions and divestures

    Hi Team, I am using YTD consolidation application. I wanted to know how to proceed to account Additional percentage of acquisitions and divestures while handling goodwill. Thanks and regards Naveen Vaddi

  • Any way to get the latest 12.5.4 patch?

    Dear all, today we ran an issue with a procedure that occoured only on our 12.5.4 VM (12.5.4 EBF 16791 ESD #10 Win32), a that runs like a charm on 15.7. Now, we know that ASE 12.5.4 is deprecated, nevertheless it would help us a lot, if we'd have the

  • Set config about Depreciation Area2

    Hi guru !       How I can set configuration Asset depreciation area 2 to be calculate depreciation only but don't want to posting to depreciation  account (expense and accumulate) and can reporting depre. in area 2 . thank you.