oracle

Importing ShapeFiles into Oracle XE

Hi, I'm looking to import one of the Shapefiles supplied with the Ordnance Survey Boundary-Line opensource set into Oracle XE. http://data.gov.uk/dataset/os-boundary-line Unfortunately I'm completely unsure how to go about this, despite much Googling. Anyone got any pointers or tips or a link to a guide? Cheers James ...

Return an Oracle Associative Array from a function

Does anybody know if it is possible to return an associative array as the result of an Oracle function, if so do you have any examples? I have an Oracle package which contains an associative array declaration as defined below: TYPE EVENTPARAM IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; This is then used in a stored procedure ...

Question about oracle db connection with .NET

I'm trying to connect to an oracle database with .net but i get the error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified however, when I enter add a new database connection through tools>connect to database. it works fine. even after copying the connection string which is:...

how to find all indexes and their columns for tables, views and synonyms in oracle

I jotted down the following query which will list the index name and its columns for a particular table: select b.uniqueness, a.index_name, a.table_name, a.column_name from all_ind_columns a, all_indexes b where a.index_name=b.index_name and a.table_name = upper('table_name') order by a.table_name, a.index_name, a.column_position; ...

"The provider is not compatible with the version of Oracle client"

I just put my asp .net web service on a remote host. The service accesses an oracle db on my local machine. The service worked fine when it was running on localhost but since moving to a remote hos, I get The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize() at Oracl...

Hibernate, Set keys, CompositeUserType and SQL Procedures

Hi, I am having some trouble with returning a non-empty Set into an object using Hibernate and a custom CompositeUserType key. I have a set of tables and views (simplified here): create table lang (lang_id,lang_cd); create table article (art_id,...); create table article_lang (art_id, lang_id,title,...); create view article_lang...

ORACLE SQL ROWNUM execution order

Dear expert, in Oracle SQL, there is a possible criteria called rownum. Can i confirm that rownum will be executed at last as just a limit for number of records return? or could it be executed first, before other WHERE SQL criteria (let's if we put rownum prior to the others)? ...

How to figure out which record has been deleted in an effiecient way?

Hi, I am working on an in-house ETL solution, from db1 (Oracle) to db2 (Sybase). We needs to transfer data incrementally (Change Data Capture?) into db2. I have only read access to tables, so I can't create any table or trigger in Oracle db1. The challenge I am facing is, how to detect record deletion in Oracle? The solution which I ...

rank on two dates - each date iteratively

How to query for rank over 'value' for each day in the below table? Ex: IT should list out the 'mydate', 'value', 'rank' for all values on 20th and then do a fresh rank() for all values on 21st? Thanks... create table tv (mydate,value) as select to_date('20/03/2010 00','dd/mm/yyyy HH24'),98 from dual union all select to_date('20/03/2010...

oracle function like days360 in excel

Is there any oracle functions which will return the number of days between two dates like days360 function in excel? DAYS360 : "Returns the number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations. Use this function to help compute payments if your accounting syste...

connect to oracle through socks proxy

My application (linux and windows) connects to oracle through OCI interface. Is it possible to connect to oracle through socks proxy? or some other similar proxy method? Simple ssh tunnel is not enough as I need to access multiple services (including oracle) through single port. Edit: I have tried configuring the proxy as suggested in t...

pl/sql object types "ORA-06530: Reference to uninitialized composite" error

hi, i have a type as follows: CREATE OR REPLACE TYPE tbusiness_inter_item_bag AS OBJECT ( item_id NUMBER, system_event_cd VARCHAR2 (20), CONSTRUCTOR FUNCTION tbusiness_inter_item_bag RETURN SELF AS RESULT ); CREATE OR REPLACE TYPE BODY tbusiness_inter_item_bag AS CONSTRUCTOR FUNCTION tbusiness_inter_item_ba...

internal implementation of database Queries

In my experience I have used many queries like select, order by, where clause etc.. in mysql, sql-server, oracle etc For a moment i have thought, 1)how is this internally written to implement the above queries 2) which language do they use? 3) is that programming language? if yes which language? 4)what kind of environment required t...

Hibernate Schema Validation Fails on Oracle Table Synonyms

I'm developing a Java web application that uses Hibernate (annotations-based) for persisting entities to an Oracle 11g database. The DBA created synonyms for the tables and requested that I use these synonyms instead of the physical tables. (Eg: Table "Foo" has synonym "S_Foo") If I have "hibernate.hbm2ddl.auto=validate" enabled, then ...

Best way to use PL/SQL Pacakge Cursors from Pro*C

I have a cursor defined in PL/SQL, and I am wondering what the best way to use it from Pro*C is. Normally for a cursor defined in Pro*C you would do: EXEC SQL DECLARE curs CURSOR FOR SELECT 1 FROM DUAL; EXEC SQL OPEN curs; EXEC SQL FETCH curs INTO :foo; EXEC SQL CLOSE cusr; I was hoping that the same (or similar) syntax would work for...

PL-SQL - Two statements with begin and end, run fine seperately but not together?

Hi all, Just wondering if anyone can help with this, I have two PLSQL statements for altering tables (adding extra fields) and they are as follows: -- Make GC_NAB field for Next Action By Dropdown begin if 'VARCHAR2' = 'NUMBER' and length('VARCHAR2')>0 and length('')>0 then execute immediate 'alter table "SERVICEMAIL6"."ETD_GUESTCAR...

Accessing inter-schema tables and relations in hibernate

There is a typical situation being faced where different tables are scattered through different schemas in Oracle database and they are related to each other (encompassing all different types of relations). How can they be represented in Hibernate using annotations as when a sessionfactory handle is created for one schema, tables in tha...

App losing db connection

I'm having a weird issue with an old Delphi app losing it's database connection. Actually, I think it's losing something else that then makes the connection either drop or be unusable. The app is written in Delphi 6 and uses the Direct Oracle Access component (v4.0.7.1) to connect to an Oracle 9i database. The app runs as a service an...

how to implement multivalued attribute in oracle ?

I want to store more than one Email IDs in the Email id column of a table, as a multivalued attribute. How can I do this in oracle? ...

oracle replace comma with period and period with comma

How to change comma with period and period with comma e.g. 1,50,000.25 to 1.50.000,25 in oracle ...