Getting an overall total of data in Oracle 10g

I am currently trying to get an overall total for my data return w/o having several rows of subtotals is there a way I can do this?
Here is my current code:
SELECT DECODE(m.peb_loc, NULL,'TOTAL', m.peb_loc) peb_loc,
mf.narrative,
m.component_active_mho component,
t.chngfind_d,
count(*)
FROM pda_main m,
pda_tran t,
pda_mtf mf
WHERE m.ssn = t.ssn
AND m.mtf_code = mf.mtf_code
AND t.chngfind_d BETWEEN to_date('01/01/2002', 'MM/DD/YYYY') AND to_date('05/31/2006', 'MM/DD/YYYY')
AND m.component_active_mho IN('ACTIVE', 'MHO')
AND t.chng_type = 'C'
GROUP BY ROLLUP (m.peb_loc, mf.narrative, m.component_active_mho, t.chngfind_d)
ORDER BY m.peb_loc, t.chngfind_d
And this is a sample of my data return:
PEB_LOC     NARRATIVE     COMP CHNGFIND_D COUNT
TX     DDEAMC     MHO     27-Apr-04     
TX     DDEAMC     ACTIVE     27-Apr-05     
TX     Lyster ACH     ACTIVE     27-Apr-05 1
TX     Winn ACH     MHO     2-May-03     
TX     CBHCO AL     MHO     3-May-04     1
TX     Martin ACH     ACTIVE     3-May-05     3
TX     Bayne-Jones ACH     ACTIVE     4-May-06     1
TX     CBHCO AL     MHO     5-May-06     5
TX     Brooke AMC     ACTIVE     8-May-06     2
TX     CBHCO AL     MHO     9-May-06     10
TX     Brooke AMC     ACTIVE     10-May-06     1
These are all subtotals
TX     Winn ACH               140
TX     Winn ACH     ACTIVE          80
TX                    1302
TX     Darnall ACH               218
TX     DDEAMC               271
Then it gives an overall total of everything.
TOTAL                    3729
So, how can I get just an overall total w/o all of these subtotals? Please advise thanks.

Hi there,
For sql specifics, use the sql/plsql forum @
PL/SQL

Similar Messages

  • Getting all the CRM on Demand Data in Oracle 10g database

    Hello Everyone,
    The requirement is to get all the module data into Oracle 10g database.
    Currently i am using the background worker in .NET to span through all the modules, but recently experiencing performance issues due to data volume.
    I want to use .NET as the programming language.
    Kindly suggest any other methids / techniques.
    Thanks in advance.
    Regards.

    Thanks for your reply.
    We are using CRMOD webservices.
    We want the full OD data to be refreshed overnight and we havve used .NET to build the EXE, the same we have configured as a task.
    Could you please shed some more light as to what would be the best practices to do this.
    Regards.

  • Problem in importing data in oracle 10g from 9i backup

    Hi ,
    Am trying to import data in oracle 10g..but it does not importing constraints, and stop doing anything by the msg.
    About to enable constraints.....
    after this msg it does not work.
    plz help,
    Regards,
    Neha

    Hi Neha,
    You have a lot of options. I'll supose you can test first, and you're using an export file.
    First forget about the data, think in your database structure. So you can do this:
    exp userid=... file=exp_norows.dmp full=y rows=n statistics=none
    Now you have the structure of your database. Create the database, in 10g, empty, check you have all filesystem, etc. for you new datafiles. And do the import with parameter ignore=y, you'll see a lot off errors on SYSTEM schema, don't worry about it.
    Now you have the structure of you database in 10g. You can take a look in the import log file, looking for some possible errors come from your schemas. so check the objects, and check the schemas.
    Bear in mind things like CONNECT role in 9i it's different in 10g, you can't create db_links in 10g with "IDENTIFIED BY VALUES" because you'll get an ORA-00600, etc.
    Well, fix all problems on source database (9i) and repeate this procedure until you don't recieve any more errors (not a SYSTEM schema errors).
    When you have everything solved, you can try to import the data.
    I hope, this method can help you. If you have any problem do not hesitate to ask me.
    John Ospino Rivas

  • Migration using data pump Oracle 10g - Oracle 11g

    HI all,
    1)
    Right now I`m using Oracle 11g. I have a plan to import data from Oracle 10g. I would like to know if its possible to import data which was exported by datapump on Oracle 10g ?
    Should I convert somehow expdp output from Oracle 10g to Oracle 11g format ?
    2)
    Next question is. If I will use expdp to create dump of complete database. May I use *.dmp to import selected users ? Or only full database can be restored ?

    Yes, you can import 10g dump into an 11g database.
    Maybe you should take some time and read the section on datapump in the fine Oracle® [Database Utilities|http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/dp_import.htm#i1007324] manual.
    :p

  • Is there any method to export the data from oracle 10g in any format !!!!!

    is there any methods to export the data from oracle 10g in the format of excel or csc or txt or anyother. i already downloaded the sql developer tool but it only exports the data of upto one lakh rows ,but i have two tables of more than 3 lakh and 10 lakh rows respectively.for this i used 'where' command to break the file through sql developer but that didnt work
    plz help me out if any thing possible
    i need to again import this data into microsoft sql if there is any direct method plz let me know
    its urgent
    Message was edited by:
    user628031
    Message was edited by:
    user628031

    Take a look at DUMP_CSV function by Tom Kyte.

  • How to migrate MS SQL Server OLAP data to Oracle 10g OLAP

    Hi,
    Anyone has any idea on whether migration workbench can migrate my MS SQL Server OLAP data to Oracle 10g (with OLAP option) ?
    Best Regards,
    Ian Ho

    Ian,
    What exactly do you mean by SQL*Server OLAP ? Is it just a 'normal' SQL*Server database which is used for an OLAP application ?
    The migration workbench migrates schema objects, triggers, and stored procedures and is not concerned with the application that uses those objects.
    And the same with the Oracle OLAP database. Once the data etc has been moved into the database you can then use it for whichever application you want.
    If you have concerns apart from moving the actual data then please give us more details.
    Regards,
    Mike

  • Plz help to to transfer excel or acess data to Oracle 10g database

    Plz help me to transfer excel or acess data to Oracle 10g database.
    I have excel and acess sheet data here i wanna transfer it to oracle database. Plz guide me how to this
    Message was edited by:
    user582212

    There are several ways, such as ODBC or migration workbench, which is also mentioned in the current article on sqldeveloper on OTN, here's the link. If you use this forum's search function, you should find several threads regarding this topic.
    C.
    Message was edited by:
    cd

  • Exporting Data From Oracle 10g to Access

    Hi Experts,
    I need to export data from oracle apps shcema(each and every object in it) to MS ACCESS File.
    Please let me know how to do it
    Thanks and Regards,
    Andy

    Since you did not provide details of what you are planning to do, a very simple, however, depending upon the number of your tables, very labour intensive solution:
    Although being not very familiar with access, I think access offers a means to import csv files.
    So e.g. using SQL*Plus you can execute the following steps.
    set pagesize <nnn>
    set linesize <nnn>
    set colsep ',' -- You may choose other special characters to separate columns of your output
    spool <csv-file>
    select * from <tab>;
    spool offWherever you see <nnn> exchange by appropriate numeric values to get just one page as result and to configure your line size to hold a complete record in one output line.
    Replace <csv-file> and <tab> by the name of your output file to be read in to access and by the name of your table, respectively.

  • Tool for Viewing 3D data in Oracle 10g

    Hi,
    I had uploaded the 3D DGN format Data from FME Oracle Suite to Oracle 10g database.
    the following tables were created
    TESTASH_SDODIM TABLE
    TESTASH_SDOLAYER TABLE
    TESTASH_SDOGEOM TABLE
    TESTASH_SDOINDEX TABLE
    TESTASH TABLE
    When we are trying to browse the data using AutoCAD of any other viewer, we are unable to find this table in that particular user. Whereas if we run a sql command and run a sql query we are able to get the record count.
    Can you suggest something to view this data.
    Thanks and Regards
    Ashish Dhawan

    Ok.. I'd bet then that there are no entries in USER_SDO_GEOM_METADATA AKA MDSYS.SDO_GEOM_METADATA_TABLE. FME view needs to find an entry in there to show you it in the dialog so you can pick the table. The same holds true for views of tables, there needs to be an entry, although I find it somewhat ironic that it then goes on to not know what projection the data is in.
    Also, the viewer will pick the first SDO_GEOMETRY column it finds. So if you have more than one, you will then need to make a view for just that column.
    Anyway, add an entry into the table, and you should be good to go.
    Bryan

  • Retrieval of xmltype data from oracle 10g to java

    Hi
    Right now we are facing an issue on xmltype retrieval from oracle 10g to java.
    I used xmltype column.getClobval() to get the xml content, but unable to do the parse to get the xml data.
    So i tried getStringval(), getting the xml content as string format and here in this case also, i didn't get document object.
    Here is the code snippet:
    String sql = "SELECT node_id,node_desc,parent_node_id,e.report_xml.getStringval() FROM TABLE_STRUCTURE e";
    st = con.createStatement();
    rs = st.executeQuery(sql);
    while (rs.next()) {
    Object value[] = { rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4) };
    list.add(value);
    DOMParser parser = new DOMParser();
    parser.parse(rs.getString(4));
    doc = (Document) parser.getDocument();
    System.out.println(": DOM = " + doc.getClass().getName());
    Please do guide in this scenario.
    Thanks in advance.
    Sirisha

    Please see below link
    http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10790/xdb11jav.htm

  • Problem with retrieving data from Oracle 10g / PHP4.3 / Apache 1.3.27

    Hi,
    I re-open a new thread following the opened post 'Getting RPMs for php-oracle for PHP4.3 on RHEL 4.0 and issue with OCI8 '
    I could re-installed PHP4.3 and apache 1.3.27 from the normal tar package (./configure then make) - I had some issues with the RPMs packages before.
    I could connect successfully PHP4.3 to my Oracle 10g DB with no issues by using some of the (deprecated) functions contained in oracle.so library in command line mode by executing a simple PHP script ;-)
    But ...when I try to execute the same script (a simple log on to the DB) or the application throught my web browser there are some errors in the apache error_log file that crash the process:
    [Wed Jul 25 13:19:23 2007] [notice] child pid 25450 exit signal Segmentation fault (11)
    [Wed Jul 25 13:19:31 2007] [notice] child pid 25451 exit signal Segmentation fault (11)
    *** glibc detected *** realloc(): invalid size: 0x08338898 ***
    [Wed Jul 25 13:19:42 2007] [notice] child pid 25441 exit signal Aborted (6)
    *** glibc detected *** realloc(): invalid size: 0x08338898 ***
    [Wed Jul 25 13:54:52 2007] [notice] child pid 25508 exit signal Aborted (6)
    [Fri Jul 27 04:39:56 2007] [notice] child pid 20550 exit signal Segmentation fault (11)
    After some investigations it looks like this is due to the connection of Oracle 10G and php.
    I tried to recompile Apache as the following:
    # cd /usr/src/apache_1.3.xx
    # make clean
    # LIBS=-lpthread ./config.status
    # make
    # make install
    but the issue is the same ...
    How can I workaround that issue and fix it in order to connect to Oracle 10 G by using PHP4.3 / apache 1.3.27 ?
    I need to use the oracle.so library to avoid to re-rewrite all my application ...
    Any help much very appreciated !
    Cheers
    Dominique

    You are in unchartered territory. But check the common "gotcha" and
    make sure that all the Oracle environment variables are set in the
    shell that starts Apache. Load the script <?php phpinfo(); ?> in a
    browser and see that whatever variables you need are set in the
    Environment section. See the section "Oracle Environment Variables
    for Connections" in Underground PHP and Oracle Manual
    I suspect it would be beneficial to migrate the PHP code to oci8.
    Check table 16-1 in Underground PHP and Oracle Manual for the mapping
    between 'oracle' and 'oci8' functions.
    -- cj

  • Updating data in oracle 10g

    hello everyone,
    Is there anyone who can explain to me, how to import only recently datas from other database to mine oracle 10g database.
    I wanto update only the newest datas to my database.
    Best regards
    Tony

    userThony wrote:
    Hi,
    I have oracle 10g database installed in 2 servers machines. One has the backup datas from other.
    I would like to import the latest datas from one to other database.
    I don't want to import all the entire database, only the information from 2 weeks ago.
    Best regardsWell, as alluded to earlier, first you have to be able to identify that data. There is nothing inherent in Oracle to do so. At least not after the fact. Is there any column in the table(s) that could be used to identify the data you need? If one database is a backup of the other, why would you NOT want to back up the entire 'source' database? A little more information about the business problem you are trying to solve might lead to some creative solutions.

  • Export Data from Oracle 10g and import in SQL server

    Hi Guys,
    I have assigned a task in which I am required to transfer data from oracle database to SQL server. I have not done this before. Can anybody help me the easiest way to accomplish this. Thanks

    One way of doing this is setup Heterogeneous Database connections
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    I am sure there's other options out there.

  • Why do I get spaces between the printed fields? (Oracle 10G)

    Hi!
    I use Oracle 10G and I have a program that doesn't work the way it does on previous versions of Oracle. Or maybe it's a wrong options?!?
    Well i need to print the fields from a table with no spaces between them. Instead I get spaces between the fields. As if the dimension of the printed field is three times the real dimension of the field (even if I use SUBST, RTRIM, LPAD).
    For example I have
    SELECT '1', '2' FROM dual;
    I get "1 2 " instead of "12"
    The program is something like this:
    SET SCAN ON
    SET SPACE 0
    SET PAGESIZE 0
    SET PAUSE OFF
    SET FEEDBACK OFF
    SET HEADING OFF
    SET EMBEDDED ON
    SET VERIFY OFF
    SET TERMOUT OFF
    SET LINESIZE 4750
    spool &&4
    Select campo1, campo2 from tabella;
    Oh! It's not possible to concatenate the fields. campo1 || campo1. I get error, I presume, because of the dimension of the line (4750).
    Thanks,
    Miky

    SET COLSEP doesn't work! SPACE 0 should do the same, but doesn't work either When you complains that solution doesn't work, you should provide us the output you got. Because as I showed, and as shoblovk show it worked fine on our side.
    Anyway, what's the version of your Oracle client (SQL*Plus), OS... ?
    Nicolas.
    PS : and use tags as well &#091;pre&#093;paste your code here&#091;/pre&#093;
    Message was edited by:
    N. Gasparotto

  • Converting Informix data to Oracle 10g

    Hi,
    We are planning to convert data on Informix 5.x based legacy system over to Oracle 10g.
    Wondering if anyone would like to share some light on this process, experience, use of Oracle or Other tools..
    Regards,
    Subhash

    Are you looking to convert your data alone or do you wish to maintain the structure of the your legacy system? If you wish to retain the structure of your legacy system then something like like the oracle workbench may be what you are looking for. If you are just trying to convert your data from one database application to another then you just need an analyst map out your conversion needs and a good conversion programmer to convert the data.

Maybe you are looking for

  • Displaytag to export the only data not the url

    I am using displaytag to export the data but my data is coming like but I only want the data to export For example I want the only data not the url should be like: 78190 My code is as below: :<display:table name="bulkDetails" export="true" pagesize="

  • Download link in Apex4

    Hi All, I have migrated Apex 3.2 to Apex 4. I had interactive report with download link. It was working fine but in Apex 4 ,this is not working. Could anybody please help me with this? Thanx Omy

  • My blackberry z10 wont install any downloaded apps

    My z10 since the latest os upgrade cannot install apps from anywhere even blackberry world I have 10.2.1.3062 os How can I sort this out

  • Several same objects in a tilelist not selectable

    Hello. I have 2 horizontal lists in my application. The first one contains images and I am allowed to drag them from first one and drop in the another one. Everything seems to work perfectly in first look. I can drag images to one list to another and

  • Dynamic variant

    hi all,   i created a report and that report has to be execute in back ground daily with variant,but my report contains some date field, so i need to change the date value in that varient,how can i do it.How can i create dynamic variant,could you ple