What is the query of insertion in oracle

I want to insert the values dynamically into the database.
I have written the code like this:
cid=jFormattedTextField1.getText();
cname=jFormattedTextField2.getText();
address=jTextArea1.getText();
state=jFormattedTextField3.getText();
zip=jFormattedTextField4.getText();
phone=jFormattedTextField5.getText();
mobile=jFormattedTextField6.getText();
email=jFormattedTextField7.getText();
new_address=jTextArea2.getText();
new_state=jFormattedTextField8.getText();
new_zip=jFormattedTextField9.getText();
new_phone=jFormattedTextField10.getText();
new_mobile=jFormattedTextField11.getText();
new_email=jFormattedTextField12.getText();
try
Class.forName("oracle.jdbc.driver.OracleDriver");
String url="jdbc:oracle:thin:@localhost:1521:oracle";
Connection con=DriverManager.getConnection(url,"scott","root");
Statement st=con.createStatement();
int n=st.executeUpdate("insert into Customer_details values( cid='"+cid+"', cname='"+cname+"' ,address='"+address+"', state='"+state+"', zip='"+zip+"' ,phone='"+phone+"', mobile='"+mobile+"', email='"+email+"' ,new_address='"+new_address+"', new_state='"+new_state+"', new_zip='"+new_zip+"', new_phone='"+new_phone+"', new_mobile='"+new_mobile+"', new_email='"+new_email+"') ");
System.out.println("data saved successfully"+n);
am getting the error like this plz help me;
java.sql.SQLException: ORA-00917: missing comma

Oracle SQL requires single quotes instead of double quotes around strings.
But that's irrelevant as you should have used a PreparedStatement rather than parsing everything into the SQL query by hand, which would have had the JDBC driver generate the actual SQL as needed.

Similar Messages

  • What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?

    Hi Guys,
    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?
    I have to write an AP Invoice Aging Report in Discoverer to show all unpaid invoices that have been transferred into GL... Business wants it to match one-to-one with the AP Trial Balance standard report...
    Business wants to run the report for any date in a past...
    The report has two parameters:
    As Of Date - the same as As of Date for the AP Trial Report
    Trial Balance Run Date - the date when Trial Balance was run...
    Conditions are:
    TRUNC(Invoice Date) <=TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(NVL(Payment Date,'01-JAN-5000')) > TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Distr Accounting Date <= TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    NVL(Distr Creation Date,Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Show_Flag = 'YES', where:
    Show_Flag = CASE WHEN ( NVL(Cancelled Date,'01-JAN-1901') > NVL(:As Of Date,SYSDATE) AND NVL(Inv Amount Aud,0) = 0 ) THEN 'YES' ELSE ( CASE WHEN NVL(Inv Amount Aud,0) = 0 THEN 'NO' ELSE 'YES' END ) END
    There is a difference between the logic of my report, and the logic of AP Trial Balance...
    Could you please advise what I'm missing?
    Thanks,
    Iana

    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10? You can get the code by opening the report in Reports Builder and get the query.
    Or, enable trace/debug as per (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
    Thanks,
    Hussein

  • What is the query to update table in ejb3.0

    Hi Friends,
    I am developing one application using ejb3.0 in Netbeans IDE 6.7.1 with Glassfish Application server.
    To insert data we use "entitymanager.persist(Insert insert);"
    To retrieve all data from table "entitymanager.createQuery("")'
    In the same way what is the query for update?
    Could you please help me.
    Thanks in advance.

    [the answer|http://lmgtfy.com/?q=java+jpa+udpate+query]

  • What is the Alternate for AMPERSAND (&) in oracle???????????

    Hi All,
    This is my query......
    select * from
    select 'abc' a from dual union
    select 'def' a from dual union
    select 'abc & xyz' a from dual
    ) where a='abc & xyz';
    Output should be 'abc & xyz'.
    Since I am using '&' it will prompt to enter some value from my keyboard.
    Yes, I know, I will get the output either by using set scan off,set define off, set escape on.
    what is the Alternate for AMPERSAND (&) in oracle???????????
    The value 'abc & xyz' will be passed from the front end and will be passed to the select statement..........
    Regards,
    Kashyap Varma N

    nkvkashyap wrote:
    Hi All,
    This is my query......
    select * from
    select 'abc' a from dual union
    select 'def' a from dual union
    select 'abc & xyz' a from dual
    ) where a='abc & xyz';
    Output should be 'abc & xyz'.
    Since I am using '&' it will prompt to enter some value from my keyboard.
    Yes, I know, I will get the output either by using set scan off,set define off, set escape on.
    what is the Alternate for AMPERSAND (&) in oracle???????????
    The value 'abc & xyz' will be passed from the front end and will be passed to the select statement..........
    Regards,
    Kashyap Varma NI think you are confused. Oracle (i.e. the DB) doesn't care about &. However front-ends like SQL*Plus do: and prompt you for the substitution (unless set define off etc.).
    If you are using Java, then pass strings with & with no problem.

  • What are the UI components used in oracle adf?

    what are the UI components used in oracle adf?

    Web.:
    - ADF Faces and Trinidad JSF components
    http://docs.oracle.com/cd/E28280_01/apirefs.1111/e12419/toc.htm
    Desktop:
    - MS Excel
    http://www.oracle.com/technetwork/developer-tools/adf/overview/index-085534.html
    Mobile
    - AMX UI Components for Android and iOS
    Frank

  • What are the steps involved in configuring Oracle EBSR12 after installation

    What are the steps involved in configuring Oracle EBS R12 after installation is complete?
    We have an empty oracle EBS R12 installed and up and running. We do not have anything configured.
    Please direct me to the documents that can be followed to do initial steps for the application functionality to work.
    Thanks,
    SR

    What are the steps involved in configuring Oracle EBS R12 after installation is complete?
    We have an empty oracle EBS R12 installed and up and running. We do not have anything configured.
    Please direct me to the documents that can be followed to do initial steps for the application functionality to work.All Oracle EBS Docs 11i/R12 can be found at:
    Oracle Applications Documentation
    http://www.oracle.com/technetwork/documentation/applications-167706.html
    Thanks,
    Hussein

  • In jdbc adapter what is the difference between insert and update insert

    in jdbc adapter what is the difference between insert and update insert
    Edited by: katru vijay on Mar 22, 2010 7:43 AM

    Please refer to this Link [Document Formats for the Receiver JDBC Adapter|http://help.sap.com/saphelp_nw04/Helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm]
    Hope this helps.
    Regards,
    Chandravadan

  • What is the meaning of dumping in oracle?

    What is the meaning of dumping in oracle?
    Also tell me is there any method to dump by user commands?

    Hi,
    Dumping is a format used for storing regular oracle data that is used for transferring data between two databases or servers or within the database i.e export/import.
    For dumping user commands you can use user auditing.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c25audit.htm
    regards
    Jafar

  • What is the use of profiles in oracle apps,could u pls explain with examples

    what is the use of profiles in oracle apps,could u pls explain with examples

    1b5595eb-fcfc-48cc-90d2-43ba913ea79f wrote:
    what is the use of profiles in oracle apps,could u pls explain with examples
    http://www.appspatrols.com/now/blog/understanding-profile-options-in-oracle-apps-oracle-e-business-suite
    http://www.oracle.com/pls/ebs121/search?word=Profile+Options&format=ranked&remark=quick_search
    Thanks,
    Hussein

  • What are the steps to insert a check or X into a PDF Box?

    What are the steps to insert a check or X into a PDF box? 

    Provided the PDF form was properly created (checkboxes inserted as opposed to text boxes for the viewer to check when the page is printed) you just click as Test Screen Name replied. If not, you'll have to print the filled form and check the boxes yourself - by hand.

  • What are the most challenging conversions in Oracle apps...

    Can any one tell me what are the most challenging conversions in oracle apps.
    Thanks
    Sambit

    d1acf245-8019-40c9-a1df-fdc9374b36b2 wrote:
    Can any one tell me what are the most challenging conversions in oracle apps.
    Thanks
    Sambit
    https://forums.oracle.com/message/10705767
    Thanks,
    Hussein

  • What are the disadvantages of cloning in oracle apps?

    what are the disadvantages of cloning in oracle apps?

    928714 wrote:
    what are the disadvantages of cloning in oracle apps?This is a non-sense question.
    Please go through old threads before posting questions. Also, if you keep spamming the forum you will be banned and your account will be deleted.
    Thanks,
    Hussein

  • What are the query types,Objects CRM provides for third party

    What are the query types,Objects provided by the CRM so that it can be called by third party for integartion pupose.

    First, that statement - and those materials - refer to the "legacy" StreamInsight query/adapter model. They do not refer to how things work with the Reactive model introduced in version 2.1. Specifically, it talks about Dynamic Query Composition (DQC).
    You cannot use a deployed Observable in another instance of StreamInsight. You may be able to use them across applications in the same instance - off the top of my head, I'm not sure. I'm getting ready to get on a plane but will take a look at it later.
    Typically, however, applications act as containers (comparable to .NET AppDomains) so I don't think that you'd be able to do this easily. That said, the code and assemblies
    can be reused across multiple instances/applications. You would have separate instances of the classes involved but you would be able to reuse the query logic. That's a common use case.
    Can you be more specific about your use case and what you are trying to accomplish here? It's possible that there are alternative ways to do what you are trying to do.
    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)
    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

  • What is the best browser to run oracle 10g forms

    SALAM TO ALL MUSLIM BRITHERS
    what is the best browser to run oracle 10g forms_

    Hello Ady,
    Hey not all of us have a religionok, I extend my statement to those with a different religion, atheists, agnostics and anybody who does not beliefe in a divine being of any kind ;-)
    some of us are bright enough to be atheistsThe implicit statement of this is not better than greeting only users of a certain religion.
    To the OP: I respect your belief, but we had the discussion about greetings in this forum before. To most users any relation to a religion is inapropriate and considered a violation of the Terms of Use, e.g. {message:id=9677530}.
    Edited by: Marwim on 16.04.2012 07:56

  • Please advise what is the query to identify a SQL executed time

    Hi all
    Please advise what is the query to identify a SQL executed time.
    eg, a DML executed at 16-Apr-2013 11:45hrs

    Try like..
    select LAST_LOAD_TIME, ELAPSED_TIME, MODULE, SQL_TEXT elasped from v$sql order by LAST_LOAD_TIME desc

Maybe you are looking for

  • Missing DataBase Login information for deployed VS2008 w/Crystal Report

    I'm creating a Windows Form application using VS2008 Pro and the basic Crystal Reports (included).</br></br> I've successfully added a crystalreportviewer control and a crystal report (.rpt) to my form. I've written the following code in the code beh

  • How do I turn off auto-correct on Macbook Pro?

    I just bought a new Macbook Pro and I want to be able to turn off the auto-correct. It does it in every program and sometimes it puts in the wrong word. It is terribly annoying. Thanks!

  • How to copy a database to a new database on Windows 32bit?

    Hi Gurus, I have a production database 10g on Windows 32bit and I want to make a copy of this database as Test in same server ? Please help.... Thanks,

  • Accounting Setups - Step Complete

    Hi all. I am new to Oracle R12. I am in the process of Accounting Setups - Reporting Currencies. I mistakenly clicked on Complete in the Reporting Currencies - Setup Step. It is now showing Green but I need to update the Currencies entries. Is there

  • Set role in a form

    Hi, If I use DBMS_SESSION.SET_ROLE in a form to set a role with password protected, I must put the role password in my form. That what I do not want. Any idea to prevent this from happen? Thanks a lot Stephen