I have a problem with altering a users password when the password contains a question mark char. I do not encounter this problem with any other char so far, it seems ... |
Friend,
I am using a hard coded select query in oracle with iBatis framework which is running perfectly. If i'm calling for the first time it is fetching the data to screen ... |
I'm looking for a way to port an Oracle query that uses START WITH / CONNECT BY to Derby. Suggestions?
|
I am using a sysdate query in code to obtain the last updated rows in the past 3 hours (should be configurable). The database runs in GMT timezone and the application ... |
Really hate dates in Oracle but all I want to do is just to a basic query to find whether a row or rows that are equal to a date (the ... |
I am trying to decode this little peice of java code (using an oracle10g database) from a left over program i am remaking in VB.net. Say i chose on the datepicker ... |
In my application I have implemented a method to get favourits of particular user. If the user is a new one there will not be a entry in the table.If so ... |
|
In java.sql.ResulSet, can the updateObject, updateString, update[Type] methods update the underlying database without a call to updateRow()?
Thanks,
ktm
|
I have a custom Java query engine that produces a String of SQL (with ? as data placeholders) and a List of objects containing the data to bind to the placeholders. ... |
If using PreparedStatement to query my table. Unfortunately, I have not been able to do so.
My code is as simple as this :-
PreparedStatement preparedStatement = connection.prepareStatement(
"Select favoritefood from favoritefoods where catname ...
|
I am trying to run a query in java that uses a java.sql.Timestamp object as the date to compare with in the where clause.
Here is how the query string that ... |
I am having an NCLOB column in oracle. When I create a row, I need to insert an empty_clob() using normal java insert query.
Does anyone know how this is done? ... |
So i've looked around online trying to figure out if Oracle(Database) was created in C/C++ or Java?
I've gotten answers saying either or, but not a definite answer?
seems like it should've been ... |
I have a SQL query that is returning an oracle Date object.
e.g.
SELECT sysdate FROM DUAL
There is code currently that does the following:
String s = rs.getString("sysdate");
The problem is, this returns different date ... |
Hi
I have an Oracle package in which I have to pass different file names - a.rdt, b.rdt etc
I saved the package into a SQL file and the file contains ... |
I was able to create a stored procedure for an Oracle database, but now I can't figure out how to run it. I'm using SQuirrel SQL and this worked to create ... |
we use getMetaData() on every cursor returned from the oracle stored procedure call.
With ojdbc5 we dont have spike in number of metadata sql's executed and average time. But with ojdbc6 we ... |
I wrote a query of the form:
select .... where x.y in (?) union select .... where p.y in (?) and a.b not in (?)
The question marks indicate places where I ... |
What am I doing wrong? I keep getting weird errors from SQL?
//get parameters from the request
String custID=request.getParameter("cust_ID");
String saleID=request.getParameter("sale_ID");
String firstName=request.getParameter("first_Name");
String mInitial=request.getParameter("mI");
String lastName=request.getParameter("last_Name");
...
|
Oracle keeps giving me an invalid identifier error when I clearly have identified the variable.
//get parameters from the request
String custID=request.getParameter("cust_ID");
String saleID=request.getParameter("sale_ID");
...
|
I keep getting a invalid identifier exception when I try to run the below script:
javax.servlet.ServletException: java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00904: "CUSTID": invalid identifier
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:rreOracle","xxxxxx","xxxxxxxx");
...
|
I get the following error when working on some JDBC code:
java.sql.sqlexception missing in or out parameter at index: 6
Can somebody explain what this means? More generally, is there a website/set of ... |
I am getting SQL Exception.
The following is my code,
public DBConnect()
{
try {
...
|
I have installed Oracle SQL Developer 3 and I tried to connect to mysql database. I used tutorials, which told me to use mysql-connector-java-5.0.8.jar, so I attached it. But when ... |
Can i get the result from a java stored procedure (oracle) directly through an SQL "select * from" statement ?
On the database I would hava a java stored procedure function ... |
I am comparing 2 resultsets, and I have to update one resultset according to the data in another. I can do this easily using updateRow (or insertrow, if required). But I ... |
In Oracle, one can insert multiple rows by doing a query like
INSERT ALL
INTO mytable (column1, column2, column3) VALUES ('val1.1', 'val1.2', 'val1.3')
INTO mytable (column1, column2, column3) ...
|
I'm working on a project that can be described as follows: The user will pass in a table name and some criteria. The program will then retrieve a table from Oracle ... |
In my application we are using the following code
if (m_ps.executeUpdate() != 1) {
{
...
|
I have to implement a requirement for a Java CRUD application where users want to keep their search results intact even if they do actions which affects the criteria by which ... |
I am trying to run a few sql scripts in Oracle 11g R2
When I try to run these scripts from a standalone java code the query runs into 40 odd minutes ... |
My question is:
In the past, the Pro*C programs use the database connection from the caller. But now, How can I pass the connection from Java to Pro*C, considering that the connection ... |
CREATE VIEW customer_ro (name, language, credit)
AS SELECT cust_last_name, nls_language, credit_limit
FROM customers
How do i get the names of the aliases(i.e ... |
I am using Oracle SQL Developer application for the first time. After adding the path to java.exe, it starts well only to display the error "error while registering oracle jdbc diagnosability ... |
I have created a oracle function called getEmployee(id in varchar) in my remote database and I'm trying to call it from my local database using database link.
In getEmployee, I'm trying to ... |
I get the following error when I try to query a cube (based on Oracle Olap 11gr2) from a Java program
java.sql.SqlRecoverableException: no more data to read from the socket.
This error occurs ... |
I would like to verify that the sql query I'm sending to Oracle is the one I actually want. I was wondering how do I do that? I can print out ... |
Okay, this is kinda infuriating. . . I can connect to the oracle database on a server in another city but I can't connect to the oracle database on my own ... |
Does anyone know of a tool that can inspect a specified schema and generate random data based on the tables and columns of that schema?
|
My application gets in a String object query to the database. E.g. String query = EMAIL like '% test%' and USER_NAME like '% user%'. The query is built dynamically and I ... |
I am attempting to use a pooled connection for my web application in Java. I am using an Oracle database and here is my code:
public class DatabaseHandler
{
static ...
|
Probably missing something trivial here but I have a function in my Java application running on Oracle 10g which generates a bunch of insert and delete statements into a BEGIN...; END; ... |
java.sql.SQLException: ORA-01438: value larger than specified precision allowed for this column
ORA-06512: at "CARE_SLB.TRG_AFT_I_U_CATEGORY_MASTER", line 21
ORA-04088: error during execution of trigger 'CARE_SLB.TRG_AFT_I_U_CATEGORY_MASTER'
|
I'm inserting data in table through this query:
insert into CATEGORY_MASTER (
CAT_MAS_ID,
DESCRIPTION, ORG_ID, STATUS, MODIFY_EMPID, LANGUAGE_ID, LG_IP_MAC)
values (
( SELECT COALESCE(MAX(ct.cat_mas_id), 0)+1
...
|
I am working on a large project that contains many reference / look up type tables. This is maybe not the correct place to ask this question but I would like ... |
UPDATE trans_actual SET comment_id = ?
WHERE id = (SELECT MAX(id)
FROM trans_actual
...
|
I have some types in Oracle.
create or replace
TYPE r_telefone_cand AS OBJECT (
candidato NUMBER(10,0),
telefone VARCHAR2(15)
);
create or replace TYPE t_telefone_cand AS TABLE OF r_telefone_cand;
create or ...
|
I need to count two data in same table for 2 time periods.
I tried something like this:
SELECT COUNT(CASE
...
|
I have the following (example) query that I'm trying to run
SELECT some_field
FROM MY_VIEW
WHERE date_field >= TO_DATE('2011-06-22', 'yyyy-mm-dd')
When I run this in SQL*Plus, I get a set of results, when I try ... |
I am polling a file from a unix directory , and creating a external directory using
following command, and loading the data in the file as table. Later i am applying ... |
I want to store Directory/tree structure to backend from java code. Any one can guide me which way is better to store tree structure to database, here tree structure is not ... |
I have a large legacy application which calls resultSet.getString(column) and the column it is calling on is the DATE format in Oracle. This code worked just fine with Oracle 10g ... |
I want regular expression to match the any of the following hints or others in the sql query in the java .
1. /*+ parallel */
2. /*+ first_rows */
kindly let ... |
I am getting below exception, when trying to insert a batch of rows to an existing table
ORA-00942: table or view does not exist
I can confirm that the table ... |
I wanted to know if java.sql.Timestamp can be stored in a oracle database. In teh oracle database the column type is TIMESTAMP? Sorry, i can not try it out myself as ... |
Reasons for java.sql.SQLException: Closed Connection from Oracle??
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at ... |
I've been trying to connect to an Apache Derby/JavaDB embedded database using Oracle SQL Developer but without much success.
I've tried to create a new connection using the following JDBC URL:
jdbc:derby:/path/to/file/database.derby;create=true
which resulted ... |
I've got sql file that contains sqlplus specific script: it includes / or ; as statement terminators, EXEC to execute stored procedures, etc.
I need to execute this script from java (jdbc) ... |
I am using a SELECT statement to get data from a table and then insert it into another table. However the line "stmt.executeQuery(query);" is inserting the first line from the ... |
I am trying to insert data into database but I am getting this exception:
java.sql.SqlException:[Oracle][ODBC]ORA-00928:missing SELECT keyword
|
i'm trying to create a conditional statement in an ORACLE sql code
I have a funtion in java that takes 2 parameters.
getchildren(child1,child2)..this function's parameters are used to create a query statment
public ...
|
I am trying to insert values into Oracle 10g database using the code below but its giving an error of "Missing Expression" on execution. I have to pass reference values into ... |
On my web site, I need to perform a wild card query with a value provided by the end user. The best practice is to use a PreparedStatement mainly to ... |
Please note that I've searched and searched but I am not able to find an answer.
I'm writing a Java application and I need to support both Oracle and Access databases. I ... |
Given this table in Oracle
create table test (bytes raw(100), chset varchar2(50))
insert into test (bytes, chset) values (hextoraw('454647'), 'iso-8859-1')
or in MSSQL
create table test (bytes varbinary(100), chset nvarchar(50))
insert into test (bytes, chset) values ...
|
Tried running a java method that runs this oracle SQL query
String query =
"SELECT count(*) " +
...
|
I'm trying to execute 2nd time PreparedStatement, but it fails if I close DriverManager.getConnection
the code:
public void getRates(String id) throws Exception, DBException {
Connection conn ...
|
I'm getting a curious error on a BEFORE INSERT TRIGGER, which I can't understand. Even after reading multiple questions posted here with similar problems.
failed to process "method": category_id = ... |
I have a table person with columns personID, firstName, lastName, DOB and sex. As I insert each record I auto increment the personID column with a sequence. I need that value ... |
I'd like to be able to get the identity value back after calling an insert statement. I can do this now and it works fine with SQL server by adding SET ... |
Hi i am trying to insert a clob using the jdbc, through a maven plugin. But it is taking about 10 minutes to insert. This is exceptionally slow, and ... |
I'm using JDBC to Oracle 10g database and getting Closed Connection exception.
My Code actually reads one row of resultset and then perform some calculation on it and then add that result ... |
Hello i have big data in my oracle 10g database and have to perform some calculations on every row of resultset. So i call a separate calculation class after fetching value ... |
I have drop down that has list of column name. When user selects column name and enters serach value i populate the page but I am trying to bring everything from ... |
data is inserted into the table, however every time i run and check the console,
below is line displayed in the console.
ds.admintool.dsfilescorrection.XFileCorrectionDesc@492833ffcorrectionBuffer.getA
ctualProduct()C3119A
correctionBuffer.getOperation()CHANGE
correctionBuffer.getComments()test6/10
udesc.getLoginId()136846
udesc.getLoginId()136846
java.sql.SQLException: ORA-00942: table or view does not exist
...
|
I have a problem with fetching a timestamp from an Oracle database.
The table is created as follows:
create table csi(start_time timestamp);
Then I selected the value as follows:
import java.sql.*;
public class hel
{
...
|
I'm working on desktop application (Extract Transform Load type of app) that requires uploading of large CSV files (about 6 GB) to a database using Java as front end and Oracle ... |
I'm getting an error when running the following SQL against oracle 10g (10.2.0.1.0):
UPDATE fx_datumvcompgeneric AS c
SET mp = (SELECT p.mp
...
|
I'm getting ORA-00933 when creating the following prepared statement for Oracle 10g (10.2.0.1.0) using JDBC:
conn.prepareStatement("INSERT INTO fx_tv_date (id, mp, doc_id, effective, actual, stale, val) VALUES (?, ?, ?, ?, ?, ?, ...
|
I'm working on a Java GUI project; in one of its property screen I use 3 comboboxes in order to get: first user chooses DB name, with this value 2.Schema names ... |
I am passing a select query from java, it works for all table but one of the table gets an error "ora-00942 table or view does not exist". I checked grant ... |
I have a complex SQL query which works when I paste it into SQLDeveloper from the source code or the debug logs but fails to return results when using iBATIS 2.3.4. ... |
This question is related to my original issue How to return an array from Java to PL/SQL ?, but is a more specific.
I have been reading Oracle Database ... |
I'm having some trouble executing a nested sql query. It works fine when i run it on TOAD (for Oracle DB) but when I try and execute the same query from ... |
I got to insert HTML into a column of a Oracle DB table. I created the insert statement, and used apache commons StringEscapeUtils.Escapesql and StringEscapeUtils.EscapeHtml to try to insert that HTML. ... |
I've been charged with writing a DB manipulator with java for a project.
My professor gives us material that says to use the sqlj library (Oracle I'm assuming?), but nobody explains where ... |
I currently work with Oracle databases, but in a few weeks I need to start learning Informix.
Are there any tools available for Informix, similar to Oracle SQL Developer or any
extensions for ... |
I am writing a simple java program that calls a oracle stored procedure, but it doesn't work with callable statement.
When I call that stored procedure on SQLDeveloper,
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>'XXXXX', TABNAME=>'XXXXX',
PARTNAME=>'XXXXXYYYYMM', ESTIMATE_PERCENT=>5, METHOD_OPT=>'FOR ...
|
I need to insert many sql rows into oracle database very fast. IndexData is the class which contains save method to insert into oracle database.
while ((line = in.readLine()) != null) {
...
|
Normal way looks like this:
pStmt = conn.prepareStatement("SELECT DETAILS FROM PROGRAM_HISTORY WHERE id = 12");
rset = pStmt.executeQuery();
Clob detailsClob= rset.getClob(1);
...
|
We have a table with around 2 billions of records. Simple select query also taking lots of time to fetch the records. We tried Indexing & partitioning options but didn't got ... |
In this code I am trying to delete the tables if they already exist every time I run the program, but the control is not going inside the if statements. table1 ... |
When I used the follow snippets to update Oracle Clob:
String toBeUpdated = ""
StringReader reader = new StringReader(toBeUpdated);
...
|
Is there a minimum/max length for the initialization vector when using the DBMS_CRYPTO.ENCRYPT proc? I get the error below:
ORA-28817: PL/SQL function returned an error.
ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 3
ORA-06512: at "SYS.DBMS_CRYPTO", ...
|
I have a table named "preference" which includes more than 100 columns in oracle,I wrote a little bit complicated SQL which need use keyword UNION/INTERSECT/MINUS to do a query.
Take a simple ... |
I get an error when I try to insert some rows to a db. so here is the code
try {
String insertStmt = "INSERT into " +
...
|
Possible Duplicate:
Oracle: is there a tool to trace queries, like Profiler for sql server?
I am using JDBC to talk to Oracle. Are there any ... |
I want to retrive data from database and display it in java. So I created this function, which returns a cursor.
create or replace function std_getInfoFunc return types.cursortype
as
...
|
What I Require :- To a DB table which has entry of all the days of an year with a flag "IsHoliday" with "Yes" if its a holiday and "No" if ... |
I have an ORACLE SQL sctipt with several queries and tables, and I wan to run that script from my java program at the starting of the program to ensure that ... |