SQL & PL/SQL :: SUM Product By DATE By LOCATION

Dec 14, 2011

I am trying to query a Oracle database table that contains sample records like the one below...

DATE LOCN PROD1 PROD2
09/12/2011 L1 6 2
09/12/2011 L2 3 7
10/12/2011 L1 4 1
10/12/2011 L2 3 3
11/12/2011 L1 2 2
11/12/2011 L2 2 0
12/12/2011 L1 4 1
12/12/2011 L2 5 0

I am trying to use the Oracle Sum() to get a grouping by DATE, LOCATION, SUM(PROD1+PROD2) for DATE periods 10/12/2011 and 11/12/2011. Below is the desired end result.

DATE LOC1 LOC2
10/12/2011 5 6
11/12/2011 4 2

View 1 Replies


ADVERTISEMENT

Archivelog Location In Separate Date Format

Nov 10, 2013

archive logs to be stored in its own "date formatted" separate folders.I have already configured flashrecovery area and I dont want to change it as backups are stored there.How can I achieve this without changing the flash recovery area location ? db_recovery_file_dest is set to G:log archive dest is set to F

View 8 Replies View Related

Impdp Speed Differ From Location To Location

Oct 4, 2013

We have taken export expdp backup from prod database (primary database- Data Guard).

1.) Import impdp is very slow 10GB/Hrs on staging database (Data Guard MAXIMUM AVAILBILITY)Since Server configuration, database version and configuration, operating system everything are same as production. No blocking, locking or waiting sessions

2.)import impdp is fast 90GB/Hrs on Test standalone database and this test database is running in NOARCHIVE LOG mode with oracle standard version after that no more difference.

CPU,Memory,network and disk I/O are look normal while importing on both databases.why that much difference on import.

View 1 Replies View Related

Difference Between (ocrconfig -export Location) And (ocrconfig -manualbackup Location)?

Aug 13, 2013

what is difference between "ocrconfig -export location" and "ocrconfig -manualbackup location"

View 1 Replies View Related

SQL & PL/SQL :: Use Cartesian Product?

Mar 7, 2013

When to use Cartecian product???? is there any special cases to use cartecian product?

View 2 Replies View Related

SQL & PL/SQL :: Product Of Values In The Column?

Jul 29, 2010

how to find the product of the values in the column.. assume that the column has number(2) as its data type..

as we use sum(colname) for the sum of the values in the column there s no function to find the product.

View 3 Replies View Related

SQL & PL/SQL :: Calculates Value Of Product Sold

Nov 25, 2011

Stored Procedure: Receives the MFR and PRODUCT identifying the product sold as well as the Quantity purchased by the customer.

 Calculates the value of the product sold (looks up the cost of the product in the products table and multiplies by the quantity sold)
 Returns the calculated value.

View 12 Replies View Related

PL/SQL :: Add Four More Column And Group By PRODUCT

Sep 28, 2012

I am new to PL/SQL environment.. ( USING PL/SQL Oracle)

SELECT TABLE1.PRODUCTID, TABLE1.TYPE , TABLE1.PRODUCT, TABLE2.#SOLD
FROM TR.TABLE1
INNER JOIN
PR.TABLE2
ON (TR. PRODUCTID = PRODUCTID )

Query result.

Product ID     Product          Type          #Sold
1     Fruit          Banana          2
2          Food          Rice          4
3          Food          Sugar          6
4          Fruit          Orange          2
5          Fruit          Apple          10
6          Food          Sugar          12
7          Food          Corn          3
8          Fruit          Apple          5
9          Fruit          Banana          2
10          Food          Sugar          1
11          Fruit          Banana          5
12          Food          Sugar          7

But would like to add Four More Column and group by by PRODUCT.Final Result will look like :

     {Product}     ,     {Type}     ,     {#Sold}     ,     0 to 3     ,     4 to 9     ,     >10          Total Sold     
          ,     {Corn}     ,     3     ,          ,          ,                    
          ,     {Rice}     ,          ,     4     ,          ,                    
          ,     {Sugar}     ,          ,          ,          ,     26               
     {Food}     ,          ,          ,          ,          ,               33     
          ,     {Apple}     ,          ,          ,          ,     15               
          ,     {Banana}     ,          ,          ,     9     ,                    
          ,     {Orange}     ,          ,     2     ,          ,                    
     {Fruit}     ,          ,          ,          ,          ,               36     }

View 9 Replies View Related

Getting Query To Display Only 150 And 162 As They Have Purchased Only One Product?

Jun 24, 2011

Is there a way to find customers purchased only single product from the following table?

cusno Product Date
----- ------ ----
121 ES 03/12
121 NT 30/12
131 ST 03/12
13 WT 04/12
150 ES 05/12
150 ES 06/12
150 ES 07/12
160 MN 05/12
160 ES 06/12
160 ES 07/12
162 NT 08/12

I need a query to display only 150 and 162 as they have purchased only one product.

View 2 Replies View Related

SQL & PL/SQL :: List Most Popular Product For Every State?

Feb 11, 2011

so here is the query : For every state, list the most popular product. Here is the query I have so far :

SELECT C.State, P.Product_Name, Count(*) cnt FROM Product P, Customer C, OrderTable O, LineItem L WHERE C.CID = O.CID AND O.OID = L.OID AND L.PID = P.PID GROUP BY C.State, P.Product_Name;

Result :
STATE PRODUCT_NAME COUNT(*)
---------- -------------------- ----------
New Jersey Computer 3
Texas Computer 1
New Jersey Speaker 2

I would need the result to only say New Jersey Computer and Texas Computer because I only want a list of the states with the product name that is sold the most in each state.All I need to do is have the query only select the product name with the max count for each state...

View 4 Replies View Related

Windows :: Oracle 10g Installation Asking For Product.xml

Jun 18, 2013

I have oracle10g installable in .rar format. I have unzipped it and started installer through setup.exe file, but in the secnd step itself it is asking product.xml file location , i searched entire installables but could not find any thing with such name, installing this oracle 10g on windows 2003 server.

View 12 Replies View Related

SQL & PL/SQL :: Return Any Product That Doesn't Have TEST_UOM_GROUP

Jan 13, 2011

I have the following tables: -

CREATE TABLEtest_articles
(idNUMBER(9),
code VARCHAR2(20),
description VARCHAR2(40),
uom_group_id NUMBER(9),
in_exchange NUMBER(1) DEFAULT 0);
[code]....

However, I'd also like it to return any product that doesn't have a TEST_UOM_GROUP, for example the 'Bud'.I've hit a brick wall and just keep going around in circles and not acheiving the result I'm after!how to either change the SQL Query.

View 22 Replies View Related

Forms :: Microsoft Product And Oracle Application Are In One Server?

Jun 19, 2012

Bulk of Microsoft Application is running on windows server 2003 (OS) , is it possible to run parallel an oracle application on the same server .

View 4 Replies View Related

SQL & PL/SQL :: Searching PRODUCT Column Based Upon User Input?

Apr 30, 2010

I have table in Oracle with one column PRODUCT. Column PRODUCT have following values -

Account Management
Active Directory
Adobe Acrobat Reader
NT Account
Application Security

[code]....

I am designing application where I need to search for PRODUCT based upon user's input. Lets say user wants search on 'Laptop Account Broken'. I want to search for all products which contains any of words in user's input. So based upon user's input I want output like below.

Expected Output:

Account Management
NT Account
WebSite Account
HP Laptop

View 2 Replies View Related

Forms :: Frm-41211 Integration Error / SSL Failure Running Another Product

Jan 20, 2010

I have just migrated my database from oracle7 to Oracle9i. My application is still on forms 4.5 and reports 2.5.

i am having a problem after the migration. I am able to run my forms, but i cannot run my reports from my form (button). i am having the error : "frm-41211 integration error: SSL failure running another product". I want to mention that i am able to run the report from the report builder.

View 6 Replies View Related

PL/SQL :: Difference Between CROSS JOIN And Comma-notated Cartesian Product?

May 22, 2013

Oracle version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
OS: Linux Fedora Core 17 (x86_64)

I was practicing on Recursive Subquery Factoring based on oracle examples available in the documentation URL....I was working on an example which prints the hierarchy of each manager with his/her related employees. Here is how I proceed.

WITH tmptab(empId, mgrId, lvl) AS
(
    SELECT  employee_id, manager_id, 0 lvl
    FROM employees
    WHERE manager_id IS NULL
    UNION ALL
    SELECT  employee_id, manager_id, lvl+1
    FROM employees, tmptab
    WHERE (manager_id = empId)
[code]....

107 rows selected.

SQL> However, by accident, I noticed that if instead of putting a comma between the table names I put CROSS JOIN, the very same query behaves differently.That is, if instead of writing

UNION ALL
    SELECT  employee_id, manager_id, lvl+1
    FROM employees, tmptab
    WHERE (manager_id = empId)I write
. . .
UNION ALL
    SELECT  employee_id, manager_id, lvl+1
    FROM employees CROSS JOIN tmptab
    WHERE (manager_id = empId)I get the following error message
ERROR at line 4: ORA-32044: cycle detected while executing recursive WITH query

I remember, oracle supports both comme notation and CROSS JOIN for Cartesian product (= cross product). For example

SQL> WITH tmptab1 AS
  2  (
  3      SELECT 'a1' AS colval FROM DUAL UNION ALL
  4      SELECT 'a2' AS colval FROM DUAL UNION ALL
  5      SELECT 'a3' AS colval FROM DUAL
  6  ),
 [code]....

SQL> So if both comma notated and CROSS JOIN have the same semantic, why I get a cycle for the above mentioned recursive subquery factoring whereas the very same query works pretty well with comma between the table names instead of CROSS JOIN? Because if a cycle is detected (ancestor = current element) this means that the product with CROSS JOIN notation is generating some duplicates which are absent in the result of the comma notated Cartesian product.

View 9 Replies View Related

Forms :: FRM-41211 / Integration Error / SSL Failure Running Another Product

Feb 5, 2013

I have a form with a button for "Print Report " when I click button following error occurred :

FRM-41211 :integration error : SSL failure running another product

View 1 Replies View Related

Forms :: Integration Error - SSL Failure Running Another Product With HP Deskjet D2680?

Sep 14, 2011

"Integration error: SSL failure running another product" with HP Deskjet D2680.We are using 10gR2, Forms6i, and Report6i. The server is Windows 2003 Server, and the OS of the printer is XPIn one of our module, upon calling one report we always encounter Integration error: SSL failure running another product. Sometimes when we do not encounter it, the spooling takes too much time and it takes 6minutes just to print the first page of the report, succeeding pages takes 2-3minutes in interval.

At first we thought that the memory of the PC is the problem, but we tried to connect it to a 2gig RAM Win7 laptop, another laptop with 1gig RAM XP, and a 1g RAM Desktop. We tested 5 computers but the same problem occurs.

The problem is not encountered after we tried other HP Printer(HP 3940, 6988, & D4360). I just want to know the problem with the HP Deskjet D2680.

View 2 Replies View Related

Networking And Gateways :: Installation Product Specific Prerequisite Checks Window?

Apr 18, 2010

in oracle instalation when Product-Specific Prerequisite Checks window appears it show me theres a warning with checking network configration as shown in pic.theres a sites says that its not necessary to make it succeeded and its ok to leave it. should i leave this warning or it should be succeeded?

View 9 Replies View Related

SQL & PL/SQL :: Writing Procedure In User 2 Schema Accessing Table Product - Not Compiled?

Dec 17, 2010

I have got 2 users as user1 and user2.I have used the following statements from user 'user1':

create role GENEVAOBJECTS;
grant select, insert, update, delete on PRODUCT to GENEVAOBJECTS;
grant GENEVAOBJECTS to user2;

In the above statements, product is a table. Now, I could able to access this table from user 'user2'. But however if I write a procedure in user2 schema accessing the table product, then the procedure is not getting compiled.

create or replace procedure test_prc as
v_test number(9);
begin
select product_id into v_test
from PRODUCT where rownum=1;

[code]...

why I cannot access that table from procedure?

View 8 Replies View Related

Forms :: Restrict User To Enter Serial Numbers Of Product In 3 Level Block

Apr 24, 2012

I have a sale invoice form with 3 data blocks.

Data block 1- master_blk : For date/customer of sale invoice
Data block 2- detail_blk1 (detail of the master block - For products and qty)
Data block 3- detail_blk2 (detail of DETAIL_BLK1 For entering serial numbers of products)

My requirement is that whatever quantity user enter in data block 2 against each product he must enter equal number of serial numbers of that product in data block 3.

For this I have created on item (cnt_iteml : to count product's serial numbers in block3 ) in data block 2, and on summary item (t_serial_no ) in block3.

Whenever user changes in quantity, cnt_iteml: item is populated with t_serial_no in block3 of that product by following trigger on quantity column.

POST-Change Trigger ( quantity column )

:stock_transactions.cnt_itl:=:serial_numbers.t_serial_no;

Following trigger is written on block level at data block-3 to populate cnt_iteml with t_serial_no.
PRE-RECORD

IF GET_BLOCK_PROPERTY('SERIAL_NUMBERS',STATUS) IN ('CHANGED') THEN
:stock_transactions.cnt_itl:=:serial_numbers.t_serial_no;
END IF;

Above triggers are fulfilling my requirement except following condition.

If user after entering serial numbers in block 3 and without saving goes back to block2 and try to navigate to another record he gets a message asking him to save changes by forms. At this time if user presses no then cnt_itl item is not been populated with t_serial_no item's value.

What I want in above condition is that if user was inserting new record cnt_it item should be populated with 0, so that he shouldn't be able to save this record. And If he was updating then cnt_itl item should be populated with actual no of records in database against that product.

View 2 Replies View Related

SQL & PL/SQL :: Display Date Ranges In One Column As Separate Date Periods (start And End Date) In Two?

Jun 1, 2010

I'm trying to work out how to take a table like this:

IDDate
12502-Feb-07
12516-Mar-07
12523-May-07
12524-May-07
12525-May-07
33302-Jan-09
33303-Jan-09
33304-Jan-09
33317-Mar-09

And display the data like this:

IDPeriodPeriod StartPeriod End
125102-Feb-0702-Feb-07
125216-Mar-0716-Mar-07
125323-May-0725-May-07
333102-Jan-0904-Jan-09
333217-Mar-0917-Mar-09

As you can see, it's split the entries into date ranges. If there is a 'lone' date, the 'period start' and the 'period end' are the same date.

View 13 Replies View Related

Forms :: Expiry Date To Automatically Show A Date 15 Years After Initial Date

Apr 12, 2010

I have a two date fields in my form; valid from date and expiry date.

Currently my valid from date has an inital value property of $$date$$ which automaitcally brings up todays date.

I need my expiry date to automatically show a date 15 years after this date?

View 8 Replies View Related

Bash_profile Location In IBM AIX?

Sep 30, 2010

Where will i find the bash_profile location in IBM AIX server.

View 2 Replies View Related

How To Add New Column At Specified Location In A Table

Dec 29, 2010

How can I add new column at the specified location in a oracle table? I am having a flat file from which data is inserted to the table..But initially I don't need that column so I m not having this column in the table but if further i need that column at the particular location then how can I do this..?

View 1 Replies View Related

Datafile In Wrong Location

Jun 18, 2013

My production DB has a couple of datafiles that were created in the wrong place, plus they are tiny - 100mb each.  What is best way to get rid of them?

View 3 Replies View Related

RAC For Separate Node's Physical Location

Mar 21, 2012

I would like to implement Oracle RAC with 2 nodes for SE Licence. I did a lot when both this nodes with 3 NICs each were plugged at the same switch. Now I have a need to construct a RAC when two nodes will be in separate locations, abot 4 miles from each one. What should I explain to our network administrator he needs to do to implement this solution? I've been told that they can do a FO channel to each location. But don't have exact clear explicaton.

View 3 Replies View Related

SQL & PL/SQL :: Read CSV File From Shared Location?

Aug 30, 2013

I want to upload csv file from share location(another host) & store data in table

View 2 Replies View Related

Forms :: Location And Save Button

Apr 25, 2012

I have a master-detail form on which i have 2 buttons. save button and another location button in detail.on location button i am calling a form and updating location of the material entered in detail(tabular).

The thing is my form should not get save without updating location for each record entered in detail(tabular).if user try to save form without updating or pressing location button it should give message PLEASE UPDATE YOUR LOCATION.

View 23 Replies View Related

SQL & PL/SQL :: Passing Location To External File

Sep 16, 2013

I have a simple external table


CREATE TABLE xyz
(
UNIQUE_ID VARCHAR2(255 BYTE),
FULL_BUSINESS_NAME VARCHAR2(255 BYTE),
ADDRESS_1 VARCHAR2(255 BYTE),
ADDRESS_2 VARCHAR2(255 BYTE),
CITY VARCHAR2(255 BYTE),
[code].......

I need to make the location parametrized so we don't have to hard code the file name file1. Can I do this in Oracle or do I need to do this in a shell script on the UNIX server?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved