Need help on timestamp in oracle....

hi
in my web application i hav oracle as backend. Through web page i m suppose
to make entry in the database. The table contains 2 entries for datatype TIMESTAMP(6) out of these one is compulsory (i.e not null) and other is not compulsory. here is what i m doing in coding:
in java servlet
long q = System.currentTimeMillis();
query = "INSERT INTO TABL(field1,field2,field3,field4,field5,field_timestamp) VALUES(" val1 ",'" + val2 + "','" + val3 + "','"+val4+"','"+val5+"',to_timestamp("+q+"))";
int r=stmt.executeUpdate(query);
but this code gives me error that column does not exists ....
can anyone help me i want to store timestamp value in the table....

Probably one of those things that you are concatenating in there appears to be a column name (instead of a literal) in your SQL. When you got an error message suggesting there was a problem with your SQL, did it not occur to you that you should look at the SQL? What you posted there is just some rubbish code that generates the SQL.
I call it rubbish code because it would be much easier, not to mention more practical, to use a PreparedStatement.

Similar Messages

  • Need help for switching to Oracle Apps

    Hi All,
    I am a System Analyst working in Singapore for the last 6 yrs.Currently for the last 3+ years i am in the project implementation & support team for ERP Team.We are using JD Edwards.Currently i have the role of Functional Consultant.
    I want to shift to Oracle Apps (11i).The reason being there is not much scope in JD Edwards.Intially i was working in Developer 2000 as a Forms/Reports Developer.
    I couple of questions to ask :
    1) Do i need to go though a Oracle Apps Training as i already have experience in Jd Edwards ??
    2) Can somebody recommend some good Training institutes in Singapore with Placement Assistance ??
    3) Do anybody knows any company in Singapore who can give training in Oracle Apps and take in professionals who want to make a switch but have experience in another ERP package ??
    Thanks
    Regards

    Hi,
    As you said you were initially working on Developer2000 so it would be lot easier since there would enough background on PL/SQL,forms and reports.Best thing for you I would recomend is pick 2 or 3 modules of your area in JD Edwards like Financials(General Ledger,Recievables,Purchasing,Payables,Fixed Assests...) or HRMS Suite(HRMS,Payroll,Advanced Benefits) which I believe the core business logic for any ERP would be the same. So pick your strong modules in JD Edwards and go through the Oracle Apps Doc. which is available online.In the documentation you will find Application Developer Guide which will be helpful if you are looking to be an Technical Person or you can go through the Module wise documentation if interested in Functional position. Either case better to have overall idea about interested module I mean how the logic and setup will be.
    Initially it will be rough however if you don't give up Apps is lot easier.
    Regards
    Uday Ravipati

  • Need help in configuring the Oracle app server with OC DB Server

    Hello people
    I attempted to insta;; Oracle Clinical 4.5 and I have a problem that you mayhave resolved a long time back and I need some help. This is what I have done on the installation.
    I need your help in centralizing my tnsnames.ora and sqlnet.ora files. I am an Oracle Clinical guy and not an Oracle Expert, hence the request.
    Part_1
    1. Installed Oracle 9i 9.2 database on Win2K server - W2kOCSVR
    2. Installed Oracle Clinical 4.5 and created DB on W2KOCSVR.
    3. Started up database and all is fine - tnsnames and sqlnet.ora
    4. Each of these is on a separate partition including the OS.
    Part-II
    1. Installed Oracle Appl Server 9iAs 1.0.2.2.2a on another machine OCMIDTIER. This installed Oracle iSuites home and stuff.
    2. Then I installed Oracle 9i developer suite - Oracle forms and reports.
    3. Installed Jinitiator 1.1.8.24 on the middle tier machine.
    4. Basically this is the middle tier that is a Webserver that will be linked to the Database Server in Part-I
    and lastly, I will have web clients with Jinitiator and a web browser.
    Requirement:
    I need to centralize the TNSNAMES.ora file and the SQLNET.ora file on all the machines. How do I do this?.
    I have the TNSNAMES.ora and the SQLNET.ora on DB server and it is working fine. However, I have noticed many tsnnames.ora files on the middle tier - OCMIDTIER. (I've left out the example files)
    a) E:\ORACLE\806\net80\admin\tnsnames.ora
    b) E:\ORACLE\806\net80\tnsapi\tnsnames.ora
    c) E:\ORACLE\iSuites\hs\admin\tnsnames.ora
    d) E:\ORACLE\iSuites\network\admin\tnsnames.ora
    All I need to know is which if these files do I need to integrate with the Tnsnames.ora file on the DB server - W2kOCSVR and how do I go about doing this?.
    Your help is appreciated. If I were to see a copy of your tnsnames.ora on the webserver (middle tier) and the sqlnet.ora, I will be able to get an idea of how this is done. Right now, I am using tnsnames.ora but once I learn how this ties up, I can move to names sever.
    Thanks for your help.
    Cecil

    Hi Cecil,
    I got into the same issue. I copied the content from the good tnsnames.ora to tnsnames.ora on webserver and it worked fine. I copied the details of the connect string that was working fine on dbserver. i was working on W2k server. Hope this helps
    Gonnagar

  • Idiot needs help!  Setup Home Oracle Linux Server

    I'm trying to setup a Linux server using an old PC. I can download Oracle Linux in a zipped file from Oracle. Then, I'm suppose to unzip using an Oracle supplied utility and burn the extracted files to a DVD. My client PC is running Vista Home. I'm a little confused on how I unzip the "Linux" files and burn them to a DVD. I would think this should all be done in a Linux environment/(or on a Linux box) - this is what I'm trying to setup. How do I get the ISO IMG files extracted and burned for a Linux boot cd? If it sounds like I don't know what I'm talking about, you're right - I don't.
    HELP!
    Edited by: 899355 on Nov 27, 2011 11:38 AM

    Most PC's come with DVD/CD authoring software installed, like Nero or MagicISO maker, etc. What software do you have available? There is plenty of information available in Google about how to burn an iso image to dvd. Or you could check http://www.wikihow.com/Burn-ISO-Files-to-DVD. Whatever you choose, make sure to burn the raw ISO image and NOT the disk of the "mounted" .ISO image. I would also recommend 7-zip to unzip the downloaded files.
    In case you are installing this for educational or development purpose and your PC has at least 4 GB of RAM you may consider to use free Oracle VirutalBox from http://www.virtualbox.org. It can boot and use saved .iso files without the need to burn media. This option will not jeopardize your Windows installation and allow you to run Linux as a Guest OS under your current Windows OS, when you need it. Don't fumble around with old fashioned dual-boot options - it's better to get some more cheap RAM and bigger disk if necessary. There are also pre-build virtual machines available at http://www.oracle.com/technetwork/community/developer-vm/index.html

  • Need help in Plsql for Oracle Reports

    Hi i need urgent requirement for this, Kindly guide me. Since i couldnt do.
    Main Table:
    For example: Conside this table: (Card_no, month and year are unique constraint)
    Card_No Name Amount_1 Amount _2 Total Month Year
    1 Justin 50 1000 1050 Jan 2011
    1 Justin 100 500 600 Feb 2011
    2 Charles 50 100 150 Jan 2011
    1 Justin 100 50 150 Jan 2012
    1 Justin 50 1000 1050 Feb 2012
    1 Justin 100 500 600 Mar 2012
    2 Charles 50 100 150 Jan 2012
    1 Justin 100 50 150 Jan 2012
    Now i need Reports like this:
    1. When i select Year as 2012 and select amount1, i need report like this
    Card_No Name Jan Feb Mar Apr May June . . . . Dec Total
    1 Justin 100 50 100 0 0 0 . . . 0 250
    2 Charles 50 0 0 0 0 0 . . . 0 50
    2. If i select many years and select amount1, i need report like this
    Card_No Name Year Jan Feb Mar Apr May June . . . . Dec Total
    1 Justin 2012 100 50 100 0 0 0 . . . 0 250
    1 Justin 2011 50 100 0 0 0 0 0 150
    2 Charles 2012 50 0 0 0 0 0 . . . 0 50
    2 Charles 2011 50 0 0 0 0 0 . . . 0 50
    These are the two requirements
    Kindly guide me and many more suggestion also will be helpful
    Thanks in advance

    Actually you need to use matrix report in you report style to meet your requirement
    however please try below file if you use oracle 10g (I am not much sure as it was checked long time back)
    https://docs.google.com/file/d/0B6k7l8hLvpK2UnJwUDFRR1N5d2s/edit
    Best of luck
    Edited by: AppsLearner on Aug 3, 2012 12:49 AM

  • Need help about certification in oracle 9i DBA track

    Hello there everyone.
    I don't know whether this topic I am posting is allowed or not, but I really need some help. I am doing my BSc computer science second year and I have just started studying SQL now. I always wanted to achieve oracle certified certificate. So I am planning to do Oracle 9i DBA track associate level and then professional level. I will be doing it from oracle certified institute.
    But as I have just started SQL language now, so I don't have much experience in SQL. So what do you people suggest? Will it matter anyway to wait for some months or do now as I am gonna join that institute and they are gonna teach me all the topic.? Or should I wait for experience?
    If anyone of you have given that exam then please say something about your experience. I will be really very helpful.
    Regards,
    Prajit.Nair.

    Absolutely! I started with 10g because that is the primary release in use at my employer; although we also have some 9i and some 11g in use. So it made sense for me to start with 10g. But if I was just getting started with Oracle, I would start with 11g. An 11g cert is still valuable to employers using 10g or 9i; in fact they may prefer it since they will not have to pay to upgrade your skills when they do upgrade Oracle.

  • Need help in Customization in Oracle Business Intelligence.

    Hi Guru,
    I am working on ODI to customize Oracle Business Intelligence ( Category 1 and Category 2 Customization ). I need comprehensive / detail documentation on "OBI Customization" and "RPD Modification" . Kindly help and advice.
    I use OBIEE 11.1.1.7.1 and ODI 11.1.1.7.0.
    Thanks

    Hello Arshad,
    Thanks for signing you post. It would be easier if you changed your forum handle to your name for communication purposes.
    So I did understand you correctly Ijust wasn't aware that Oracle still uses this somewhat arbitrary wording. Anyways as I said you're looking for a How-To on customizing Oracle BI Applications which means learning how to work with OBIEE and how to work with ODI.
    To have and read the documentation isn't bad - the new one is here by the way: Oracle Business Intelligence Enterprise Edition Documentation - but places like the Learning Library I posted are a good place as well since your questions are potentially very vast.
    In general for what you call Cat1 changes it's all about
    - finding the source of your new column in a source system or calculating it in the ELT if it is a derived column
    - adding it to your physical schema of the target database
    - adjusting your ELT processes to fill it
    - import the new column into the RPD physical layer or create it manually
    - map it to a new logical column in a logical table in the business model
    - expose it in the presentation layer
    Cat2 is more of the same but you also need to integrate it into your physical model (both actual physical model in the database and the physical model metadata of the RPD) in terms of joins etc and your ELT-work becomes a lot more extensive (table construction, key resolution, SCDing, partitioning, indexing,..........).
    As you can see there's a lot of things to cover so we can't just "give you an answer". You're basically touching topics which take time to learn and assimilate and to just jump in and start doing isn't necesssarily somehting I'd suggest. Best take a training course on OBIA since otherwise you may implicitely "just do" things because you were told so in here or by someone and you'll never see and be able to comprehend the underlying concepts and techniques.

  • Need help on Certification program-Oracle soa Infrastructure Implementation

    Hi all,
    I want to appear for "Oracle Service Oriented Architecture Infrastructure Implementation Certified Expert"
    certification but i dnt have resources... nor i know how much should i study,how deep???nor even have any sample question papers
    Can some one please help me out....
    Thanks

    Please post this message to the dedicated forum @ Oracle Certification Program
    This way you might get the information you need.
    Thanks,
    Patrick

  • Need help on Analysing the oracle code.

    Hi,
    Here i try to frame question, pls understand and give the best way to solve this.
    We have running 20 to 30 unix scripts on daily basis. Each script has connected to oracle session and execute the corresponding packages & procedures. Some scripts are running at the same time. At this time oracle code in the script is not executed due to the table locking in other script. We have oracle trace files whenever the oracle code is not executed it shows the error and terminates the oracle session.
    Examples:
    Below the sample oracle execution log file. where we get the error and terminate the oracle session for your reference.
    ==================================================================================
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 10 06:18:45 2012
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    SQL> SQL>
    Session altered.
    SQL> 2 3 4 5 6 7 8 9 begin
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
    ORA-06512: at "SIEB7P04.P_ARCHIVE_TBL", line 42
    ORA-06512: at line 4
    SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    goin into RunProcedures Function
    0
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 10 06:19:19 2012
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    SQL> SQL>
    Session altered.
    SQL> 2 3 4 5 6
    PL/SQL procedure successfully completed.
    SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    goin into Check error report Function
    Pkg_Tfm_If_Merge OK
    ==========================================================================
    When you observe the above code, in unix script we try to connect to the oracle instance 2 times,
    1st instance it was terminated with some error.
    2nd instance it was successfully executed the oracle code.
    By analysing the above log we found where the error was occured and the reson behind this also we know.
    Assume the script called the procedure 'P_ARCHIVE_TBL' 5 times and the procedure works on different parameter(we could say different table) each time it was called.
    Is it possible for us to know in which procedure call, it is errored out.
    For any information pls revert us or ping me to this mail [email protected],
    Regards,
    Mani.

    Hi,
    You would need to have an exception block in your pl/sql code. You should also save table name in a variable when this procedure is called for every table. You should return/print the error code from exception block alongwith the table name and then you will be able to know that during which call of this procedure, the error was returned.
    Salman

  • Need help setting up an Oracle BPA Local Server

    I would like to make my computer the server and enable other users to connect to my Oracle BPA database. Is there an easy way to setup my computer? I tried having another user add my IP address as the server location using the "Add Server" option in the menu but that did not work. Do I need to change any settings?
    Thanks!
    Edited by: user10990394 on Apr 21, 2009 1:35 PM

    Hi,
    The Business erver / Repository Server is not the part of Oracle BPA offering as of now
    Oracle calls Business Server as Repository Server. And its different product and need a different licenses
    And the bad news is it isnt avaliable any where else for download.
    the products in Oracle BPA package are originally part of IDS Scheer's ARIS product range.
    And IDS does not gives any evaluation copies (atleast in india), thanks to Oracle that they have made BPA suite avaliable for evaluation.
    So if you wish to experiment with Repository Server you have two ways either buy it from IDS or wait for Oracle to offer the evaluation version, i wont suggest buying something that you havnt tried :)
    Gaurav Sharma :)

  • Need help recreating this in Oracle (Temporary Table and a Cursor)

    Hey all,
    My client has asked me to see if it's possible to move his SQL Queries into Oracle, and then move EVERYTHING off of MSSQL into this new oracle environment. The problem is, I wrote the entire MSSQL system, and i know nothing about Oracle.
    Basically, I need some examples. I have been stumbling around Oracle for about a year now, so i'm 'somewhat' familiar with it.
    Basically, i'm going to create a script/stored procedure that will first:
    Create and define a temporary table that is used when the script/proc is called.
    Then, thru cursors, i'm going to add a bunch of lines to it.
    Finally, i'm going to Run a select statement against the temporary table we created.
    Now, I can't create a table on the server, as the production environment will not allow it, so i need to be able to create this virtually inside the script, and then it automatically self destructs at the end of the script.
    If anyone knows if this is possible, please post me a few links to examples, or just lay down the code to get the temprary table made.
    We're using TOAD as the interface.
    Thanks,
    Dan

    Thank you for the warm welcome.
    The SQL looks something like this:
    (Before you get lost in the code, this is an abreviation of the code, but every function is represented. This will also work in TOAD Script? I'm most worried about the use of how a Table is declared in Oracle, as i've seen many different versions of how to do this. Thanks)
    ~Dan
    Declare @AREA nvarchar(50)
    Declare @tmpTable Table (
         [AC_PROPERTY_ID] [INT] NULL,
         [PROPNUM] [nvarchar](50) NULL,
         [SORT_ORDER] [INT] NULL,
         [IS_TOTAL] [BIT] NULL,
         [FIELD] [nvarchar](200) NULL,
    [AREA] [nvarchar](200) NULL,
         [ENG] [nvarchar](200) NULL,
         [RSV_CAT] [nvarchar](200) NULL,
         [WELL_NAME] [nvarchar](200) NULL,
         [SHORTS_PROGRAM] [nvarchar](15) NULL,
         [SHORT_MO] [nvarchar](6) NULL,
         [SHORTS_YR] [nvarchar](6) NULL,
         [SHORTS_DESC] [nvarchar](100) NULL)
    Insert Into @tmpTable ([AC_PROPERTY_ID],[PROPNUM],[FIELD],[AREA],[ENG],[RSV_CAT],[WELL_NAME],[SHORTS_PROGRAM],[SHORT_MO],[SHORTS_YR],[SHORTS_DESC])
    Select AC_PROPERTY_ID],[PROPNUM],[FIELD],[AREA],[ENG],[RSV_CAT],[WELL_NAME],[SHORTS_PROGRAM],[SHORT_MO],[SHORTS_YR],[SHORTS_DESC] from dbo.someoldtablenameimadeup where propnum>1000
         DECLARE idcursor cursor
         FOR
         Select Distinct AREA
         from @tmpTable
         Open idcursor
         Fetch Next from idcursor into @AREA
              While (@@FETCH_STATUS <> -1)
                   BEGIN
                   IF (@@FETCH_STATUS <> -2)
                        <Do stuff for each record in the cursor>
              FETCH NEXT FROM idcursor INTO @AREA
              END
              CLOSE idcursor
              DEALLOCATE idcursor

  • Need help re applet and oracle thin

    I'm having with applets when it comes to connection to the database. Here's what happened I want to integrate my Elixir report to my applet application I compiled it and I saw no error. But when I tried to run a dialog box appeared into my screen with a message
    "java.security.AccessControlException:access denied(java.util.PropertyPermission oracle.jserver.version read)"
    what's wrong with this I don't know what to do already hope you can help me figure out what's wrong with my program tnx.
    here's my html code:
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Author" content="Shem Kua">
    <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; I) [Netscape]">
    <title>PPI Reports</title>
    </head>
    <body>
    <applet codebase="./" code="ReportApplet" archive ="report.jar,elxrt.jar, ojdbc14.jar" width=780 height=480>
    <param name=mode value="appletviewer">
    <param name=dsmfile value="sav/ppi.sav">
    <param name=template value="templates/ppi.template">
    </applet>
    </body>
    </html>

    In contrast to what many people say in this forum, it is possible to have an unsigned applet access a database. You don't even have to manipulate the client's policy-file. The requirement is that the database is located on the same machine as the applet is downloaded from.There are however other things that can break this possibility. One is the database-driver itself.
    In the case of Oracle we have tried using different versions of the driver. When using version 8.1.7 or 9.0.1 things work nicely, but when switching to version 9.2 it stops working. There is a question on OTN [1]. Let's see what Oracle has to say about it.
    [1] Problem connecting using Oracle JDBC drivers

  • Need help solving listener and Oracle problems with Mac OS X 10.4 "Tiger"

    I have Oracle 10g working on Mac OS X 10.4 "Tiger" except for the listener and Oracle net 8 configuration. I have not been able to get the Oracle listener to work with my built in Mac Airport wireless network card or built in ethernet card. I keep getting the errors
    connection refused cannot start listener. Can anyone offer help?
    Thanks
    Ben
    [email protected]

    Hi Ben,
    how does your listener.ora look like ?
    Mine is:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ronald-g4-eth)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ronald-g4-wifi)(PORT = 1521))
    and listens to the ethernet and airport address.
    When do you get the problems ?
    regards,
    Ronald
    http://ronr.nl/unix-dba

  • I need help with paginating my Oracle database records in JSP

    Please can someone help with a script that allows me to split my resultsets from an Oracle database in JSP...really urgent..any help would be really appreciated. I'm using the Oracle Apache http server and JSP environment that comes with the database...thanks

    First thing you have to do is decide on a platform and
    database. Check to see what your server supports. Whether it is ASP
    and MSSQL, PHP and MySQL or less likely Cold Fusion.

  • Need Help to get into Oracle Hyperion Env

    Hi All,
    I want to make my carrier as Hyperion Essbase & HFM consultant. Where can i start to improve my knowledge. and I don't have any previous experience in this env. But to improve my knowledge i have read Essbase-6.5 admin guide and hfm admin guide and some basic interview questions stuff of Essbase. but i am not happy with all these. i need some real time scenarios, examples and critical issues. and also can you suggest some of docs which necessary to reed.
    I am very thankful to the people who respond to this post..
    Thanks & Regards
    VAMSI

    VAMSI,
    I strongly recommand:
    You should attend a training course.
    1. "Essbase boot camp"
    2. "Essbase (EPM) Administration"
    to get a basic idea what you are about to work with.
    Yes I know, this is very often a question of money...
    But
    3. There are a lot of books such as:
    The Series "Look smarter then you are with ..."
    "Oracle Essbase & Oracle OLAP" (this is good to learn basics about R-OLPA (Oracle) and M-OLPA Essbase the differences and pros and cons)
    Just search google for more books and infos.
    AND dont miss out the Oracle documentation!
    Regards and good luck!
    Andre

Maybe you are looking for

  • JBO-26080

    Hello everyone, We have built an application in JDeveloper 3.1 with BC4J. During an update of a row in the database we get the following error: DMLException: JBO-26080: Error while selecting entity for PfpUsers This error is generated at this line of

  • Performance problem after upgrade from Web version to Basic version

    A couple days I ago I 'upgraded' my SQL Azure database from the Web service tier to Basic. Since doing that the performance on many of my queries as dropped noticeably. I've made no schema changes, and the amount of data in my database has changed ve

  • Combined dhcp and static ip?

    I'd like to be able to specify a static ip address and get the remaining stuff (dns, gateway, and whatever) from dhcp. It this possible?

  • Can't text from my ipod

    I can't text to or from my daughter's ipod.  I have an iphone.. I should be able to but after updating to iOS7 i can't  any thoughts?

  • Need drivers for palm m500 series for Vista 32 bit

    Where can we find driver downloads for my husbands palm m500 series for 32 bit Vista?? Thank you!! Don Post relates to: Palm m500