Showing posts with the label oracle

[FIXED] Oracle SQL: Average amount for past few months

Issue I am trying to find the average amount for the recent 4 months for each customer. Below is th…

[FIXED] How to pass mutiple variables to the cx_Oracle query code

Issue When I choosed python--cx_Oracle to query data, I can get correct query result when the varia…

[FIXED] %TYPE for collection's element type

Issue We can use record_name.field% type to reference a field's type... But if field is a col…

[FIXED] SQL query to check the last day of the month is not a sunday

Issue I want to calculate the last day of the month, but if this date is a sunday then the below qu…

[FIXED] SQL Query to enclose column with quotes when it has |

Issue A table has the following details Course_Number Description 10 …

[FIXED] What user privilege is required by a user to be able to run a GRANT sql command in Oracle

Issue I created a user "UserA" and granted it Create session, user, tablespace privileges…

[FIXED] Oracle SQL Loader won't load data while INSERT can (date column, ORA-01858)

Issue I have a simple table CREATE TABLE MYTABLE ( MYDATE DATE, ID NUMBER ) M…

[FIXED] Freezing/hanging when executing Oracle DB PL/SQL procedure in Python

Issue Hello I created a PLSQL procedure to update or insert quantity in inventory table based on pr…

[FIXED] Generate a random date in Oracle with DBMS_RANDOM

Issue I have this anonymous block: DECLARE V_DATA DATE; BEGIN V_DATA := '01-GEN-2000&…

[FIXED] Error (ORA-00923: FROM keyword not found where expected)

Issue select country_olympic_name, SUM(part_gold) as 'Number of Gold Medals&#…

[FIXED] Using a CTE to update in Oracle

Issue For logistic reasons, I want to set a value in a CTE to use in an UPDATE statement. Here is …

[FIXED] Oracle chr() diferent returns from SQL engine versus PL/SQL engine, why?

Issue Same function, same argument, different outputs: set serveroutput on; declare n number :…

[FIXED] Converts a query which uses exists/not exists to a three table join

Issue I am working on a problem statement where I need to retain records based on a logic which is …

[FIXED] How to add sequence number for each element in a group using a SQL query without temp tables

Issue My question is quite similar to the one posted in this link - How

[FIXED] Hibernate Criteria.setMaxResults() fails on Oracle 11g

Issue When using hibernate to retrieve data from Oracle 11g DB using either org.hibernate.dialect.O…

[FIXED] Create a unique index when column=value

Issue i have a table Decision : id, id_request, id_decision, comment, date . a request can be sent…

[FIXED] Cannot set up Oracle bucket for django static files storage

Issue I've been trying to set my bucket as django static file storage, but I keep getting this …

[FIXED] Multiply columns and then sum rows: Oracle SQL

Issue I'm trying to make a query in Oracle SQL Developer that must show the customer who has sp…

[FIXED] Update column value of a table when the value of another table changes

Issue I have 3 tables ( Inventory , OrderMaster , OrderDetail ). In the table Inventory I have ID_…

[FIXED] How to perform an Asynchronous Integration in Oracle Integration Cloud (OIC)

Issue There's the need to create an asynchronous integration between two systems, using OIC. Le…