oracle9i

SQL Server 2008 Linked server to Oracle 9i

I found: http://stackoverflow.com/questions/307636/how-do-you-setup-a-linked-server-to-an-oracle-database-on-sql-2000-2005 The DSN tested successfully but after using the stored procedures outlined in the article to create the linked server the 'open query' returned the following message: OLE DB provider "MSDASQL" for linked server "...

Oracle Event Count Query

My SAMPLE table has the following five columns: sample_id (PK) (NUMBER) sampled_on (DATE) received_on (DATE) completed_on (DATE) authorized_on (DATE) I would like a query with one row per hour (constrained by a given date range) and five columns: The hour YYYY-MM-DD HH24 Number of samples sampled during that hour Number of samples r...

stored procedure to transfer data from a table in one database to a table in another database in oracle

there are 2 databases A AND B. i want to transfer data from a table in A TO a table in B. i want to use cursor for this. the duplicate datas when transferring should go to a table called duplicat table. I want a stored procedure to do the above. first i need to connect database A with database B using db link. i want the complete stored ...

Altering Oracle sequence using result of expression

I have two variables MAX_TABLE_ID INTEGER; NEXT_TABLE_ID INTEGER; I'm reading values into these and then trying to alter a sequence based on them EXECUTE IMMEDIATE 'ALTER SEQUENCE NEXT_VALIDATED_TABLE_ID INCREMENT BY [MAX_TABLE_ID-NEXT_TABLE_ID]'; Bit I'm getting an "invalid number" error or a SQL command not ended error. This e...

Does this SQL statement needs to be refactored?

SELECT DISTINCT group_id , supplier_id , supplier_name , site_division_id , site_division_name FROM view_supplier_site WHERE supplier_id IN (SELECT DISTINCT supplier_id FROM view_supplier WHERE YEAR IN (2008, 2009) AND received_quantity > 0...

VBA/ADODB Run-Time Error: 3704

The following VBA subroutine will run most queries just fine. (ie: SELECT * FROM DUAL) Sub DisplayQuery(QueryString As String) Dim rs As New ADODB.Recordset Dim connStr As String connStr = _ "Provider=MSDAORA.1;" _ & "User ID=abc;Password=123;" _ & "Data Source=xxx/xxx;" out QueryString rs.Open QueryString, connStr, ...

Migrating data between 2 databases in Oracle 9i

Hi, I am new to Oracle. Since we have rewritten an earlier application , we have to migrate the data from the earlier database in Oracle 9i to a new database , also in 9i, with totally different structures. The column names and types would be totally different. We need to map the tables and columns , try to export as much data as possib...

send file in http (Upload from client store in server)

I am looking for a solution to upload multiple files from browser to server. As of now the HTML pages are written in oracle HTTP toolkit (using oracle mod_plsql on Windows NT). Can someone suggest me solution to upload files from client side and process it in server. Solutions based on HTML, Oracle HTTP, PHP are fine. Links and suggesti...

How can I know which values are numeric in oracle 9i

I have this database which contains a varchar. I want to know which records holds numeric values. I tried REGEXP_COUNT and other but I'm running on 9i and I think this is for 10g > How can I achieve this? I tried: select to_number( my_column ) from my_table But it doesn't work, because well not all of them are numeric. EDIT Ba...

delete on batch

I have a db table that has > 14M rows. If I attempt to perform: delete from table The connection hangs out. How can I delete all the rows, in "batchs" ( I guess ) so they are deleted eventually? ...

How can I tell if a Materialized View in Oracle is being used?

We have some Materialized views in our Oracle 9i database that were created a long time ago, by a guy no longer working here. Is there an easy (or any) method to determine whether Oracle is using these views to serve queries? If they aren't being used any more, we'd like to get rid of them. But we don't want to discover after the fact...

overcoming 'log file sync' by design?

Advice/suggestions needed for a bit of application design. I have an application which uses 2 tables, one is a staging table, which many separate processes write to, once a 'group' of processes has finished, another job comes along a aggregates the results together into a final table, then deletes that 'group' from the staging table. T...

Get a list of all functions and procedures in an Oracle database

I'm comparing three Oracle schemas. I want to get a list of all the functions and procedures used in each database. Is this possible via a query? (preferably including a flag as to whether they compile or not) Ideally it would be great to have a single query with a flag that states whether the function/procedure is in each schema. But ...

Hibernate > CLOB > Oracle :(

I am trying to write to an Oracle clob field a value over 4000 characters. This seams to be a common issue but non of the solutions seem to work. So I pray for help from here. Down and dirty info: Using Oracle 9.2.0.8.0 Hibernate3 implementing pojo's with annotations Tomcat 6.0.16 Oracle 10.2.x drivers C3P0 connction pool provider In...

ORA-01861: literal does not match format string

I'm pretty sure this is something really silly. Instead of spending another 10 minutes with this ( or better said, while I spend another 10 minutes with this ) I'll ask it here in parallel. What's wrong with the following statement: select to_date( '30/10/2009 18:27:35', 'DD/MM/YYY HH24:MI:SS') from dual The error message is: Err...

Close SQLDataSource Connection

I bind a SQLDataSource to a GridView using GridView.DataBind() and these queries often take a significant time to execute. What code would cancel an in-progress DataBind()? I can't seem to find any method to stop the DataBind() or even close the DB connection. Rebind Attempt: myConn.ConnectionsString = "" myConn.SelectCommand = "" ...

Function Table IN ORACLE

I've some prob with the function TABLE in ORACLE. SET SERVEROUTPUT ON SIZE 100000; DECLARE int_position NUMBER(20); TYPE T_REC_EMP IS RECORD ( nameFile VARCHAR2(200) ); R_EMP T_REC_EMP ; -- variable enregistrement de type T_REC_EMP TYPE TAB_T_REC_EMP IS TABLE OF T_REC_EMP index by binary_integer ; t_rec TAB_T_REC_EMP ; -- var...

How to manually clear the TEMPORARY TABLESPACE in oracle 9i

Hello everyone, We are currently developing an application to our company that uses Oracle 9i as the central repository. The applications we developed are .Net Applications, and we use Oracle ODAC 11g as our Data Access Library to the database. Every changes made to the database are transaction based, to ensure that there would be no "d...

How do i get records from table in pl/sql?

Hi!!! I have one table : Questionmaster. it stores DisciplineId,QuestionId,QuestionText etc... Now My Question is: I need 10 records of particular DisciplineId, 20 records for another DisciplineId and 30 records for Someother DisciplineId.... What should I do for that? How can I club all statement and get just 60(10+20+30) rows select...

How to get next and previous record from cursor?

Hi... I have a table named testtransaction which stores pervQuestionId and NextQuestionId... How to insert records in this table through cursor? there is something cursoe.getnext()...how do i implement it? My code is shown below: create or replace function store_data(disciplineid in char, NoO...