Tagged Questions
Oracle Server is an Object-relational Database Management System (ORDBMS) created by Oracle Corporation. Do NOT use this tag for other products owned by Oracle, such as Java and MySQL.
0
votes
1answer
8 views
Oracle - select statement to rollup multiple tables within a time frame
I have 3 Oracle tables for a project that link a demo Transaction table to Transaction_Customer and Transaction_Employee as shown below. Each transaction can have multiple customers involved and many ...
0
votes
1answer
11 views
Oracle SQL “FROM keyword not found where expected”
I keep getting the "FROM keyword not found where expected" error pointing at line 1 when I try to run the following statement:
SELECT Physician.Last_Name, Physician.First_Name, (SELECT COUNT (...
0
votes
1answer
16 views
Using Excel to run a statement many times
I am trying to use excel to update a list of part numbers in my database:
UPDATE
stock s
SET
s.STC_AUTO_KEY = 2
WHERE s.WHS_AUTO_KEY = 2 AND
EXISTS(
SELECT
p.PNM_AUTO_KEY
FROM
...
0
votes
0answers
9 views
what happens if we create stored procedure without synonym?
I have created a stored procedure without having synonym , because i don't know the importance of synonym. In my project we use two databases for development and another just to create synonyms.I had ...
0
votes
0answers
15 views
Oracle SQL AS replacement?
Through some research I've come to realize that Oracle SQL does not support AS and thus, my statement below results in "missing keyword"
SELECT IP.Company, IP.Copay, P1.Num_Patients
FROM ...
0
votes
1answer
12 views
Joining two tables and displaying the count of records based on country in Northwind schema
In oracle, i have two tables - Supplier and customer. Each has a field name 'Country'
I have to find the total number of suppliers and customers by Country and then add these two counts to display as ...
0
votes
1answer
10 views
How to fetch data in Oracle database and use it in Selenium WebDriver
I have two test cases.
First Test Case: Create a user. Once the user is created, the info gets stored in the database.(i.e account number, username, password, first name, last name etc)
Second ...
0
votes
0answers
9 views
Can multiple fields (more than 50) be assigned to a single Oracle APEX g_fxx array?
I have an APEX report that will need to have more than 50 columns in each row that a user can enter data into. I would like to pass that data to a pl/sql procedure, but there are only 50 APEX array ...
0
votes
0answers
21 views
GROUP BY conditionally in Oracle
I am trying to figure out how I can conditionally group by in this case:
My table has the following:
Traveler_Code|Traveler_Name|Traveler_Gender|Traveler_state|Traveler_Class|Train_No|Flight_No|...
0
votes
0answers
8 views
Oracle view with Unions, with entity framework
I have an oracle view that I need to add to Entity Framework in my project. The problem is that Entity Framework says that my primary key shouldn't be nullable:
CREATE OR REPLACE VIEW VWGETNOTE AS ...
1
vote
2answers
21 views
Using TO_DATE() with AM/PM Formatting
I am trying to select some dates from a table where the format of the dates is like this:
14-APR-14 10.35.00.0000000000 AM
01-NOV-16 02.43.00.0000000000 PM
Note that the dates can be either AM or PM,...
0
votes
0answers
19 views
Unable to fetch data in Eclipse
I'm a beginner and trying to learn selenium webdriver. I have connected the database in Eclipse, but when I try to execute the query it gives me the error
Oracle JDBC driver loaded ok.
DB Connected ...
0
votes
0answers
7 views
Oracle 12c CentOS PDB Connection from client
I have an installation of Oracle 12c on a Windows Server 2012 machine. it has a single PDB (PDBORCL). I have created a user in this PDB and can connect to it from a client machine via SQL Developer ...
0
votes
0answers
14 views
Time Constraint Trigger on Oracle SQL
I'm a total noob on SQL, but I'm doing a project where I have a database of a Football League and I want to create a constraint trigger that is: a referee can only be associated to one match at a ...
0
votes
2answers
17 views
Oracle: show records that don't meet a condition
I want to get a list of all cars that have not failed an inspection ever, but I have no idea how. The best I have at the moment is a list of cars that have passed.
SELECT c.CAR_MAKE, c.CAR_MODEL, c....
1
vote
1answer
18 views
Oracle SQL: Show entries from component tables once apiece
My objective is produce a dataset that shows a boatload of data from, in total, just shy of 50 tables, all in the same Oracle SQL database schema. Each table except the first consists of, as far as ...
0
votes
0answers
13 views
Detect Barcode Scanner on oracle apex
Detect Barcode Scanner - using Javascript
https://apex.oracle.com/pls/apex/f?p=10355:32:21497051930136:::::
user : demo
password : demo
$(document).ready(function() {
var pressed = false;
...
2
votes
1answer
25 views
Finding records that exist in one table but not another (matching) table with no primary key
I'm looking at changing a data load that is done using an external tool to generate a flat files based on several joins using that tool, and then loaded into a table using SQL*Loader.
I'd like to ...
0
votes
0answers
23 views
PL/SQL batch/cursor approach
Here’s my situation. There’s an imported table that has about a million records. I need to perform a lot of updates, inserts, etc. to this and other tables based on what is in each record.
I could do ...
0
votes
0answers
14 views
Tomcat and Oracle Query Level Parallel Hint (Thread Bottleneck)
We have a Tomcat 7 server using an Oracle 11G database. We have a cap of Oracle database connections in the connection pool from Tomcat.
We run a bunch of queries in parallel against the database, ...
1
vote
1answer
35 views
Can this query be written - what am I missing?
I am feeling stupid today but I have a query that I want to write but I am sensing that it might be out of my reach.
I will try to simplify the problem just for the sake of simplicity.
I have a ...
1
vote
1answer
20 views
Looping through cursor and passing record to procedure
I'm parsing through xml and i need to update table record in autonomous transaction. For this i need to pass cursor record to procedure, how can i do that? f.e.
procedure process_message(
p_xml in ...
0
votes
0answers
9 views
Oracle xe 11g not running
I need some help,I have installed the oracle xe 11g (64bit) but when I'm trying to run "Get Started with Oracle xe" an error appear.
Error:"Windows cant find 'http://127.0.0.1:%HTTPPORT%/apex/f?p=...
0
votes
3answers
26 views
Extracting characters from varchar strung in Oracle database
In one of the tables in my database, a column having details as nvarchar(50) is having values as abc$xyz. I want to extract everything after $ symbol in this column into another table.
0
votes
1answer
19 views
Oracle multi-hierarchical query
I have several comma seperated lists (A,B,..) in different scopes (102,103,...):
SCOPE_ID LIST_NAME LIST_OF_NODES
102 list_A 02086,02087,02089,02131,02210,02211
102 list_B 00004,...
0
votes
3answers
19 views
Oracle get 1hr back date
In Oracle, I want to get specific intervals.
Consider, sysdate is 10-dec-2016 10:15:23 (dd-mon-yyyy hh24:mi:ss). I want to get a date period like 10-dec-2016 09:00:00 to 10-dec-2016 10:00:00
How to ...
1
vote
0answers
14 views
java.lang.ClassCastException: c3p0 Connection cannot be cast to oracle.jdbc.OracleConnection? [duplicate]
I am trying to create an Oracle Array to pass to a Stored Procedure using an existing Java Array and the Java SQL connection class.
When I do so I get the following error:
java.lang....
0
votes
0answers
14 views
Can Oracle create the same tablespace from Instance A on Instance B?
Good day. I'm relative new to the Oracle world, we have a client that have 3 Services running and 1 Instance per Service, the problem that we have it's that the client wants to create a tablespace ...
-1
votes
2answers
8 views
How to use a custom Oracle sequence for Django Model PK?
I'am integrating Django with a table inside an existing Oracle database, which has a sequence already created and its PK (Numeric) defined. What I want to achieve is to be able to create new rows for ...
0
votes
0answers
5 views
How to show Oracle spatial objects bigger in sql developer 3.2.20?
I have put ten polygons at my oracle spatial table. The coordinates are geographical coordinates. The distances are arbitrarily large(but not more than 500-2000 meters). When I run the query and try ...
-2
votes
2answers
47 views
SQL how to update the middle characters in a string
Got a table with a field ID and Id name,
I need to update the 6 middle characters of the string in ID name for whole table.
eg: Test1234567890T
To output as: Test1234XXXXXXT
Which command to use? ...
0
votes
3answers
38 views
How to get monthly periods between a date range in Oracle PL/SQL
I have say, start and end date as "6/11/1996" and "3/1/2002" in "mm/dd/yyyy" format respectively.
I need to get all the monthly periods as given below.
Start Date End Date
6/11/1996 - 6/30/...
0
votes
2answers
48 views
Comparing the days difference between 2 dates in oracle
In my where clause of the query I need to check if difference between 2 days is > 7 days. I tried the following and also tried datediff, dateadd, trunc, tochar but get different errors each time.
Any ...
0
votes
1answer
16 views
Subtypes (inner entities) in Oracle SQL Developer Data Modeler
How to create subtypes in logical model using user interface in Oracle SQL Data Modeler? I have one entity which is "VEHICLE" with atributes such as: date of production etc, and I'd like to add two ...
0
votes
1answer
31 views
ORACLE: How to insert into temp table, while using dynamic sql
I am using a few temp tables in Oracle to store some data, which is needed later in the function. To determine the data I need to store in the table, I am using a dynamic sql statement (using ...
0
votes
2answers
21 views
Set the hours part of a timestamp to a fixed value
I have a table with a TIMESTAMP column named request_date.
I want to select the value of this column, but with the following condition: if the time is after 19:00:00, then I should select 08:00:00 on ...
0
votes
2answers
37 views
convert oracle NUMBER to Timestamp
I have a table with a column in oracle where the column has a
datatype of NUMBER(10,0).
In this column some one has stored a timestamp
data.(Eg.3613470611,3613470666 etc..). I need to make a ...
4
votes
1answer
46 views
Oracle 12c Inline View Evaluation
A long time ago in a database far, far away a developer wrote a query in which he/she was reliant on the order in which predicates were written.
For example,
select x
from a, b
where NOT ...
0
votes
1answer
22 views
How to convert Java List into an Oracle ARRAY to enter as a param in an Oracle Stored procedure? [duplicate]
I have the following list of Person Objects:
List<Person> persons;
The Person object is as follows:
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class Person
{
@XmlElement
...
0
votes
0answers
7 views
SpagoBI Dataset & Database connecction time is very high
I am using SpagoBI 5.1 and database is Oracle 11g. Both the server i.e SpagoBI & Oracle are on the same LAN.
LAN Bandwidth is 1GBPS to 10GBPS
Both of my server config is high.
With 64GB RAM &...
0
votes
1answer
20 views
'Invalid input values for pname' during table statistics gathering?
When I'm trying to gather table statistics using GATHER_TABLE_STATS procedure, I'm getting the following error:
ORA-20001: Invalid input values for pname
ORA-06512: at "SYS.DBMS_STATS", line 31513
...
0
votes
0answers
23 views
oracle function return array of varchars, in c#
I've to use an oracle function that returns an array of strings in a c# webapi. I don't realy have an idea on how to do this. I've started with the following code:
using (var cmd = _connection....
0
votes
0answers
23 views
Is JPA's @TableGenerator “gapless”
I need to implement "gapless" id. I have been looking around for some solution with table stored last value. I have been wondering if @TableGenerator can be of some help. I am unable to find out how ...
-1
votes
1answer
42 views
Design strategy for a database/Application [on hold]
Note sure if the question will be accepted on this platform (if not then please advise the proper platform)
Edit: Changed the approach from 'One Database per project' to 'One schema for each project'
...
0
votes
0answers
29 views
Extending admin user profile in Django
I want to store database users in admin page with admin authentications. For this aim, I need to modify UserAdmin fields for storing more columns. But I am receiving below error:
DatabaseError at /...
0
votes
2answers
39 views
How to use multiple cursor in stored procedure for merge query?
I'm trying to insert data in a table from procedure, from below code it
is inserting one row at a time even though more rows are available from
the location I'm picking data. Please help me to ...
0
votes
1answer
27 views
Oracle error: Invalid Identifier
I am trying to access and update Oracle database with python. Below is my code:
import cx_Oracle
import pandas as pd
import datetime
import numpy
import math
#import pandasql
conn_str = 'sahil/sahil@...
0
votes
0answers
19 views
Can I read a column value from out sys_refcursor with in the same Oracle stored procedure
I have a stored procedure that selects some of the column values from multiple tables(inner join) and returns a sys_refcursor. Now i got a new requirement where I need to get one of the column values ...
0
votes
2answers
35 views
Prevent Insert Trigger
How can I get this trigger to prevent the insert where the advance is not greater than 0 or less than 100? Thanks.
DROP TRIGGER CheckAdvance;
CREATE OR REPLACE TRIGGER CheckAdvance
BEFORE INSERT OR ...
1
vote
2answers
41 views
Compare the data in two tables, one is Oracle, the other is SQL Server
I have two databases, one is Oracle 11g and the other is in Sql Server 2012. There is a table in the Oracle database that contains a column called BASE_ID. This is comprised of work order numbers.
...