oracle

DevArt's dotConnect for Oracle vs DataDirect's ADO.NET data provider

Has anybody done a comparative analysis of dotConnect for Oracle from DevArt and the ADO.NET data provider from DataDirect. We are thinking of using the Entity Framework support available in these frameworks for a critical enterprise application. Some articles that I read suggest the following: DevArt dotConnect is much faster as comp...

Nested join on same table (tree structure)

My date is organized in tree structure. The following applies (Oracle SQL syntax): CREATE TABLE TREE ( NAME VARCHAR2(20), ID NUMBER(10, 0), PARENT NUMBER(10, 0) ) ; INSERT INTO "TREE" (NAME, ID) VALUES ('a', '1'); INSERT INTO "TREE" (NAME, ID, PARENT) VALUES ('a.1', '2', '1'); INSERT INTO "TREE" (NAME, ID, PARENT) VALUES ('a.2',...

Oracle delete user

I have such table: users: id PK . . . workers: id PK user_id (FK to users) . . . evaluations: id PK worker_id (FK to workers) . . . And now I want to delete user. When I delete user then worker also should be deleted. How can I do this? ...

How to specify HTML doctype in Oracle SQL*Plus HTML report?

I'm producing an HTML report from a query using: set markup html on table "WIDTH='100%' BORDER='1' cellpadding='2px' cellspacing='0px'"; Is there a way of including a doctype declaration such as: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; I've searched but I can't ...

OCCI: Querying for metadata of a stored procedure within a package

I am trying to get metadata about parameters of a stored procedure that is defined in a package using C++ Oracle OCCI. Getting parameter metadata of a standalone proc is straightforward: MetaData meta = connection->getMetaData("MY_PROC"); vector<MetaData> params = meta.getVector(MetaData::ATTR_LIST_ARGUMENTS); However, if I try to que...

PL SQL concatenate 2 resultsets

I need to get the result of concatenating 2 similar querys' resulsets. For some reason had to split the original query in 2, both with their corresponding order by clause. Should be something like (this is an oversimplification of the original queries) Query1: Select name, age from person where age=10 Resultset1: Person1, 10 Person3, 1...

Oracle select all rows using the contains keyword

Hi, I'm looking for a character which I can use in an oracle conatins to get ALL results. If I search for the string "test" in a title-column I use this statement: select * from my_table where contains (title, '<query><textquery grammar="CTXCAT">test</textquery></query>') > 0 With this statement I get the rows which have the "...

Is it possible to partially refresh a materialized view in Oracle?

I have a very complex Oracle view based on other materialized views, regular views as well as some tables (I can't "fast refresh" it). Most of the time, existing records in this view are based on a date and are "stable", with new record sets having new dates. Occasionally, I receive back-dates. I know what those are and how to deal wit...

SQL query using oracle 10g database datetime equal not working

Hi, I have SQL query like this. select * from TABLE_A where LogDateTime >= startdatetime and LogDateTime <= enddatetime; But some reason enddatetime equal is not working. I have the record with the date 11/23/09 8:50:09. When I select enddatetime as 11/23/09 8:50:09 it's not returning this record. It's returning till 8.49:59. What ...

Benchmarking Oracle 10G on Windows XP

I am not a DBA. However, I work on a web application that lives entirely in an Oracle database (Yes, it uses PL/SQL procedures to write HTML to clobs and then vomits the clob at your browser. No, it wasn't my idea. Yes, I'll wait while you go cry.). We're having some performance issues, and I've been assigned to find some bottlenecks ...

Importing data into Oracle via Web Enterprise Manager with unique constraints

I am not at all familiar with Oracle so bear with me! I am using version Oracle 10G with the web front end called Enterprise Manager. I have been given some CSV files to import however when I use the Load Data from User Files option I think I can set everything up but when the job runs it complains that there are unique constraints, I ...

could not find the main class

Hi, I'm using the JDK 3.1. I am using XML Publisher. I'm getting this error: Could not find the main class. Program will exit. After I click on "OK", I get Java execution failed. Please check the Java Option in the option dialog ...

How to store in the field only time, not date + time pair?

In one field I need to store not the date + time pair 01/10/2009 22:10:39 But time only 22:10:39 Because I think that save disk space (I have 2 million rows) or provide faster processing. Thanks in advance ...

Oracle SQL Count Function Display Only One Value

I am learning SQL for a personal projects and seems that I don't quite get the COUNT function. I have a "sample" table with this sample data: NAME COLOR Tom red Tom blue Jerry yellow Keri yellow Paul red Bob yellow Bob red Mary green What I am attempted to do is print out only those NAME values that have only one COLOR va...

In Oracle, how do I create the "CREATE TABLE..." syntax for an existing table?

SQL Server has a way to let you "export" an existing table's schema, in the form of its necessary SQL "Create Table" commands. How do you do this in Oracle? Is there a nice automated way of doing it? ...

Transpose select results with Oracle

Hi All, my question is, with some background: I have to generate some sql queries based on the table metadata (column format), and the result is something like: TABLENAME1|COL1 TABLENAME1|COL2 TABLENAME2|COL1 TABLENAME2|COL2 TABLENAME2|COL3 TABLENAME3|COL1 TABLENAME4|COL1 TABLENAME4|COL2 ... /*some other 1800 rows */ (Yeah, it's ord...

When to choose Oracle over MySQL?

I am a MySQL fan , however i want to know in which situations choosing Oracle over MySQL seems like the way to go .. like what would be the indicators which would make you say .. "I need Oracle for this project" Update: As another fellow SOer pointed out, dont limit your answers to Oracle ... if you know of something better , please poi...

SQL getting max date from two tables

Hi, I have two tables USER (one row per user) id,username,firstname,lastname,lastmodified 1,johns, John,Smith, 2009-03-01 2,andrews, Andrew,Stiller, 2009-03-03 STUDIES (multiple rows per user) id,username,lastmodified 1,johns, 2009-01-01 1,johns, 2009-02-01 1,johns, 2009-07-01 2,andrews,2009-05-05 2,andrews,2009-04-04 I want to g...

Variables in a Context variable

Hi, I have a table and I would like to use a context variable to select from that table. Table Key, data 'XX', 'BLAbla' 'yy', 'blaBla' 'zz', 'bLaBla' 'aa', 'lkdjfa' ..... .... .. My selection is : select * from Table where key is not in ('XX','zz'); My definition of the context variable is like Variable := '('||'''xx'''||','||'''y...

Connection Pooling on Oracle 11g w/ asp.net

What is the best way to handle connection pooling with Oracle 11g and asp.net, I'm having issues where Oracle refuses to open up any new connections for the web app after a while. This causes the request to time out and queue up.! EDIT: Is there anything that I need to do in Oracle to fine tune this? ...