Invalid Characters '(' and ')' in Insert Statement

I'm a sometime Oracle user having trouble inserting text containing ( and ) characters.
Example:
INSERT INTO _funds
               (fund_id, fund_name, fund_desc)
     VALUES (11, 'British Opportunities', 'The fund''s aim is to maximise total return (the combination of income and growth of capital) from a portfolio investing primarily in UK equities.The rate of growth of funds cannot be guaranteed. This fund invests in the fund manager''s own collective investment fund of the same name.');
Results in : [Err] ORA-00911: invalid character
I've tried escaping with \ and wrapping in {} but just cannot get this to work. Should there be an issue with these characters. Could it be my client (Navicat)?
Thanks.
Alan
(Server 9.2.0.1.0 on Windows)
(Server 9.2.0.1.0)
Edited by: user7578531 on Feb 27, 2009 1:16 PM
Edited by: user7578531 on Feb 27, 2009 1:16 PM
Edited by: user7578531 on Feb 27, 2009 1:17 PM

Hi and welcome to the forum,
Are you sure you have a table called _funds? that means you will have to doule quote it when referencing it.
But, you insert statement works for me:
SQL> create table "_funds"(fund_id number
                   ,fund_name varchar2(55)
                   ,fund_desc varchar2(2000))
Table created.
SQL> insert into "_funds"(fund_id
                   ,fund_name
                   ,fund_desc)
    values (11
           ,'British Opportunities'
           ,'The fund''s aim is to maximise total return (the combination of income and growth of capital) from a portfolio investing primarily in UK equities.The rate of growth of funds cannot be guaranteed. This fund invests in the fund manager''s own collective investment fund of the same name.')
1 row created.P.S: code tag looks like {noformat}{noformat} put one before and after your (formatted) code.
Regards
Peter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • PHP MYSQL and DW Question: Invalid characters and new lines entry/viewing

    Hello all,
    I have followed David Powers' two php/dw/mysql books and I've
    set up PHP
    pages that insert, edit, delete, etc. listings. Everything
    works fine
    except for invalid characters being inserted into the
    database, and then
    displaying with a question mark in firefox.
    Is there a trick to cleaning up the data that a user may
    paste into a
    textbox on a web page for insertion in the database before
    the data is
    inserted or as it is inserted? Em dashes, en dashes, 'curly
    quotes' etc.
    are giving me problems.
    Also, when I enter new lines into the php page while I'm
    typing out
    information for a record, these new lines are not being
    displayed either
    in the database (using phpmyadmin to view) or on the
    resulting details
    pages, even though I'm using nl2br, etc. Is there a way to
    make this
    work reliably?
    Thank you for any help you may give me!
    -John

    Hello all,
    I have followed David Powers' two php/dw/mysql books and I've
    set up PHP
    pages that insert, edit, delete, etc. listings. Everything
    works fine
    except for invalid characters being inserted into the
    database, and then
    displaying with a question mark in firefox.
    Is there a trick to cleaning up the data that a user may
    paste into a
    textbox on a web page for insertion in the database before
    the data is
    inserted or as it is inserted? Em dashes, en dashes, 'curly
    quotes' etc.
    are giving me problems.
    Also, when I enter new lines into the php page while I'm
    typing out
    information for a record, these new lines are not being
    displayed either
    in the database (using phpmyadmin to view) or on the
    resulting details
    pages, even though I'm using nl2br, etc. Is there a way to
    make this
    work reliably?
    Thank you for any help you may give me!
    -John

  • Huge insert and passing insert statement in between  in oracle

    I need to generate test data , i am making use of level with dual table and want to pass commit let say after 5 records are inserted.. but the problem is that last loop iteration result incorrect inserts.. one can plz help me..
    create or replace procedure sp_test_Data_insert (i_no_records number)
    as
    l_cnt pls_integer:=1;
    l_tot pls_integer:=0;
    begin
    while l_cnt<=i_no_records
    loop
    insert into test_data
    select test_data_seq.nextval
    from (select level from dual connect by level <= l_cnt);
    dbms_output.put_line (' no.of records in loop : '|| sql%rowcount);
    l_tot:=l_tot+sql%rowcount;
    l_cnt:=l_cnt+5;
    commit;
    end loop;
    dbms_output.put_line ('Total records : '|| l_tot);
    end;
    SQL> execute sp_test_Data_insert(10);
    no.of records in loop : 1
    no.of records in loop : 6
    Total records : 7
    PL/SQL procedure successfully completed.
    issue - since third loop cnt=11, hence incorrect insert... can someone help with this...

    knowledgespring wrote:
    what if the total number of records is 1m, 10m, would you suggest make db go down or fail with lack of undo!??Clearly you do not know Oracle databases.
    10 million records is nothing to an oracle database.
    i want to pass commit in between and complete the no.of records count passed to the SP,it may be 1m, 100000,100001, 100005 , 100055, 100099...etc..
    what if this is the case!!??
    5 is just an example... and it can be 10000, 50000.. plan is to commit after every 25000 records...Committing every X number of records can cause oracle to spawn multiple write processess on the server, and more writer processes = more server resources = slower server.
    It's also transactionally inconsistent and can leave you with major headaches if a problem occurs part way through your overall business logical transaction, as you can't rollback etc.
    lack of undo is no excuse for committing out of place. resize your undo or scale your hardware according to the needs of the business, but don't write poor code that will break the database even more to try and fudge your way out of it.

  • Date   /  / contains invalid characters IN MODULE POOL

    Hi,
    I have a display field in infotype creation which will take always take current date.I have tried using the screen field as sy-datum and also tried using z-field with data type char or dats.but when ia am inserting values in  a  editable field on the screen and pressing enter ,it is giving the error: "Date   /  / contains invalid characters" .And afetr pressing cancel ,it goes back to the PBO and then pressing f8,it shows the infotype screen designed* but the other functionalities which have been coded in PAI of  screen like activating checkboxes,radiobuttons etc. are not there .Even i have tried passing sy-datum to the date field in PBO of the screen.Pls help.

    Hello Sir,
    Were you able to sort out this issue.
    Would appreciate if you can share the solution. One of our users have this issue in the ADOBE form.
    Let me know please.
    Thanks,
    Akshay...

  • Difference between MERGE and Update/Insert

    Can anybody pls tell me what is the difference between MERGE and Update/Insert statements.

    hi vivek,
    merge is totally different than normal update and insert.Merge is a combination of update+inserrt.
    Merge statment first checks the data in your table, if data is already exists then it will try to update the data otherwise it will go for insertion.In case of normal update/insert it will not check the data directly it does the specified operation.
    So based on your requirement you have to select the best option.
    Thanks.

  • How to get the table name and bind columns names in an INSERT statement ?

    I have an INSERT statement with input parameters (for example
    INSERT INTO my_table VALUES (:a, :a, :a)) and I want to know
    without parsing the statement which is the name of table to
    insert to and the corresponding columns.
    This is needed to generate the SELECT FOR UPDATE statement to
    refetch a BLOB before actually writing to it. The code does not
    know in advance the schema (generic code).
    Thanks in advance,
    Joseph Canedo

    Once you have prepared your statement, you can execute the
    statement with the OCI_DESCRIBE_ONLY mode before binding any
    columns. Then you can use OCIParamGet to find out about each
    column (column index is 1-based). You should get OCI_NO_DATA or
    ORA-24334 if there are no more columns in the statement. Note
    that the parameter descriptor from OCIParamGet is
    allocated/freed internally by OCI; you do not need to manage it
    explicitly. The parameter descriptor is passed to OCIAttrGet in
    order to obtain for instance the maximum size of data in the
    column OCI_ATTR_DATA_SIZE. You can also get the column name in
    this way, although I do not remember the #define off the top of
    my head. Getting the table name appears to be much more
    difficult; I have never had to do that yet. Good luck. -Ralph

  • INSERT statement in Java and MS Access

    Hi all,
    can anyone please tell me how to insert data to an MS Access table using JSP i tried INSERT statement of java but it is getting errors saying INSERT statement is wrong. I have no idea about MS access insert statement. i am totally tired of this. Please someone help me.

    Hello,
    MS Sql can cause problems where it goes off standard, however I dont think insert is any different.
    INSERT INTO table_name (column1, column2) VALUES (variable1, variable2)
    Make sure your table and column names are exactly right, Java is case sensitive, so make sure the case is correct also.
    The other common error is if you have a required field in the database that is not populated by your program, so, if for instance there was a column3 in the table for the above example, which was a required field, the sql would fail as there is no data being entered for column3.

  • Relation between record in a form and insert statement written in button

    hi all,
    i am using Forms [32 Bit] Version 6.0.8.24.1 (Production).
    i have a master detail form with relation
    A is master of B, B is master of C and a button which resides on control block(other than A,B,C).
    so i will insert a one record into the block 'A' and i will press button which will insert particular record into particular table.
    so when i try to move to next record('A' block) it is asking for database change. when i give 'yes' everything is ok. but when i give 'no'(w.r.t that record) and moves to next record and inserts the record and insert record throguh button also, at this time user press 'yes' then the first record is not saving but what ever i have inserted through the insert statement is not rolling back.
    How can i control insert statement with the respect to datablock change in the block.
    The block 'C' data is going to the other table through insert statement the block 'C' i am posting. So due to 'post' the block is not getting cleared so insert statement is also firing.
    In other words i want to unpost the posted data when user press 'no' in the database message.
    I know there is nothing to do with the forms message. But is its possible to control when user press 'no' then the insert statement should not gets saved into the table.
    Please help.
    Thanks..
    Edited by: GD on Jun 27, 2011 5:38 AM

    First off, you need to understand how Oracle Forms interacts with an Oracle database. Forms natively handles all DML transactions for you. Meaning, if you have a Forms data block based on a database table, Forms will generate all the necessary DML to handle any changes that occur in that block. You do not need to write your own DML statements in code.
    so i will insert a one record into the block 'A' and i will press button which will insert particular record into particular table.Is Block "A" based on a table? How are you inserting the record into the table? If you are writting your own DML to insert the record this would explain why you are being prompted to save when you change records. As I mentioned, if your block is based on a table, Forms will know if you change a value within the block.
    How can i control insert statement with the respect to datablock change in the block.If your blocks are based on tables, let Forms handle the DML! don't do it yourself.
    In other words i want to unpost the posted data when user press 'no' in the database messageIf your block is based on a table, when you are prompted to save changes - answering 'NO' will automatically clear the current record of the data block (in essence - rollback the change).
    Craig...

  • Use of the "updlock" hint with update and insert statements

    I have inherited some stored procedures and am trying to figure out why the developers decided to use the "updlock" hint on many of the update and insert statements. I have looked around everywhere and have found only one explanation of why "update...with
    (updlock)" can be useful, namely when a table has no clustered index:
    http://www.sqlnotes.info/2012/10/10/update-with-updlock/ I have found nothing yet that mentions why "insert into...with (updlock)" might be used. I understand why the hint
    might be useful on select statements in some cases, but if all of the tables have clustered indexes, is there any good reason to use it on update and insert statements?
    Thanks,
    Ron
    Ron Rice

    This form of deadlock error can occur on a table which has a clustered index.
    If you are doing updates on a table which has a clustered index and that table also has a nonclustered index and the nonclustered index is used to find the row to update you can see this type of deadlock.  For example create a table with a clustered
    primary key index and a nonclustered index by running
    Create Table Foo(PK int primary key identity, OtherKey varchar(10), OtherData int);
    go
    Insert Foo Default Values;
    go 10000
    Update Foo Set OtherKey = 'C' + Cast(PK As varchar(10))
    Create Unique Index FooIdx On Foo(OtherKey);
    That creates a table with 10000 rows, a clustered index and a nonclustered index.  Then run
    Begin Transaction
    Update Foo Set OtherData = 1 Where OtherKey = 'C5'
    That will use the FooIdx index to find the row that needs to be updated.  It will get a U lock on the index row in the FooIdx index, then an X lock on the row in the clustered index, update that row, then free the U lock on FooIdx, but keep the X lock
    on the row in the clustered index.  (There is other locking going on, but to simplify things, I'm only showing the locks that lead to the deadlock).
    Then in another window, run
    Begin Transaction
    Update Foo Set OtherData = 2 Where OtherKey = 'C5'
    This will get a U lock on the index row in the FooIdx index, then try to get an X lock on the row in the clustered index.  But that row is already exclusively locked, so this second window will wait holding a U lock on FooIdx row and is waiting for
    an X lock on the clustered index row.
    Now go back to the first window and run
    Update Foo Set OtherData = 3 Where OtherKey = 'C5'
    This will once again try to get the U lock on the FooIdx row, but it is blocked by the U lock the second window holds.  Of course the second window is blocked by the X lock on the clustered index row and you have a deadlock.
    All that said, I certainly do not routinely code my updates with UPDLOCK.  I try to design databases and write code so that deadlocks will be rare without holding excessive locks.  The more locks you hold and the longer you hold them, the more
    blocking you will get and the slower your system will run.  So I write code that if a deadlock exception occurs, it is properly handled.  Then if too many deadlocks occur, that is the time to go back to the code to see what changes are needed to
    decrease the number of deadlocks (one way to do that may be to get locks earlier and/or hold them longer. 
    But I wouldn't worry much about this form of deadlock.  It is, in my experience, vary rare.  I don't recall ever seeing it in a production environment.
    Tom

  • Select query and Insert statement performance

    Hi all,
    Can anyone plz guide us on below problem I am facing ?
    1) One of the simple Insert statement runs very slow..What might be the reason? Its simple table without any LOBs ,LONG or so. Everything else in the DB works fine.
    2) one of the SELECT statement runs very slow. It selects all records (around 1000) from a table..How can i improve its performance?
    3)Which columns in the Master and its detail tables should be indexed to improve Query performance on them.
    Many Thanks
    Regards
    sandeep

    To get an answer to your questions you have to post some informations about your system:
    1. operating system
    2. RAM
    3. oracle version
    4. init.ora
    Thomas

  • Delete and Re-Insert a Row in the Same Statement

    Hello to all,
    I have to do a row Update of 2-3 columns, but due to my Triggers(delete and Insert) and unique index, I would like for same row one delete and one Insert of the columns modified,
    is it possibile in same(single) statement do this?
    That is,instead to do
    Update table1 set col3 = '6';
    I should do
          DELETE FROM  table1
          WHERE
    INSERT INTO table1
          SELECT col1,col2  ,'6'
         FROM table1
          WHERE -----thanks in advance
    Edited by: Rosario Vigilante on Mar 5, 2012 11:18 AM

    first of all thanks for your answer and your time,
    I already have 2 Triggers (OF delete and insert) that work well, when they fire they run a stored procedure that inserts rows into another table,
    ie, both triggers on the table 1 write rows on Table 2, more or less what happens in an audit table.
    Anyway thanks again

  • How to combine both values and subquery in the insert statement

    Hi everybody,
    This is a case of inserting rows into a final results table from a temporary one. Actually, one of the fields is not always given in the temporary table. Thus, when inserting the rows into the final results table, an error message comes up to.
    More clarification:
    final results table(F_RESULT): field1, field2, field3 ( they are also primary keys with not null constraint)
    temporary table(TEMP): field2, filed3
    Is it possible to combine both values and subquery branchs of the insert statement:
    Insert into F_RESULT (field2,field3) select field2,field3 from TEMP;
    Insert into F_RESULT (field1) values (0);
    into only one like this:
    Insert into F_RESULT (field1,field2,field3) values (0, select field2 form Temp, select field3 from Temp);
    Or there is another more effective solution. The main problem for me is the message that doesn't accept the null value. From the data integrity point of view, it is accepted to set field1 to zero.
    Any hints?
    Thanks for your reply.

    That's easy, you can select any value from a table:
    Insert into F_RESULT (field1,field2,field3)
    select 0, field2, field3 from Temp;

  • Cfloop and insert statement

    I have a form that lists property addresses. For each address
    you want to post a payment for, you select the checkbox next to the
    address (value=property_id), you fill out the form filed for Amount
    Paid (value=paid_num) and you can put something in the notes form
    field as well(value=notes_txt)
    I also have single form fields that relate to all properties:
    month (month_id), year (year_id), pay date (paid_dt).
    My action page uses a cfloop using property_id. I need to
    insert a payment record for each property address that was selected
    using the data in the formfields. After the payment record is
    inserted, then I need to update the property's balance to reflect
    the new payment. ex: a property's new balance would be current
    balance - payment amount
    The loop seems to be working properly, but... if I have more
    than one property selected, it's trying to insert all the payment
    amounts (paid_num) for a single address (so i get error saying the
    number of values in the form don't match up agains the insert
    statement.). I hope this is clear - see my attached code.
    If anyone can figure out what I'm doing wrong I would really
    appreciate it.

    Thanks web-spinner. I tried your first bit since i don't want
    to insert a payment record if no payment is made... but I got this
    error. I believe it's having a problem with this bit of code in the
    INSERT statement
    #evaluate(form.paid_num#ListElement#)#
    see error message below...

  • Suddenly I am unable to insert characters and symbols.

    I frequently need to use foreign language accents. Today I found that Insert would not allow me to access characters and symbols. How can I restore these?

    You must compose messages in HTML format in order for the Insert/Character & Symbols command to be available.
    See also this add-on: [https://addons.mozilla.org/en-us/thunderbird/addon/abctajpu/ abcTajpu].

  • XML data and "invalid characters"

    Hello everyone,
    I'm developing a custom XML report for TestStand and I'm a bit confused about how to handle certain characters. For example, lets say I have a test step titled "Check that current is < 50mA". Now, when this data is written into the XML report it can be found between the Step Name tags, like this
    <Step Name>Check that current is <50mA</Step Name>
    Now the character causing the problem is "<" as XML presumes it indicates a new tag. Looking through XML resources it seems one way to escape these characters is to use the CDATA tags like this:
    <Step Name><![CDATA[Check that current is <50mA]]></Step Name>
    or to specify in the .xsl file "disable-output-escaping="yes" in the for these affected fields, like step name. However I'm concerned that by using the "disable-output-escaping" method I will encounter problems when feeding the XML file into a parser.
    Now I'm a bit curious about how different parsers act with the CDATA tag, if I parse the step name fields will I get "Check that current is <50mA" or will I get ><![CDATA[Check that.....]]>. Any ideas?
    Currently I'm using a function from the modelsupport.dll to replace these invalid characters with entity references, for example "<" is replaced with &lt; but this is not a good solution from the parser point of view.
    Best regards and thanks in advance for any advice,
    Aleksi

    Hi,
    >>>
    Now I'm a bit curious about how different parsers act with the CDATA tag, if I parse the step name fields will I get "Check that current is <50mA" or will I get ><![CDATA[Check that.....]]>. Any ideas?
    >>>
    Is it easy just to try it and see what happens?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

Maybe you are looking for