oracle10g

Can it be done with oracle analytic functions?

Hi, I need help about a query in oracle 10g, Here is my question: There is a table that stores signal statuses that come from different devices. SS1 and SS2 signals are inserted to table in random times, if one of SS1 or SS2 signal status is "up" then the result signal should be "up" if both SS1 and SS2 signal statuses are "down", th...

Subtype Supertype with Oracle Object Type Creation. Limit on the number of subtypes?

I have run into an issue when creating a object type in Oracle 10g that inherits from a supertype. We currently have many object types that inherit from this supertype and recently the compiler started throwing the following errors ORA-30745: error occured while trying to add column "SYS_NC_ROWINFO$" in table "DATA_CACHE.CACHE_ENTRIES" ...

Using the model clause to expand dates

I have several different types of data involving date range that I want to merge together, but at the same time broken down by day. So a 3 day piece of data would result in three rows: start primary_key start+1 primary_key start+2 primary_key I've been playing around using the model clause of the select statement in 10g and was l...

Oracle: Bulk collect into "table of number" gives "numeric or value error"

I've come across an example of doing this on the net which also fails on my DB (10g) but here's my version. ... TYPE prog_rec_type IS TABLE OF NUMBER INDEX BY PLS_INTEGER; prog_rec_list prog_rec_type; begin ... EXECUTE IMMEDIATE 'SELECT PROGRESS_RECID FROM ' || v_table_name || v_where BULK COLLECT INTO prog_rec_list; --ERROR FOUND...

gcc compilation leaves numerous temp files

Hi everyone, I'm using Red Hat Enterprise Linux 5.4 (it's the latest version) and using gcc 4.1.2 to compile my C project. I've noticed that after the compilation, I get numerous tp* files with 0 bytes each inside the sources folder. I'm using the following options in gcc: gcc -c -ggdb -D__linux -D__ORACLE__ -Wall -I/home/ (more -I her...

Can we use Oracle Developer Tools 11g with Visual Source Safe ?

Is it possible that i can check-in/out my Oracle database Packages using Oracle Developer Tools 11g for visual studio ? ...

Oracle 10g Float format

How can I return from float/decimal value with the following: SELECT 210 FROM DUAL ...to get: 210.00 ...instead of 210? Using pl/sql oracle 10g ...

Visualization tools for a Data mart

Hi I want to setup a simple department level data mart. The source data is in an oracle database. The target is also an oracle database. I have the data mart design ready. It is a star schema. I am looking at the various options to A) Move the data from source to target B) Visualization tools to use the data mart A) For data movement I ...

Oracle Hierarchical Query

I have table which holds a company hierarchy. It was decided to use this flat table as there is no defined number of levels in the company. The table workes great, and if you were to use cascading lists on a client it's perfect. However, I need to see a "section", and all other "sections" owned by it. Hopefully the information below will...

Problem in oracle trigger query

Can anyone please tell me what is wrong with this query? create trigger Test_trigger before insert on Test for each row begin select TestSequence.nextval into :new.id from dual; end;/ When I run this query, I get the following error: ERROR at line 1: PLS-00103: Encountered the symbol "end-of-file" when expecting one of th...

How to clear all cached items in Oracle

I'm tuning SQL queries on an Oracle database. I want to ensure that all cached items are cleared before running each query in order to prevent misleading performance results. I clear out the shared pool (to get rid of cached SQL/explain plans) and buffer cache (to get rid of cached data) by running the following commands: alter system f...

Oracle 10g timestamp importing into SQL Server as clob

We're importing an Oracle 10g database into SQL Server 2008. When using the 'SQL Server Import and Export Wizard', the Oracle fields with a datatype of 'timestamp(6)' get converted into a 'CLOB' in SQL Server. Why doesn't it get converted into a 'date' datatype? ...

trigger to update object in different tablespace

I have a table X in tablespace T1 and a table Y in tabelspace T2.(Oracle DB) I have to create a trigger in tablespace T1 that will, on the event of updating a column C in table X, update column D in table Y (tablespace T2). Because they are in different tablespaces, my first question is can this be done at all? And if yes then how it...

Scripting a distributed transaction on SQL

Hello Im using SQL Server with distributed transaction on local Oracles Linked servers, as the following : GO BEGIN DISTRIBUTED TRANSACTION; SET XACT_ABORT off; GO SELECT MAX(DEPTNO)+1, FROM [WSF08_CONTA_ORADATA_II]..[SCOTT].DEPT SET XACT_ABORT on; GO COMMIT TRANSACTION; So when I run this script I get the follows er...

NHibernate Oracle stored procedure problem

------Using VS2008, ASP.Net with C#, Oracle, NHibernate---- I have tested my stored procedure. It's working but not with NHibernate. Here are the codes: Procedure : create or replace procedure ThanaDelete (id number) as begin delete from thana_tbl where thana_code = id; end Mapping File: <?xml version="1.0" encoding="utf-8" ?> <hib...

Oracle: pivot (coalesce) some counts onto a single row?

update: what I was calling coalesce I should have been calling pivot. I'm extracting some daily usage counts from a log table. I can easily get this data one row per date/item, but I would like to pivot coalesce the columns into a single row. e.g., I have: date item-to-be-counted count-of-item 10/1 foo 23 10/1 ...

Getting ORA-00001(unique constraint violated) when COMMITing?

We're getting a ORA-00001 (unique constraint violated) in a batch job. However, the error occurs when a COMMIT is issued, not at the time the offending record is inserted. Questions: How come that the unique constraint is checked at COMMIT? (Are there some settings we can use so that the check occurs at the time of the INSERT?) How ca...

How to disable oracle cache for performance tests

I'm trying to test the utility of a new summary table for my data. So I've created two procedures to fetch the data of a certain interval, each one using a different table source. So on my C# console application I just call one or another. The problem start when I want to repeat this several times to have a good pattern of response time...

Help Optomizing Bulk Inserts into Oracle Using VB.NET

I am inserting a block of 5000 records at a time, one block right after the other. The commands are created in a seperate DLL and can call anyone of 4 different stored procedures. Is there a bulk insert method that might speed this up. Currrently it takes about 1.5 MS per record and would like to get this down to about .7 MS. Thanks,...

oracle db lock issue, commit

This is oracle 10g. If I issue an update on a table from sqlplus but do not commit, then in another session update the same row and try to commit, it just hangs until I commit the first one. I know some would argue it's the locking mechanism but the application we have does the same thing and users are being blocked. Whats the best way ...