Have a look at the following code snippet.
response.setContentType("image/gif");
String url="jdbc:oracle:thin:@localhost:1521:xe";
String username="xyz";
String password="abc";
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection(url,username,password);
String sql="Select name,description,im...
Hi,
today in Amazon I found this book: Cracking SJPP: A Comprehensive Sun Java Programmer Plus Certification Study Guide.
I found this book really curious because is about a Sun certification that I was thinking was going to be on hold until Java 7, but today we don't even have an official release date for Java 7. Besides that, I think...
Hi,
I have 2 tables named T1 and T2. Where T1 is parent and T2 is child.
The scenario is, I started a jdbc transaction and then insert a row in T1 and then try to insert a row in T2. Inserting row in T2 gies me "Integrity Constraint-Parent key not found" exception.
How i handle this scenario ?
Connection con;
try{
con = ConnectionP...
Hi,
Basically I have two questions.
I investigate means of implementing WebDAV interface for EMC ATMOS storage. There will be billion(s) of files with thousands simultanous reads and probably hundreds creations/deletions.
The problem is with COPY/MOVE/DELETE operations. If the structure is stored in ATMOS (using namespace interface wh...
Hi,
What are the equivalent of SYSIBM. in Oracle?
...
Hi,
I have a table which has only one number field: [ value NUMBER(12.0) ]
I would like to store these two types of non negative numbers.
Type A : ( a list of non negative numbers )
Type B : ( another list of non negative numbers )
I have just this one table. Without making any DML changes, is it possible for me to store both types ...
Hi All,i have a main database with only setup data at the headquarter and several databases at different branches,i created a database link for each branch server.
In some case i would like to query all the valid links (as some links could be invalid due to connection problems or anything else),so my question is How to check if the data...
See example:
http://stackoverflow.com/questions/189557/ora-00942-table-or-view-does-not-exist-how-do-i-find-which-table-or-view-it-is
Basically in a case like this Oracle responds with something like:
SQL Error: ORA-00942: table or view does not exist
Obscure error messages from Oracle when using an ORM lib like Hibernate aren't exact...
Say you generate ddl to create all your db tables etc via Hibernate SchemaExport etc. What you get is a script which starts with drop statements at the beginning. Not a problem, as I want this. But running this script produces a crapload of ORA-00942 errors running on an Oracle db.
Since they're not really errors if the tables just...
Hi,
I have a table with three columns and I have fetch a column whose value matches with value 'aaaa' and 'bbbb'
columnA ColumnB ColumnC
data1 yyyy aaaa
data2 zzzz mmmm
data1 hhhh nnnn
data3 aaaa bbbb
So, if I query with "Select * from ...
I have this procedure:
PROCEDURE P_LOAD_EXPIRED_ACCOUNT
(
pDayDiff IN NUMBER,
ExpiredCur OUT MEGAGREEN_CUR
)
IS
BEGIN
OPEN ExpiredCur FOR
SELECT
ACCOUNT_NAME, SERVICE_TYPE,
CASE
WHEN SERVICE_TYPE = 1 THEN ADD_MONTHS(ACTIVATED_DATE,3)
WHEN SERVICE_TYPE = 2 THEN ADD_MONTHS(ACTIVATED_DATE,6)
WH...
SELECT DECODE (SYSDATE, SYSDATE + 1, NULL, SYSDATE)
FROM DUAL;
SELECT DECODE (SYSDATE, SYSDATE + 1, TO_DATE (NULL), SYSDATE)
FROM DUAL;
why am i getting the results in different formats from the queries above?
i am using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
...
In an Oracle stored procedure, how do I write a transaction? Do I need to do it explicitly or will Oracle automatically lock rows?
...
Hi,
I am trying to execute the following statement on a table containing 10,000 rows but the query is executing forever.
delete from Table_A where col1 in ('A','B','C') and col2 in ('K','L','M') and col3 in ('H','R',D')
Please can anyone assist!
Thanks
A
...
So I have a table that's basically a tree. Each row has a parent in the same table, and a lvl column that tells me the level in the tree, the root being lvl = 0. Now say I want to select all the rows that have a name starting with A, but only those that are on the highest level in this group. So the tree might have 9 levels, but the high...
I am looking for a way to get metadata from an Oracle store procedure, such as input/output parameters and their types.
I did try DESC but it is not working:
stmt = conn.createStatement();
ResultSet rs1 = stmt.executeQuery("desc pack.procname");
while ( rs1.next() ) {
System.out.println(rs1.getString(1));
}
Any ideas on what approac...
access to registry key 'Global' is denied when published asp.net 2.0 website that uses oracle 10G x32 on windows server 2008 x64
...
I've got a rather tricky problem that I've been trying to solve for the past few days. I am currently solving it with the Oracle SQL Model clause and could probably have written a function but I'm looking for a nice simple solution using analytic functions or something but can't figure anything out.
For a given policy (ddpsid), I want t...
hi!
I have an "select * from tables..joins..." query on an oracle database, wich would return about 22 milions rows. I'm using C# and ODP.NET , like so :
oracleDataReader odr = command.ExecuteReader();
But during execution of this statement, the process takes about 1,5 Gb RAM, wich is not very good.
Any ideea on how to save some memory ...
Hi
I'm sorry that I have to ask that here, but I haven't found a conclusive answer on the oracle page or in the internet. I've even been on the phone with a sales rep, but they couldn't help me neither.
What kind of Oracle Setups/licenses are you using for your development environments? We currently are using 10g XE which only has one...