Questions tagged [oracle]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
44 views

Trigger to update vertices table

I have an Oracle 18c table that has an SDO_GEOEMTRY column. ...
0
votes
1answer
26 views

Shortening Oracle SQL containing several unions

I believe the provided code can be rewritten shorter. Now one block is basically copy-pasted. In reality I have 6 such blocks. This would be the data: ...
3
votes
3answers
136 views

Select non-task workorders, but include the costs of the tasks

IBM's Maximo Asset Management platform has a WORKORDER table (265 columns). Details: The WORKORDER table contains two different kinds of rows: WO records (istask = 0) Task records (istask = 1). The ...
1
vote
0answers
53 views

Find junk values in all tables and columns

Find junk values in all tables and columns: Loop through all tables in a schema (Oracle 18c) Loop through each number and text column If columns have values that are junk, then add a statistic/record ...
1
vote
1answer
42 views

capturing counts of open items between dates

DB version is: Oracle 12c. Restricted to the use of inline PL/SQL. The end goal here is to get a count of open items by day, inclusive of created date, exclusive of the end date. The data ...
1
vote
1answer
30 views

Clubbing three queries that return mutually exclusive records

There is a table in Oracle database with the following data ...
4
votes
3answers
2k views

Updating a huge hashmap from a resultset

I am using Java 7 Problem: I need to retrieve records from a database table based on a condition, orig_setting = 1. This query could return ~1000 records. Parameters from 1-7 of the Params object are ...
2
votes
3answers
271 views

Calculate the midpoint of a polyline

I have polylines in a GIS database. The polylines are stored using a user-defined type called ST_GEOMETRY. ST_GEOMETRY has lots of spatial functions. However, it does not have a polyline midpoint ...
0
votes
0answers
41 views

Redundant query?

I have the following query: ...
2
votes
1answer
105 views

Seek to get acceptable performance of SQL request (SOLVED)

Goal: I want to output all non-standard FK constraints from clients DB, versus our "standard" DB (which contains, by default, 2,631 FK). Trial: I wrote this code: ...
2
votes
2answers
246 views

Build WHERE clause for search conditions [closed]

Here is a set of classes that are used to build where clause for SQL Server and Oracle for different field types e.g. text, <...
2
votes
1answer
286 views

Generating and storing a unique salt in Oracle database using Java

This is my account table: ...
0
votes
2answers
30 views

Bulkloading xml's into Oracle table

Intro We have some old(in my eyes) software at the place I work at the moment, Some stuff needs to be done manually, for instance we need to insert a XML file into a Oracle table, which will trigger......
2
votes
1answer
44 views

String manipulation over 2 tables in database to application

I have the following function in the database to do string manipulation: ...
2
votes
0answers
3k views

Using Entity Framework to Call an Oracle Stored Procedure with Multiple Cursors

I wrote the following code to use Entity Framework 6 and Managed Oracle Providers to call an Oracle stored procedure that returns multiple cursors. Would like some input about the code I used to ...
0
votes
2answers
99 views

SQL Statement with a Select Statement Inside a Where Clause

Is there a more efficient way to write the following PLSQL statement? It seems inefficient to me to have the SQL statement nested inside the where clause. ...
1
vote
1answer
134 views

Oracle SQL Code - Multiple Joins used

I'm currently working on some SQL code within Oracle Fusion BIP but it's not very optimised as it's using multiple LEFT,RIGHT and FULL OUTER joins to link tables together. Unfortunately this is ...
1
vote
2answers
44 views

Query for customer quotes by date range

I have a table (Oracle): customer_quote ------ int id int part_key (fk) int condition_code (fk) number unit_price int qty_quoted date entry_date With a query ...
1
vote
2answers
8k views

Calling an Oracle Stored Procedure with C# Code

I came across this code in a project I inherited. I am curious if all the nested using statements make sense to anyone else. Also, wondering if this code could not be written in a better/leaner way? <...
2
votes
1answer
190 views

Database model for a hotel

I have to create a Hotel database according to these requirements: information about guests should be found, information about rooms divided into categories, reservations (ordered by a type of a room ...
4
votes
0answers
106 views

Program to pull data from an Oracle database

EDIT: I should clarify that this program currently works as intended (not looking for help making it work); I just want to understand what I could have done better in terms of design. I work on a ...
1
vote
0answers
64 views

Determining how many tabs to create and how many lines per each tab

I wrote this PL/SQL code for Oracle Apex, works perfectly. At the beginning I had more than 200 lines for the same code. I’m new and I’m still learning. After searching on multiple websites I found ...
0
votes
1answer
84 views

Refactoring the legacy code which is using '§' char in the code

I have a legacy code (might be 20 years old) as shown below. Where they are using the non ASCII '§' char in the code. First they are preparing a ...
1
vote
4answers
79 views

Select multiple count queries in single query

I currently have 6 very similar queries that I'm trying to increase performance on by making them all subqueries in 1 query. I'm not sure what is better performance wise, keeping them 6 separate ...
1
vote
1answer
86 views

File names to database table

I have files in subfolders on a network drive. I want to create a list of files, and insert that list into an Oracle table. I can successfully iterate through the files in the subfolders and do the ...
0
votes
1answer
1k views

Exception handling and releasing of OracleDB connection

Before I start implementing several REST API service endpoints, I'd like to make sure that I'm not doing it totally wrong. ...
3
votes
1answer
1k views

Update pass-through query from a form (an alternative to stored procedures)

I've adapted a script from the book Microsoft Access Developer's Guide to SQL Server that I use to update a pass-through query via a form. One way to pass parameters to a pass-through query is to ...
2
votes
0answers
305 views

Calling PL/SQL functions using JDBC in a Spring clone

I started to modify some old code and ended up creating a sort of spring jdbc framework. I know just the most popular design pattern, so I was wondering if my design was good. For example, to call ...
1
vote
0answers
70 views

Given table of values, find rows that match a predicate

I'm working on the following problem: We have a Row Java type that roughly represents that of database table row (meaning it has a set of fields and is identified ...
0
votes
0answers
235 views

Using a boolean column as an index to process rows vs partitions or other mechanisms

I receive files from many sources (SFTP, REST, SOAP, etc.) in many formats (CSV, JSON, XML, etc.) and then process them at a later time in a ...
3
votes
2answers
91 views

Employee Compensations Query

I have a pretty straightforward query that I am essentially hard-coding. I have a table with 3 keys and a description field. The first key has to do with the type of compensation for an employee (<...
6
votes
4answers
976 views

Simple Oracle connection using JDBC

I'm trying to continue the learning process in Java, and I've made a simple yet useful class which will allow me to retrieve the data inside a table from an Oracle DB, using JDBC. What I'm especially ...
5
votes
2answers
78 views

Script for updating an Oracle database

I have the following piece of Perl script for updating an Oracle database. It's working perfectly fine, but I want to know how I can simplify this script. ...
4
votes
1answer
171 views

Identify the installed Oracle driver, Scan the .NET GAC for Incompatible Assemblies

My day job is supporting a piece of software that just started using the DevArt Oracle drivers, which utilize the Oracle.DataAccess .NET drivers. However, the ...
1
vote
1answer
34 views

Check user changed his password recently or not in specific period

I am working on Oracle SQL. What I am trying to do is: Query a record with ID If the record does not exists use user input value If the record exists, compare ...
1
vote
1answer
110 views

Create multi-dim array from cursor

I'm executing a cursor. I have cut off the code how the procedure is called and executed. This part is efficient. At last I have a small cursor. I'm calling the procedure, which returns this cursor ...
1
vote
1answer
3k views

Oracle trigger to keep a copy of deleted records in another table

I am using this trigger to keep a copy of the deleted record from table Orders_Details in table Orders_Details_Deleted. I am ...
3
votes
1answer
5k views

Oracle SQL multiple count query

There is an Employee table with data like: ...
8
votes
1answer
210 views

Extract data from a DBMS, create a CSV dump and transfer it to an FTP server

First of all, my code does work as expected at least to some extent. The intention of the program is to extract data from a DBMS in order to create a CSV dump and transfer it to an FTP server. My two ...
1
vote
1answer
122 views

Convert MS SQL datetime to Oracle varchar(32) interval

I have a query against an MS SQL database that takes the resulting dataset and stores it in an Oracle database table which then gets joined to another Oracle table using the column ...
4
votes
1answer
135 views

Oracle Database Communication/Operation

I am creating an application that will move specific data from one Oracle database and moving it to a MySQL database. I created this class to help keep myself organized and this class holds all of the ...
4
votes
1answer
114 views

Highest andLowest in PLSQL

I have made a procedure to display the highest and the lowest popular Items for a particular time of a given date. The procedure works with no errors or exceptions ...
2
votes
1answer
61 views

Generating business summary stats in SQL dynamically, based on an inputted date

I have the following Oracle SQL query to generate some system-stats. I am interested in making it a more efficient and readable query. ...
0
votes
2answers
103 views

Checking whether a grade combination exists

Below function checks if a grade exists ...
1
vote
1answer
783 views

Oracle query to split 1 row into two where conditions are applicable

The scenario question: "I'm having difficulties with splitting a single row into two individual ones." My test schema is: ...
8
votes
2answers
222 views

Checking for Duplicates, Except

I have a query that returns records that have duplicate names within a given DBSTATUS. I used to do this with a direct connection to the remote oracle database ...
3
votes
1answer
100 views

Refactor (DRY, KISS) QueryStatus event for VS Addin

I have complex logic in QueryStatus event (CommandTarget) for a VS Addin (VS 2010). I'm a newbie using C#. I would like elegant, easily maintainable code that follows DRY and KISS principles. Maybe ...
3
votes
3answers
477 views

Counting business days in a month, ignoring holidays

This table simply contains date information. I went ahead and used what I currently have since this is a one-time operation. However, since I only recently started working with Oracle, I would like to ...
6
votes
2answers
126 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 ...
8
votes
2answers
13k 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 ...