Oracle is a relational DBMS (Database Management System) created by Oracle Corporation.

learn more… | top users | synonyms

6
votes
1answer
40 views

Trying to avoid a double full scan with aggregates in query

I have a statistics query I'm trying to run against the below table: ...
1
vote
1answer
55 views

Refactor Oracle Entity Framework lambda query

I had a ugly problem and wrote an ugly query. Query creates a cache that is used to get person id when I have {full_name, id_code?, birth_date?}. By question mark I mean that it is perfectly valid ...
1
vote
1answer
54 views

Slow delete query on table with composite index

after profiling my application, it turns out that a single method is taking 3 minutes to run, which is about a third of the total runtime. The method deletes approx. 400.000 rows from each table ...
1
vote
3answers
162 views

Making a new column and setting default values equal to the COUNT of a certain condition in SQL? [closed]

I have 2 tables. (table1, table2) Now, I would like to do something along the lines of: ...
5
votes
1answer
70 views

Tuning a query for performance

I am running this query and it takes several minutes to complete. How can I tune it (unfortunately I don't have the privileges to run an SQL tuning advisor)? ...
5
votes
1answer
188 views

Length limited listagg for muliple m:n relations in a view

I have a few views that all follow the same pattern. They select a primary key from some main table and then a few semicolon seperated strings of captions of related rows over many-to-many relations. ...
4
votes
2answers
126 views

C# with Oracle ODP.NET

...
1
vote
1answer
54 views

SQL double nested query

This query produces the results I want. Is there a less wordy or more effective way to write this query? ...
10
votes
2answers
126 views

Comparing client lists with Cross Joins

I've written a query to compare the clients in our database with the people in a list that I've received. It needs to check if anyone from the list is one of our clients. I've created a temporary ...
4
votes
1answer
927 views

Creating a reusable C#.NET Oracle Query Builder - Returning Dictionary for custom format

Disclaimer My first post to code review, and I'm a fairly new C#.NET developer. Feel free to not be gentle so I can move forward. I hope this post meets the requirements set forth o.O Also is ...
4
votes
2answers
569 views

C# with Oracle ODP.NET for Review

What can be improved im my code: ...
2
votes
1answer
70 views

for loop vs table cast

I've created a sample table in Oracle 11.2.0.1.0: ...
3
votes
2answers
59 views

Oracle nested query

Essentially I'm attempting to select the top read (based on read_date), and check if it has a ...
1
vote
1answer
73 views
3
votes
1answer
163 views

Getting list from oracle database and storing it in an object

I have two admin groups - VCS, and VPN. For each group, I need to get the list of all the people in that group, along with their IDs. What is the best way to do this? I have the below code as of now. ...
-1
votes
1answer
56 views

Trouble with basic SQL query [closed]

I've been having a lot of trouble with the following question: List the yearly abnormal rate for each type of medical tests for 2000 - 2004 inclusive. An abnormal rate for a test type in a given ...
8
votes
1answer
426 views

Compare Oracle Table with SQL Server Table and Update/Insert

Below is the current code which is used to update/insert records from Oracle view to SQL Server table using Dapper. There is not a field to check last record updated date in the oracle view so I have ...
1
vote
2answers
237 views

Efficient way to remove duplicate records

Is there more efficient way remove duplicate records? ...
3
votes
1answer
95 views

XML schema for Database Unit Tests

I am attempting to develop an XML schema (XSD) to represent a set of unit tests for some code. (Specifically, I am testing Oracle PL/SQL stored procedures.) I would like to have something that ...
3
votes
1answer
140 views

Self Join Exercise. Have I over-complicated it?

This my 3rd question on the same exercise, but by no means a duplicate. The two previous questions were posted on StackOverflow here and here. Now I'm posting my Oracle solution (below) that works. ...
1
vote
1answer
347 views

Need to improve performance while merge CSV data into database drastically. What to do?

Kindly consider below scenario, Base Functionality Reading CSV file and insert in database after replacing values with web macro. Reading values from csv @ first header information NO,NAME next to ...
0
votes
1answer
234 views

Simplify Oracle SQL Unions

I have the following SQL query I am trying to use (save/make easy future modifications to) that is essentially the same query over and over and over, UNIONed each ...
4
votes
4answers
232 views

Simplify Oracle SQL: Treat null date as 'N' and non-null date as 'Y'

This works, but nvl AND case seem redundant. Basically, if null then 'N' else 'Y. CHICKEN_HATCH_DATE is a DATE data type. ...
1
vote
2answers
245 views

How to optimize this SQL delete

I want to optimize the performance of this SQL query. If I populate this hashtable with one million keys the query will take around minute. How I can optimize this Java method for faster execution? ...
3
votes
1answer
274 views

Parsing Oracle errors with a ksh function

Some time ago I wrote a small routine to run some quick n' dirty queries (and with that I mean it is not used for large queries) against an Oracle DB, but also wanted to do it a bit easier to parse ...
3
votes
1answer
129 views

Oracle to MSSQL data migration is slow on INSERT

I wrote a method that gathers data from an Oracle server, formats and encrypts the data then inserts it into a MS SQL server. The method moves about 60000 records and takes a bit long and is a little ...
3
votes
2answers
564 views

Oracle PL/SQL decryption function breaking index?

I have a package called pkg_crypto. My select looks like this: ...
1
vote
2answers
3k views