Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
34 views

Counting business days in a month, ignoring holidays

In the past, I have worked mostly in MySQL and SQL Server. Almost everything at my current job is Oracle, though. I could have written this instantly for MySQL but I could barely google what I ...
5
votes
2answers
32 views

Out of one Oracle into another

A project that I have been working on required data to be transferred from an Oracle database into MySQL. The process I devised for that transfer involved a query (included below) on the Oracle ...
7
votes
1answer
77 views

Filter out date records which don't fall within or span a date range

I have records which have specific time spans. The need is to select records which adhere to the following three rules (read them as or conditions) concerning a ...
6
votes
1answer
45 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
121 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
62 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
237 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
81 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
399 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
201 views

C# with Oracle ODP.NET

...
1
vote
1answer
87 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
150 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
1k 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
741 views

C# with Oracle ODP.NET for Review

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

for loop vs table cast

I've created a sample table in Oracle 11.2.0.1.0: ...
3
votes
2answers
60 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
77 views
3
votes
1answer
203 views

Getting list from an 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? Could you please suggest if it ...
8
votes
1answer
489 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
297 views

Efficient way to remove duplicate records

Is there more efficient way remove duplicate records? ...
3
votes
1answer
103 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
144 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
363 views

Merging CSV data into database

Base functionality: Reading a CSV file and inserting in database after replacing values with web macro. Reading values from CSV @ first header information NO,NAME next to that, then read one by one ...
0
votes
1answer
270 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
240 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
253 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
287 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
604 views

Oracle PL/SQL decryption function breaking index?

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