Suppose I have a view created on a table. If I change some record on my view, the original table is also changed too. What if I join this view with an another table and change some records on this …
Tag: oracle12c
How to bind variable in string in SQL query?
I am using SQL Developer. When I want to bind value. Normally I use following syntax: but, I don’t know how to do that in string. The following query does not work. Why do I need it? Because my program runs a query in python and assigns something to bind variable: Answer Concatenate the prefix/suffix with the bind variable:
Writing plsql exception errors to DMBS_OUTPUT and FND_FILE job log
I have a MERGE/UPDATE statement. I want to add exception handling such that if the update fails for any reason, write to DBMS_output and job log. I’ve come up with something – it compiles OK, but …
How to produce a running sequence in Oracle based on report column values
I have the following sample Oracle APEX report by where the Origin ID and Origin Name are retrieved from the origin_tab(id,origin_id,origin_name) Based on these two column values, I need to generate …
Migration MYSQL to ORACLE
right now am working on database migration from MYSQL TO ORACLE. I have experience in MySQL but not in Oracle, So help me to convert the following MYSQL query to ORACLE Mysql query: SELECT MIN(id) …
SUM function consider NULL on Oracle 12c
I was trying to get the nulls on doing a SUM() function on sql and I figured out that sql now consider nulls, so if a column has a different value and a null value the sum is good calculated. For …
Oracle 12 SQL – ORA-00933, ORA-0923, ORA-00979 What am I doing wrong?
I am currently facing a bit of a wall, I am attempting to take information from two different tables, have them displayed side by side with the information recording by count. One being the total …
Sampling a large number of rows from a table
I want to extract a roughly 5 million row sample from a table that will contain somewhere between 10 million and 20 million rows. Due to the large number of rows, efficiency is key. As such, I am trying to avoid sorting the rows where possible, hence why I am avoiding the dbms_random.value solution that I have seen in similar
(SQL) How do I differentiate 2 columns from different tables with the same name when selecting?
I’m using an Oracle 12c SQL server. The goal is to create a view containing each company and the drugs it produces. How can I differentiate two columns with the exact same name but located in …
How to automate source control with Oracle database
I work in an Oracle instance that has hundreds of schemas and multiple developers. We have a development instance where developers can integrate their work before test or production. We want to have source control for all the DDL run in this integrated development database. Currently this is done through a product Red Gate which we run manually after we