Tagged Questions
0
votes
1answer
11 views
Oracle PL/SQL Error ORA-06512 and ORA-00911 giving me issues
I have the following PL/SQL Procedure:
create or replace
PROCEDURE DboOpdracht2(
table_name_in IN VARCHAR2,
amount_rows_in IN NUMBER)
IS
insert_query VARCHAR2 (2000);
--cursors voor tabel ...
0
votes
3answers
36 views
How to using Left Outer Join or Right Outer Join in Oracle 11g
I have a query using "=" in where clause, but it is long time to execute when many datas. How to use the Left Outer Join or Right Outer Join or something like that to increase performance
This is ...
0
votes
2answers
24 views
Select columns based on a CSV in another table
I have a table which contains the following:
Table1
ID Range Rate
1 A,B,C,D,E,F 1.2
2 A,B,C 3.1
and another table:
Table2
ID A B C D E F G H J K
1 1 2 1 3 4 2 4 5 8 1
2 ...
2
votes
2answers
53 views
PL/SQL: SELECT INTO raises ORA-00947
I'm using Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
I've created an object type:
SQL> create or replace type TestObject as Object (
2 id INTEGER,
3 name ...
-1
votes
1answer
52 views
Creating a function to check if two items exists in the table together
I am currently working on this code to check the status of an employee and I want to create a new login function:
create or replace FUNCTION get_status_by_employee_id
(
p_employee_id NUMBER
...
0
votes
1answer
31 views
oracle associative array exists in case statement results in compilation failure
This is a hypothetical example. The actual problem involves updating various columns based on values, if they exist in the associative array. The following throws ORA-06550 and ORA-01747. Please help ...
0
votes
3answers
58 views
Creating a Procedure in PL/SQL to display all information from a table
As the title states, I am trying to create a procedure to display all information about employees(Employee_ID, NAME, EMAIL_ADDRESS, HIRE_DATE, and UPDATE_DATE). The catch is that if the employee_id ...
0
votes
2answers
35 views
Join Supplier name and Supplier number using two queries
I have a two queries.
select a.supplier_nbr
from co_global_duns_xref_t a,
co_global_duns_t b
where
a.global_duns_nbr=b.global_duns_nbr(+)
and
select ...
0
votes
0answers
17 views
PL/SQL How to forcively flush the undo log/tablespace of UNDOTBS1 [migrated]
I'm looking for a way to flush the undo logs so that the UNDOTBS1 doesn't give me an error saying that my tablespace isn't large enough. I tried using a commit, but without success, it still gives me ...
0
votes
2answers
36 views
Optimizing a union sql query
I am doing a UNION between 3 tables. To put you in the picture, one table is considered as the main table and the 2 other tables are considered as sub tables. The 2 sub tables have always the same ...
0
votes
1answer
49 views
Oracle Function In Package Fails as Part of Select
When I call my function from my package like the following, it works. It is a bit complex but there are a lot of conditional variable.
resultval := TG_PKG_ENTITY_TOTAL.user_entity_total('0012345678',
...
1
vote
3answers
50 views
Dynamic Update query in procedure
I'm trying to create an Dynamic UPDATE query for a column listed out in all tables in DB. However, the query is failing with the error Code: -942 Message: ORA-00942: table or view does not exist ...
0
votes
3answers
40 views
Function format number
For oracle,
Can anyone fixes the function below to let it works with "a number (10,2)"? Just this condition only.
Here I come with the function..
CREATE OR REPLACE FUNCTION Fmt_num(N1 in NUMBER)
...
0
votes
1answer
29 views
Dynamic Sql: Create array from records using array of column names
I am pulling all of the column_names (cname1) from a crosstab table that I made. There are thousands of these column names so I combined them into an array. I then want to use dynamic sql (or whatever ...
0
votes
3answers
50 views
Returning the results of hundreds of columns into an array
I have a table with hundreds of columns. I need to take the result of every column (except one) and put them into an array and bring back the rest of the results. Here it was the table looks like:
ID ...