0
votes
0answers
34 views

Update table from different table

UPDATE RBI.RBI_OV_F_DETAIL A SET (BRANCH_ID, BRANCH_NUMBER) = ( SELECT PRICE_BRANCH_ID, PRICE_BRANCH FROM RSE.RSE_SO_F_ORDERS B WHERE A.SOURCE_ID = ...
0
votes
3answers
276 views

Oracle Export using EXPDP gives ORA-06512 SYS.UTL_FILE error on Windows 7

I am using Oracle 11g and want to export a table using below statement C:\>expdp SYS/sys@MYDATABASE DIRECTORY = Mydir DUMPFILE = Customer.dmp LOGFILE = Customer.log TABLES = PERSON.CUSTOMER ...
1
vote
1answer
27 views

Locating a schema that owns a role

Let's say we've logged on under the A schema. I am able to execute the following statement grant select on wph_pden to LANDING_R; However, the LANDING_R object can not be located in the schema A. ...
0
votes
1answer
223 views

What is the Difference between IN and Not IN performance wise?

I am new to database.I am having doubt that what is the difference between IN and NOT IN performance wise. When I am using IN, takes less time for the same query(Logically same query) when I use NOT ...
0
votes
1answer
384 views

ADD Column ON UPDATE TIMESTAMP

I want to alter a table to include modified and created columns. However, I am having trouble with adding the modified column. I get the following error: SQL Error: ORA-00907: missing right ...
0
votes
0answers
171 views

Alternatives for UPDATE statement Oracle 11g

I'm currently using Oracle 11g and let's say I have a table with the following columns (more or less) Table1 ID varchar(64) Status int(1) Transaction_date date tons of other columns And this ...
0
votes
0answers
450 views

How to concatenate multi row sql output

Version Information: Oracle Database 11g Release 11.1.0.7.0 - 64bit Production HP Server Automation v9.14 I am creating a report of all my HP-SA managed servers. The report includes data from ...
1
vote
2answers
121 views

Using max for each sub group does not seem to work.

I have a table that looks like this in Oracle 11g: +----------------------------------------------------------+ | ACCT_NBR | MAIL_TY | ORGA | PERS | RUN_DATE | ...
-1
votes
1answer
74 views

Problems working with decode function when there is more then one expression

I am using Oracle 11g. I have these two tables: Table acct: acctnbr || Name || Mailing address 000001 || Slater || 000002 || Baker || Alt 000003 || Parke || Table addruse: ...
2
votes
2answers
146 views

how to make a particular field into seperate columns?

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production. I have this table in the below format: No | User | Value 01 | Port | Funds 01 | Vip1 | Systems 02 | Port | Bank ...
4
votes
1answer
291 views

Negative number of rows inserted

I just ran a rather simple INSERT statement (that I think processed a lot of rows), and I got the message: -1,311,750,183 rows inserted Should I be concerned about the fact that it's negative?
0
votes
0answers
41 views

Any recommendation on tuning following query

My query has lot of select statements and unions. I think it is querying database multiple times and combining data. Is there a way we can eliminate multiple passes to the database? I would like to ...
7
votes
1answer
277 views

Designing Simple Schema for Disaggregation of Demand Forecast

I am doing a simple database design task as a training exercise where I have to come up with a basic schema design for the following case: I have a parent-child hierarchy of products (example, Raw ...
4
votes
1answer
9k views

temporary table inside procedure oracle

I'm in a situation right now. I'm migrating several procedures from Mysql 5.0 to Oracle 11g. Mysql procedures allow me to: 1. Create temporary tables 2. Insert data into temporary tables / Query these ...
2
votes
1answer
2k views

Oracle error “too many values”, must be solved with nested SELECTs

I have hit upon a "too many values" error in Oracle, when working with some intricate nested SELECTs. A simplified description of my problem, on a toy problem describing the hierarchy in a company. ...
1
vote
3answers
116 views

Query missing one date; only happened today

This should be pretty reproducible I hope. I'm on Oracle 11g. This query, which I use as part of another query, is acting strangely: SELECT TRUNC(SYSDATE - ROWNUM) DATEITEM ...
2
votes
1answer
284 views

ETA: translate Oracle SQL queries to MySQL

task: replace Oracle 11g with MySQL current setup: Oracle 11g SE One about 80 tables stored procedures, PL/SQL are in place but out of scope for this question client applications do not use a ...
1
vote
1answer
365 views

Help with getters & setters in PL/SQL

I am not a db guy, and I have a very beginner's knowledge bout PL/SQL. That being clear now the question: I have 2 tables one file level & another batch level. In a day, only 1 file_id is ...
-4
votes
1answer
3k views

primary key, foreign key relationship between the department and employee tables How do I install? (sql_developer) [closed]

EMPLOYEES TABLE COLUMN NAMES: EMPLOYEE_ID EMPLOYEE_NAME EMPLOYEE_LASTNAME JOB EMPLOYEE_BUSINESS_PHONE EMPLOYEE_GSM SALARY HIRE_DATE E_MAIL DEPARTMAN_NO NOTE:FOR THIS TABLE: EMPLOYEE_ID IS PRIMARY ...
0
votes
1answer
3k views

Oracle SQL for left outer join to rownum = 1 of another query?

Background I have a query joining many tables together, the chief of which is a workorder table. I also have a table called WOStatusHistory, which stores every status for every workorder. A diagram ...
1
vote
1answer
884 views

How do you monitor specific SQL statement of a specific user ?

We have a few standalone users here which cause high server loads for several 11.1.0.7 Oracle's. I spoke with them a few times but it seems that their queries are causing high loads and probably ...
4
votes
1answer
1k views

How to use the METHOD_OPT parameter in DBMS_STATS.gather_table_stats

Hi there I was just wondering what would be the difference between these 2 METHOD_OPT parameter settings: FOR COLUMNS SIZE 5 some_column and FOR COLUMNS some_column SIZE 5 both will create a ...
6
votes
5answers
11k views

In Oracle how do I save a sequence.nextval in a variable to be reused in multiple inserts?

I'm writing a script to populate some tables with data for testing. I would like to write something like the following but I don't know how to do it (I'm Oracle 11g) SET ENABLED_USER_ID = ...
8
votes
2answers
600 views

LNNVL Justification

LNNVL is an oracle built in function that returns TRUE for conditions evaluating to FALSE or UNKNOWN, and returns FALSE for conditions evaluating to TRUE. My question is what would be the benefit of ...