oracle

EXPLAIN SELECT in other databases

Hi, I found EXPLAIN SELECT query very useful in MySQL because it gives information on how SQL will be executed and gives the opportunity to analyze, for e.g., missing indexes you should add in order to improve response BEFORE doing the query itself and analyzing stats. My question is: In databases like MS Sql, Firebird, Ingres, is ther...

Handle precision difference in Oracle

Hello, I have a piece of my query in Oracle that generates discrete percentile: ... PERCENTILE_DISC(0.9999) WITHIN GROUP(ORDER BY DURATION_COUNT) as PERCENTILE_9999_QTY, ... The data type of PERCENTILE_9999_QTY is Number(8) it works fine except in some cases I get: ORA-01438: value larger than specified precision allowed for th...

Is a globally partitioned index better (faster) than a non-partitioned index?

I'm interested to find out if there is a performance benefit to partitioning a numeric column that is often the target of a query. Currently I have a materialized view that contains ~50 million records. When using a regular b-tree index and searching by this numeric column I get a cost of 7 and query results in about 0.8 seconds (with no...

Call data-specific stored procedure from Oracle procedure

I have a situation where I have an Oracle procedure that is being called from at least 3 or 4 different places. I need to be able to be able to call custom-code depending on some data. The custom-code is customer-specific - so, customer A might want to do A-B-C where customer B might want to do 6-7-8 and customer C doesn't need to do a...

Indexing an Oracle IOT by non-pk fields

I have a table in SQL Server that needs its normal pk index to be replaced by a clustered index on two fields. These other fields are not part of the primary key. I need to do something similar in Oracle. As far as I know, this can be done using index-ordered tables, but my guess is these indexes are only constructed on the primary key....

Crystal Reports - Browse Data Shows Nothing

I just created a new table and filled it with data. When I run a simple select query, I can see all the data. But when I try to build a report in Crystal with this table, I get no data. It doesn't matter if I have other tables included or not, so it isn't a linking issue. If I right click a field and choose "browse data", I get nothi...

Optional Database Entities

ORIGINAL (see UPDATED QUESTION below) I am designing a new laboratory database that tests a wide variety of tests on a wide variety of sample types. The following list is my current candidate for the list of main entities to best model the laboratory work. For each entity, a 1-to-many relationship exists from that entity to the entit...

Running an SQL Script with Oracle Application Express

Greetings, I am trying to run an SQL Script uploaded using Application Express (APEX), the web based interface for Oracle DBMS. However, upon clicking the Run button, it does nothing, suspecting any javascript error, I pulled out firebug and there appears to be an error on the js. this.endLine.isPreceding is not a function http://loca...

Does CakePHP play nice with Oracle? How about other frameworks?

I'm just investigating some frameworks (CakePHP particularly) for a PHP project I'm about to start, and it must run on Oracle. A quick googling found that Cake doesn't come packaged with Oracle support, and that there is a driver someone wrote, but that was back in April 2007, so I don't know how valid the information still is. Has any...

cursor giving error

hi we are trying to execute following script we are getting errors as ERROR at line 1: ORA-20000: Unknown Exception Raised: -933 ORA-00933: SQL command not properly ended ORA-06512: at line 23 DECLARE l_cursor INTEGER; l_output VARCHAR2(20); l_rows INTEGER; l_sql VARCHAR2(1000); BEGIN ...

what is the issue with following sql query

i get error insert into dmi_user.fct_sales_summary_cmp values SELECT A.bio_id * ERROR at line 1: ORA-00936: missing expression on running following query insert into dmi_user.fct_sales_summary_cmp values SELECT A.bio_id ,decode(A.wk_units2 - B.wk_units1,0,NULL,A.wk_units2), decode(A...

Which is faster for SSIS, a View on a table or a Conditional Split?

I have an SSIS project where one of the steps involves populating a SQL Server table from an Oracle Table. The Oracle table has a column ssis_control_flag. I want to pull across all records that have this field set to 'T'. Now, I was wondering which would be the best way of doing this, and the two options as I have detailed in the qu...

Type safe binding to an Oracle Stored Procedure in C#?

We are deploying multiple projects in C# with Oracle databases behind. I would like to implement all of the database logic in Oracle stored procedures as this keeps all of the database logic in the database makes it easier to maintain when database structures change allows re-use of the stored procedures more easily across programming...

Go over all columns in tables in Oracle

This is a noobie question, most likely syntax one. But I am kinda lost... I need to go over all columns in all tables in Oracle to generate trigger script. That trigger should insert the row being updated to a log table which is nearly the same as the original table. I thought I would just go over all the columns and just concatenate st...

MVC with Microsoft and Oracle

I am curious about the strategies adopted by the two leading vendors on MVC. Whereas microsoft has currently unvieled MVC 2 and Oracle seems to have Oracle ADF which is based on Java and JSF but provides darg and drop functionality . Does this mean in the MVC race because of Oracle ADF drag and drop they are ahead of microsoft in this ?...

ADF exception JBO-27014 in an editable table with LOV column

I'm working with ADF BC 10.1.3.4, I've 2 pages, a search page that forwards to a detail page with showOneTab component. In the first tab I've an af:table (Editable) with all controls available, Add, Delete & Commit The first column contains a LOV (SelectOneChoice) for each row. The issue scenario is as follows, Search for a school, sele...

Why EO validate is called twice with wrong values?

I'm working with ADF BC 10.1.3.4 I have a page with af:table (editable) with Commit button. I've added a custom method validation on the underlying Entity Object (Attribute Validation), If wrong value inserted & commited, the validate method is called twice, and I have a duplicated error message on the UI. Also, after updating the cell t...

Using Direct Connect access to ArcGIS databases in standalone applications

Hi everybody I work in an enterprise designing, creating and maintening custom applications on the base of ESRI ArcGIS. Some customers use Direct Connect, to connect to databases stored on Oracle or MS SQLServer. I have a problem with a standalone application for several months now. I have an application, written in Delphi. One of ...

need to implement the following query in such a way that we should not have to write such a big query

we need to implement the following query in such a way that we should not have to write such a big query instead we should implement it through procedure,function or anonymous block (what ever way we can) wk_units1-105 are column names cnt_sls_dm.fct_sales_summary table name. we are comparing the data in the same table but week 2 of a....

Cursor on table type in Oracle

I have a table declaration: TYPE PERSON_TYPE AS OBJECT (ID NUMBER(38), NAME VARCHAR2(20)); TYPE PERSON_TYPE_TABLE AS TABLE OF PERSON_TYPE; Can I declare cursor which will be work with my table type in Oracle? ...