Best way to write this report

I hope someone can help. I am fairly new to Oracle Reports.
I need to compile a report with totals only. The problem is I need to pull the detail data in to perform fuctions on that detail data but I don't want to display the detail data, only the bottom line numbers. Each time I try this I get numerous blank pages where the detail would be.
What is my best option if any and where can I find information on this?

For performance your report should be based on a single query that returns only the total amounts. If you do not need to display the details, why return them? Using multi-level functions you can write a single query to return your desired totals - and rather than having the functions inside the report, you can have them on the server, further increasing performance.
HTH,
Troy
I hope someone can help. I am fairly new to Oracle Reports.
I need to compile a report with totals only. The problem is I need to pull the detail data in to perform fuctions on that detail data but I don't want to display the detail data, only the bottom line numbers. Each time I try this I get numerous blank pages where the detail would be.
What is my best option if any and where can I find information on this?

Similar Messages

  • Best way to write this sql ?

    Please let me know best way to write this SQL.
    select col1, count(*)
    from TableA
    group by col1
    having count(*) =
    (select max(vals)
    from
    select col1, count(*) as vals
    from TableA
    group by col1
    having count(*) > 1
    )

    post EXPLAIN PLAN
    SELECT col1,
           COUNT(*)
    FROM   tablea
    GROUP  BY col1
    HAVING COUNT(*) = (SELECT MAX(vals)
                       FROM   (SELECT col1,
                                      COUNT(*) AS vals
                               FROM   tablea
                               GROUP  BY col1
                               HAVING COUNT(*) > 1))

  • Is this the best way to write this in AS3

    I have converted my old AS2 to As3. It now appears to work the same as before but being new to AS3 I have a few questions.
    In this example I click on a button which takes me to a keyframe that plays a MC. There is another btn that takes me back to the original page.
    In AS2 it is written like this.
    // Go to keyFrame btn
    on (release) {
    //Movieclip GotoAndStop Behavior
    this.gotoAndStop("Jpn_Scul_mc");
    //End Behavior
    // Play Movie
    on (release) {
    //Movieclip GotoAndStop Behavior
    this.gotoAndStop("Jpn_Movie");
    //End Behavior
    //load Movie Behavior
    if(this.mcContentHolder == Number(this.mcContentHolder)){
    loadMovieNum("PL_Japan_Scul.swf",this.mcContentHolder);
    } else {
    this.mcContentHolder.loadMovie("PL_Japan_Scul.swf");
    //End Behavior
    // Return key
    on (release) {
    //Movieclip GotoAndStop Behavior
    this.gotoAndStop("Jpn_Intro");
    //End Behavior
    In AS3 it is written like this.
    // Play Movie
    var myrequest_Jpn:URLRequest=new URLRequest("PL_Japan_Scul.swf");
    var myloader_Jpn:Loader=new Loader();
    myloader_Jpn.load(myrequest_Jpn);
    function movieLoaded_Jpn(myevent_Jpn:Event):void {
    stage.addChild(myloader_Jpn);
    var mycontent:MovieClip=myevent_Jpn.target.content;
    mycontent.x=20;
    mycontent.y=20;
    //unload method - Return to keyframe
    function Rtn_Jpn_Intro_(e:Event):void {
    gotoAndStop("Japan_Intro");
    Rtn_Jpn_Intro_btn.addEventListener(MouseEvent.CLICK, removeMovie_Jpn);
    function removeMovie_Jpn(myevent_Jpn:MouseEvent):void {
    myloader_Jpn.unload();
    myloader_Jpn.contentLoaderInfo.addEventListener(Event.COMPLETE, movieLoaded_Jpn);
    Rtn_Jpn_Intro_btn.addEventListener("click",Rtn_Jpn_Intro_);
    // Go to keyFrame btn
    function Scul_Play(e:Event):void {
    gotoAndStop("Jpn_Scul_mc");
    Jpn_Scul_btn.addEventListener("click",Scul_Play);
    1. Is there a better, more efficient way to achieve this in AS3?
    2. I have used an //unload method in the AS3 script which does remove the MC from the scene but I notice in the output tab my variable code is still being counted for the last MC played.
    Is this normal?

    Hi Andrei, I have started a new project and taken your advice to construct it with a different architecture with all the code in one place.
    I have two questions regarding your last code update.
    var myrequest_Jpn:URLRequest;
    var myloader_Jpn:Loader;
    Rtn_Jpn_Intro_btn.addEventListener(MouseEvent.CLICK, removeMovie_Jpn);
    Jpn_Scul_btn.addEventListener(MouseEvent.CLICK, Scul_Play);
    function Scul_Play(e:MouseEvent):void {
         myrequest_Jpn = new URLRequest("PL_Japan_Scul.swf");
         myloader_Jpn = new Loader();
         myloader_Jpn.contentLoaderInfo.addEventListener(Event.COMPLETE, movieLoaded_Jpn);
         myloader_Jpn.load(myrequest_Jpn);
    function movieLoaded_Jpn(e:Event):void {
         // remove listener
         myevent_Jpn.target.removeEventListener(Event.COMPLETE, movieLoaded_Jpn);
         this.addChild(myloader_Jpn);
         myloader_Jpn.x = 20;
         myloader_Jpn.y = 20;
         // remove objects that are in "Japan_Intro" frame
    function removeMovie_Jpn(e:MouseEvent):void {
         // add back objects that are in "Japan_Intro" frame
         // remove from display list
         this.removeChild(myloader_Jpn);
         myloader_Jpn.unload();
         myloader_Jpn = null;
         // this moved from Rtn_Jpn_Intro_ function
         //gotoAndStop("Japan_Intro");
    Its all works great except for the line to remove event..
    1.
    myevent_Jpn.target.removeEventListener(Event.COMPLETE, movieLoaded_Jpn);
    I get an error:   1120: Access of undefined property myevent_Jpn.
    Removing this statement allows the code to work but that is not a solution.
    2.
    Rtn_Jpn_Intro_btn.addEventListener(MouseEvent.CLICK, removeMovie_Jpn);
    I would like this button to remove more than one movie. Is this possible.
    Thanks for the help todate.

  • Best way to write SELECT statement

    Hi,
    I am selecting fields from one table, and need to use two fields on that table to look up additional fields in two other tables.
    I do not want to use a VIEW to do this. 
    I need to keep all records in the original selection, yet I've been told that it's not good practice to use LEFT OUTER joins.  What I really need to do is multiple LEFT OUTER joins.
    What is the best way to write this?  Please reply with actual code.
    I could use 3 internal tables, where the second 2 use "FOR ALL ENTRIES" to obtain the additional data.  But then how do I append the 2 internal tables back to the first?  I've been told it's bad practice to use nested loops as well.
    Thanks.

    Hi,
    in your case having 2 internal table to update the one internal tables.
    do the following steps:
    *get the records from tables
    sort: itab1 by key field,  "Sorting by key is very important
          itab2 by key field.  "Same key which is used for where condition is used here
    loop at itab1 into wa_tab1.
      read itab2 into wa_tab2     " This sets the sy-tabix
           with key key field = wa_tab1-key field
           binary search.
      if sy-subrc = 0.              "Does not enter the inner loop
        v_kna1_index = sy-tabix.
        loop at itab2 into wa_tab2 from v_kna1_index. "Avoiding Where clause
          if wa_tab2-keyfield <> wa_tab1-key field.  "This checks whether to exit out of loop
            exit.
          endif.
    ****** Your Actual logic within inner loop ******
       endloop. "itab2 Loop
      endif.
    endloop.  " itab1 Loop
    Refer the link also you can get idea about the Parallel Cursor - Loop Processing.
    http://wiki.sdn.sap.com/wiki/display/Snippets/CopyofABAPCodeforParallelCursor-Loop+Processing
    Regards,
    Dhina..

  • What is the best way to call a report from within a report

    What is the best way to call a report from within a report(master / Detail concept)
    A type of drill down report
    Oracle Database 10g
    Forms 10.1.2.0.2
    Report Builder 10.1.2.0.2

    Hi
    Have a look in this link, certainly you will get fix, if not just post a comment on blog, will get reply soon
    http://windows7bugs.wordpress.com/?s=oracle+10g+bug

  • What's the best way for reading this binary file?

    I've written a program that acquires data from a DAQmx card and writes it on a binary file (attached file and picture). The data that I'm acquiring comes from 8 channels, at 2.5MS/s for, at least, 5 seconds. What's the best way of reading this binary file, knowing that:
    -I'll need it also on graphics (only after acquiring)
    -I also need to see these values and use them later in Matlab.
    I've tried the "Array to Spreadsheet String", but LabView goes out of memory (even if I don't use all of the 8 channels, but only 1).
    LabView 8.6
    Solved!
    Go to Solution.
    Attachments:
    AcquireWrite02.vi ‏15 KB
    myvi.jpg ‏55 KB

    But my real problem, at least now, is how can I divide the information to get not only one graphic but eight?
    I can read the file, but I get this (with only two channels):
    So what I tried was, using a for loop, saving 250 elements in different arrays and then writing it to the .txt file. But it doesn't come right... I used 250 because that's what I got from the graphic: at each 250 points it plots the other channel.
    Am I missing something here? How should I treat the information coming from the binary file, if not the way I'm doing?
    (attached are the .vi files I'm using to save in the .txt format)
    (EDITED. I just saw that I was dividing my graph's data in 4 just before plotting it... so It isn't 250 but 1000 elements for each channel... Still, the problem has not been solved)
    Message Edited by Danigno on 11-17-2008 08:47 AM
    Attachments:
    mygraph.jpg ‏280 KB
    Read Binary File and Save as txt - 2 channels - with SetFilePosition.vi ‏14 KB
    Read Binary File and Save as txt - with SetFilePosition_b_save2files_with_array.vi ‏14 KB

  • Crazy I know, but what is the best way to PREVENT a report portlet from running ?

    I know this sounds a very weird question.
    On a page I have a html form (that I use as search criteria for my report) as well as an actual report published as a portlet.
    On certain situations, such as when going to the page initially, I require that the report not be executed due to bind variables passed by the form not being initialised.
    I know I can set default values for parameters, and use decode statements in my query etc etc, but this means the report is still actually run, but no rows are returned!
    I dont want the report to even run!
    Is there a faster way of stopping a report from executing.
    ... before displaying the page - pl/sql
    Would the best way to achieve this be the throwing of an unhandled exception?
    declare
    myException exception;
    begin
    if certain criteria is not met then
    raise myException;
    end;
    regards,
    Matt.

    I have about 50GB of photos on my old MBP iphoto library.
    To be able to merge your libraries, your Aperture version and iPhoto version must match. For basic reading see: Aperture 3.3: Using a unified photo library with iPhoto and Aperture
    and Aperture 3.3: How to use Aperture to merge iPhoto libraries
    Assuming you are running the latest Aperture and iPhoto versions:
    Before merging libraries ensure that your iPhoto Library has no issues. While still on your old mac run the "library first aid tools" on your iPhoto Library. Hold down the key combination ⌥⌘ and double click your iPhoto Library, then select "Repair database".
    Make sure you have a backup of your current Aperture Library and iPhoto library.
    Do both macs have a FireWire port? Then you could connect your macs in Target Disk Mode:
    See OS X Lion: Transfer files between two computers using target disk mode
    This way your new mac could see your old mac as an external disk and you could copy directly between the macs.
    Otherwise copy your iPhoto library by drag-and-drop to an external disk (on your old mac) and connect that disk to your new mac. Check, if the external drive is formatted for mac (MacOS X Extended (Journaled)). Otherwise reformat it, before you copy the iPhoto library to that drive.
    When your iPhoto Library has been moved to your new Mac launch Aperture and use the command "File > Import > Library" from the main menu bar. If there are duplicates in the Aperture library (if you imported earlier from iPhoto) you may be prompted if you want to "Add" or "Merge". If you have lots of duplicates, pick "Merge", otherwise "Add".
    Post back, if you need more detailed instructions.
    Good Luck.
    Léonie

  • Whats the best way to expose this in memory database? (ArrayList)

    Hello everyone.
    I was looking for advice on how I should implement this...currently I have the following ArrayList that stores ClassEntity objects. I'm going to write 2 classes that need to access this ClassEntity Object arrayList because they are goign to use these objects to spit out 2 different files.
    I didn't want to make the database public and static though.
    Here's a snippet of my current class that populates and creates the arrayList data structure:
    public class RODMFileParser
         //used to keep file information
         ClassEntity classEntity = null;
         //used to store ClassEntity objects
         List<ClassEntity> classEntityList = new ArrayList<ClassEntity>();
         //used to store the conversion table RODM->ENGLISH/ENGLISH->RODM
         ConversionTableParser convTableParser = new ConversionTableParser();
            else if(line.contains("Field Value "))
                        //now we can create a new Entity Class object! tricky! huh
                        classEntityList.add(new ClassEntity(idClassName,  idFieldName,
                                                                       englishClassName, englishFieldName, fieldType));
    Iterator listIter = classEntityList.iterator();
              while(listIter.hasNext())
                   ClassEntity tempObj = (ClassEntity) listIter.next();
                   System.out.println(tempObj);
              }So now classEntityList has all the objects I need to create these 2 seperate files but these 2 files are dramtically different. What would be the best way at exposing this classEntityList ArrayList so my 2 other classes can access it?
    Thanks!

    well if I made it non-static, wouldn't I have to create a new object of that class in each class I want to use it in?
    for example, that class that populates the database must parse a file to create the database.
    RODMFileParser file = new RODMFileParser();
              file.parseFile("QAGENT");So inside each class I would have to do this wouldn't I? if I made it public static, wouldn't I only have to read to the disk once?
    Putting it to a worst case say, 100 classes need this database, that means I would have to make 100 accesses to the disk woulnd't it?
    And if it was public static, it would jsut return a copy of the database that was only read from the disk once or am I misunderstanding how it works?

  • Event Structures​-best way to implement this UI?

    I am trying to write a VI to control & read data from 4 different "channels" (each measuring a DUT) at once.  I have written all the VI's for initializing instruments, communicating with the devices (VISA, GPIB), setting bias, reading data, etc...that has all completed. I just need to write the overall program with the user interface to allow the user to control these 4 channels & display the measured data.....as it turns out, this is the tricky part! My head is spinning from trying to figure out how to handle all the possible events.
    Basically for each channel, I want the user to be able to
    -enable/disable it  for measurement (e.g. if  there is no device loaded in Ch.3, we don't want to measure Ch.3..maybe disable/grey everything)
    -set bias conditions (only if channel enabled). Allow user to change bias "in real-time" by increment/decrementing (e.g. incrementing from 5.00 V to 5.01 V, for example).
    -turn biasing on/off (again, only if channel is enabled)
    Also,  I want each channel to display its measured data (e.g current, temperature reading)..every second or so. No graphs or anything fancy (for now! ), just numeric indicator. 
    Honestly, this all sounds so simple but I'm having trouble figuring out the best way to implement this, due to the fact that 1) there are multiple channels needing to be monitored for events  2) large number of user events that could occur (seems like at least 4 per channel - enabling/disabling, turning bias on/off, incrementing/decrementing bias values, etc ), Also the if a channel IS enabled, i want to be continously reading/displaying the data.  What is the best way to handle this? Should i have 4 separate while loops, each with an event structure to handle events for that particular channel..or will that give me grief somewhre? 
    Also, I have another nagging question. Pretty much all the examples I see re: Event Structures and booleans involve latched booleans, eg. buttons that are just pressed once and pop back up...e.g. buttons you press to tell it to complete a task (e.g. "Acquire Data" or "Stop") , and once it's pressed it's over and reset.  In my case, some of the booleans would not be latched...e.g. the "Enable Ch.2" button would be 'TRUE" as long as i want Ch. 2 to be read....does that make sense? Then, say hours later,  if i did want to disable that channel,  i would change it to "FALSE" and while that would be an "value change", the new value would not be "TRUE"..does that make sense? So  not sure if that would be dealt with the same way in an Event Structure. 
    Hope this all makes sense and many thanks in advance for any help!!!

    You're halfway there. I'd say the best solution is a producer/consumer structure, the event structure is used to generate queued commands to the consumer loop.
    All data is handled in the consumer loop, where you among other things have an array of clusters of channel/instrument settings. (I usually have several cluster, one for test data, one for instrument settings, one for general settings and so on)
    The event structure can have a 1 sec timeout, in which you queue up a Measure command.
    In the consumer, in the measure state you loop through your instruments and if enabled you measure them and update their indicators.
    The general (smart) way to setup the queue is with a cluster containing 2 elements, a typedef'd Command and a variant.
    This way you can send data with the command in any form which is then interpreted in the consumer.
    If, e.g. you press the Enable button on a channel, you can enqueue Enable and the channel number.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • What is a best way to write SQL ?

    Sample Case
    drop table t;
    drop table b;
    create table t ( a varchar2(4), b number, c varchar2(1));
    insert into t values ('A00', 10, 'R');
    insert into t values ('A01', 11, 'R');
    insert into t values ('A02', 12, 'R');
    insert into t values ('A03', 13, 'R');
    insert into t values ('A00', 10, 'P');
    insert into t values ('A01', 11, 'P');
    insert into t values ('A02', 12, 'P');
    insert into t values ('A03', 13, 'P');
    commit;
    create table b ( j varchar(4), k varchar2(1), l varchar2(5), m number(3), n varchar2(5), o number(3));
    insert into b values ('A00', 'P', 'FIXED', 100, 'FLOAT', 60);
    insert into b values ('A01', 'P', 'FIXED', 101, 'FIXED', 30);
    insert into b values ('A02', 'R', 'FLOAT', 45, 'FLOAT', 72);
    insert into b values ('A03', 'R', 'FIXED', 55, 'FLOAT', 53);
    commit;
    10:19:13 SQL> select * from t;
    A B C
    A00 10 R
    A01 11 R
    A02 12 R
    A03 13 R
    A00 10 P
    A01 11 P
    A02 12 P
    A03 13 P
    8 rows selected.
    10:19:19 SQL> select * from b;
    J K L M N O
    A00 P FIXED 100 FLOAT 60
    A01 P FIXED 101 FIXED 30
    A02 R FLOAT 45 FLOAT 72
    A03 R FIXED 55 FLOAT 53
    1/     In table t each reference having 2 records one with P another is with R
    2/     In table b each refrence merged into single record and there are many records which are not existing in table t
    3/      both t and j tables can be joined using a = j
    4/     If from table t for a reference indicator is 'P' then if have to pick up l and m columns, if it is 'R' then I have to pick up n and o columns
    5/     I want output in following format
    A00     P     FIXED          100
    A00     R     FLOAT          60
    A01     P     FIXED          101
    A01     R     FIXED          30
    A02     P     FLOAT          72
    A02     R     FLOAT          45
    A03     P     FLOAT          53
    A03     R     FIXED          55
    6/     Above example is a sample ouput, In above example I have picked up only l,m,n,o columns, but in real example there are many columns ( around 40 ) to be selected. ( using "case when" may not be practical )
    Kindly suggest me what is a best way to write SQL ?
    thanks & regards
    pjp

    Is this?
    select b.j,t.c as k,decode(t.c,'P',l,n) as l,decode(t.c,'P',m,o) as m
    from t,b
    where t.a=b.j
    order by j,k
    J K L M
    A00 P FIXED 100
    A00 R FLOAT 60
    A01 P FIXED 101
    A01 R FIXED 30
    A02 P FLOAT 45
    A02 R FLOAT 72
    A03 P FIXED 55
    A03 R FLOAT 53
    8 rows selected.
    or is this?
    select b.j,t.c as k,decode(t.c,b.k,l,n) as l,decode(t.c,b.k,m,o) as m
    from t,b
    where t.a=b.j
    order by j,k
    J K L M
    A00 P FIXED 100
    A00 R FLOAT 60
    A01 P FIXED 101
    A01 R FIXED 30
    A02 P FLOAT 72
    A02 R FLOAT 45
    A03 P FLOAT 53
    A03 R FIXED 55
    8 rows selected.

  • Best way to write specific information to a file

    Hi there,
    I'm looking to write specific information from my program to 2 separate files.
    Before the program runs, it asks the operator for their info (name, password, run ID #, a couple safety checkboxes).
    So, I would like the first file to record log-in information (i.e. The operator's name, the date and time they accessed the program, and the Run ID #) all in a spreadsheet.
    I would like the second file to record data from the different components of the program ( 2 tank levels, a flow meter, and run ID #) in another spreadsheet.
    Any thoughts on the best way to do this? I've looked at using arrays to organize the info/data, and then write to spreadsheet, but I haven't quite figured it out...
    Thanks,
    Daryn

    For the first, you could convert everything to strings, then send an array of strings. For the second, just send an array of numbers.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Best way to write an Wrapper class around a POJO

    Hi guys,
    What is the best way to write an Wrapper around a Hibernate POJO, given the latest 2.2 possibilities? The goal is, of course, to map 'regular' Java Bean properties to JavaFX 2 Properties, so that they can be used in GUI.
    Thanks!

    what about this:
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.property.StringProperty;
    public class PersonPropertyWrapper {
         private StringProperty firstName;
         private StringProperty lastName;
         private Person _person;
         public PersonPropertyWrapper(Person person) {
              super();
              this._person = person;
              firstName = new SimpleStringProperty(_person.getFirstName()) {
                   @Override
                   protected void invalidated() {
                        _person.setFirstName(getValue());
              lastName = new SimpleStringProperty(_person.getLastName()) {
                   @Override
                   protected void invalidated() {
                        _person.setLastName(getValue());
         public StringProperty firstNameProperty() {
              return firstName;
         public StringProperty lastNameProperty() {
              return lastName;
         public static class Person {
              private String firstName;
              private String lastName;
              public String getFirstName() {
                   return firstName;
              public void setFirstName(String firstName) {
                   this.firstName = firstName;
              public String getLastName() {
                   return lastName;
              public void setLastName(String lastName) {
                   this.lastName = lastName;
         public static void main(String[] args) {
              Person p = new Person();
              p.setFirstName("Jim");
              p.setLastName("Green");
              PersonPropertyWrapper wrapper = new PersonPropertyWrapper(p);
              wrapper.firstNameProperty().setValue("Jerry");
              System.out.println(p.getFirstName());
    }Edited by: 906680 on 2012-7-27 上午10:56

  • Best way to add crystal reports

    Hi All,
    I have worked with crystal reprots in past and have done this by adding a DataSet and having this populated with the SQL statement from the database.
    I want to have a way where i can add reports to a folder and have the report pulled in to the vb.net application dynamically, so can leave the application as is and not have to keep re-compiling the code and have it done through updates.
    what is the best way to do this a system i used to work with used to be able to add 3 files in to a folder . Par . SQL .Rpt
    this used to pull the report from the folder and add to the specified menu or submenu.
    i have figured out i can either do it through a database table or xml file for adding but need to work out how to get the paramater name and type and add to the form dynamically.
    any help will be appriciated.
    Regards
    AIDAN

    Depending on the version of CR you are working with, your best way will be to use InProc RAS. See samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
    Also, consult the developer help for your version of Crystal Reports.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Collecting Caller Inputs - best way to handle this?

    Greetings,
    My apologies in advance, I'm sure this has been asked before and I did try the search function.
    So we have a need to collect, and report on, caller inputs on a couple of menus. For example - one menu offers three options, and based on your choice you could go to another menu with five options, etc. And we're trying to get a handle on the best way to collect and report on callers inputs at the various levels. We know UCCX comes with ten custom variables however, if we have custom variables doing other things can we reuse them? Or, once they are designated to do something are they no longer available?
    Would it be best to use a log file of some kind/type?
    If there are posts (somewhere) discussing this, a link would be spectacular.
    For those of you who have dealt with this your insights would be appreciated.
    Thanks for your time and attention!

    https://supportforums.cisco.com/thread/2151833?tstart=0

  • Is this REALLY the easiest/best way to do this?

    I'm no SQL guru by any means, but I can get by. Here is some background.
    I am running Perfmon Data Collector Sets to collect performance counters.
    I am using Relog.exe to take the .blg files and pushing them into a database
    I am attempting to write a query that will ultimately get the information out of the database and see if I can aggregate the data a bit as well. If the last part is better off doing in Excel (where this data will ultimately end up for charting), then I will
    do that part there.
    Here is the table layouts when you import the .blg files:
    Table name: CounterData
    Columns:
    GUID
    CounterID
    RecordIndex
    CounterDateTime
    CounterValue
    FirstValueA
    FirstValueB
    SecondValueA
    SecondValueB
    MultiCount
    Table Name: CounterDetails
    CounterID
    MachineName
    ObjectName
    CounterName
    CounterType
    DefaultScale
    InstanceName
    InstanceIndex
    ParentName
    ParentObjectID
    TimeBaseA
    TimeBaseB
    I need to pull multiple sets of data out of these tables, so I built the following query:
    USE PDB
    SELECT
    CAST(LEFT(CounterDateTime, 16) as smalldatetime) AS CounterDateTime,
    REPLACE(CounterDetails.MachineName,'\\','') AS ComputerName,
    CounterDetails.ObjectName + ISNULL('(' + CounterDetails.InstanceName + ')','') + '\' + CounterDetails.CounterName AS [Counter],
    CounterData.CounterValue
    FROM CounterData
    FULL OUTER JOIN CounterDetails ON CounterData.CounterID = CounterDetails.CounterID
    FULL OUTER JOIN DisplayToID ON CounterData.GUID = DisplayToID.GUID
    WHERE CounterDetails.ObjectName = 'Processor'
    AND CounterDetails.CounterName = '% Processor Time'
    AND CounterDetails.InstanceName = '_Total'
    UNION
    SELECT
    CAST(LEFT(CounterDateTime, 16) as smalldatetime) AS CounterDateTime,
    REPLACE(CounterDetails.MachineName,'\\','') AS ComputerName,
    CounterDetails.ObjectName + ISNULL('(' + CounterDetails.InstanceName + ')','') + '\' + CounterDetails.CounterName AS [Counter],
    CounterData.CounterValue
    FROM CounterData
    FULL OUTER JOIN CounterDetails ON CounterData.CounterID = CounterDetails.CounterID
    FULL OUTER JOIN DisplayToID ON CounterData.GUID = DisplayToID.GUID
    WHERE CounterDetails.ObjectName = 'Web Service'
    AND CounterDetails.CounterName = 'Bytes Received/sec'
    AND CounterDetails.InstanceName = 'AppName'
    ORDER BY 1
    Is this REALLY the best way to do this?
    Also, trying to figure out how to build in data aggregation in 5 minute average blocks.
    Any assistance appreciated!

    Erland,
    Thanks for your response.
    The related items in the table are CounterID, in a nutshell, what I want to do is the following:
    Get the data from the CounterDetails table that holds the MachineName, CounterName, CounterType and so forth.
    CounterID MachineName ObjectName CounterName CounterType DefaultScale InstanceName InstanceIndex ParentName ParentObjectID TimeBaseA TimeBaseB
    1 \\ServerName Web Service Bytes Received/sec 272696576 -4 Carnival NULL NULL NULL 14318180 0
    2 \\ServerName Web Service Bytes Sent/sec 272696576 -4 AppName NULL NULL NULL 14318180 0
    3 \\ServerName Web Service Current Connections 65536 0 AppName NULL NULL NULL 14318180 0
    4 \\ServerName Web Service Bytes Total/sec 272696576 -4 AppName NULL NULL NULL 14318180 0
    5 \\ServerName Web Service Get Requests/sec 272696320 0 AppName NULL NULL NULL 14318180 0
    6 \\ServerName Web Service Head Requests/sec 272696320 0 AppName NULL NULL NULL 14318180 0
    7 \\ServerName Processor % Processor Time 558957824 0 _Total NULL NULL NULL 10000000 0
    8 \\ServerName PhysicalDisk Disk Reads/sec 272696320 0 _Total NULL NULL -1 14318180 0
    9 \\ServerName PhysicalDisk Disk Reads/sec 272696320 0 0 C: D: E: NULL NULL -1 14318180 0
    10 \\ServerName PhysicalDisk Disk Read Bytes/sec 272696576 -4 _Total NULL NULL -1 14318180 0
    11 \\ServerName PhysicalDisk Disk Read Bytes/sec 272696576 -4 0 C: D: E: NULL NULL -1 14318180 0
    12 \\ServerName PhysicalDisk Disk Writes/sec 272696320 0 _Total NULL NULL -1 14318180 0
    13 \\ServerName PhysicalDisk Disk Writes/sec 272696320 0 0 C: D: E: NULL NULL -1 14318180 0
    14 \\ServerName PhysicalDisk Current Disk Queue Length 65536 1 _Total NULL NULL -1 14318180 0
    15 \\ServerName PhysicalDisk Current Disk Queue Length 65536 1 0 C: D: E: NULL NULL -1 14318180 0
    16 \\ServerName PhysicalDisk % Disk Read Time 542573824 0 _Total NULL NULL -1 10000000 0
    17 \\ServerName PhysicalDisk % Disk Read Time 542573824 0 0 C: D: E: NULL NULL -1 10000000 0
    18 \\ServerName PhysicalDisk Disk Write Bytes/sec 272696576 -4 _Total NULL NULL -1 14318180 0
    19 \\ServerName PhysicalDisk Disk Write Bytes/sec 272696576 -4 0 C: D: E: NULL NULL -1 14318180 0
    20 \\ServerName PhysicalDisk Disk Transfers/sec 272696320 0 _Total NULL NULL -1 14318180 0
    21 \\ServerName PhysicalDisk Disk Transfers/sec 272696320 0 0 C: D: E: NULL NULL -1 14318180 0
    22 \\ServerName PhysicalDisk % Disk Write Time 542573824 0 _Total NULL NULL -1 10000000 0
    23 \\ServerName PhysicalDisk % Disk Write Time 542573824 0 0 C: D: E: NULL NULL -1 10000000 0
    24 \\ServerName Network Interface Bytes Received/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter NULL NULL -1 14318180 0
    25 \\ServerName Network Interface Bytes Received/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] NULL NULL -1 14318180 0
    26 \\ServerName Network Interface Bytes Received/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _3 NULL NULL -1 14318180 0
    27 \\ServerName Network Interface Bytes Received/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _2 NULL NULL -1 14318180 0
    28 \\ServerName Network Interface Bytes Received/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _4 NULL NULL -1 14318180 0
    29 \\ServerName Network Interface Bytes Received/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _4 NULL NULL -1 14318180 0
    30 \\ServerName Network Interface Bytes Received/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _3 NULL NULL -1 14318180 0
    31 \\ServerName Network Interface Bytes Received/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2 NULL NULL -1 14318180 0
    32 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter NULL NULL -1 14318180 0
    33 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] NULL NULL -1 14318180 0
    34 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _3 NULL NULL -1 14318180 0
    35 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _2 NULL NULL -1 14318180 0
    36 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _4 NULL NULL -1 14318180 0
    37 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _4 NULL NULL -1 14318180 0
    38 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _3 NULL NULL -1 14318180 0
    39 \\ServerName Network Interface Bytes Sent/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2 NULL NULL -1 14318180 0
    40 \\ServerName Network Interface Bytes Total/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter NULL NULL -1 14318180 0
    41 \\ServerName Network Interface Bytes Total/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] NULL NULL -1 14318180 0
    42 \\ServerName Network Interface Bytes Total/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _3 NULL NULL -1 14318180 0
    43 \\ServerName Network Interface Bytes Total/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _2 NULL NULL -1 14318180 0
    44 \\ServerName Network Interface Bytes Total/sec 272696576 -4 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _4 NULL NULL -1 14318180 0
    45 \\ServerName Network Interface Bytes Total/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _4 NULL NULL -1 14318180 0
    46 \\ServerName Network Interface Bytes Total/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _3 NULL NULL -1 14318180 0
    47 \\ServerName Network Interface Bytes Total/sec 272696576 -4 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2 NULL NULL -1 14318180 0
    48 \\ServerName Network Interface Output Queue Length 65792 0 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter NULL NULL -1 14318180 0
    49 \\ServerName Network Interface Output Queue Length 65792 0 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] NULL NULL -1 14318180 0
    50 \\ServerName Network Interface Output Queue Length 65792 0 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _3 NULL NULL -1 14318180 0
    51 \\ServerName Network Interface Output Queue Length 65792 0 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _2 NULL NULL -1 14318180 0
    52 \\ServerName Network Interface Output Queue Length 65792 0 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _4 NULL NULL -1 14318180 0
    53 \\ServerName Network Interface Output Queue Length 65792 0 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _4 NULL NULL -1 14318180 0
    54 \\ServerName Network Interface Output Queue Length 65792 0 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _3 NULL NULL -1 14318180 0
    55 \\ServerName Network Interface Output Queue Length 65792 0 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2 NULL NULL -1 14318180 0
    56 \\ServerName Network Interface Current Bandwidth 65792 -6 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter NULL NULL -1 14318180 0
    57 \\ServerName Network Interface Current Bandwidth 65792 -6 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] NULL NULL -1 14318180 0
    58 \\ServerName Network Interface Current Bandwidth 65792 -6 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _3 NULL NULL -1 14318180 0
    59 \\ServerName Network Interface Current Bandwidth 65792 -6 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _2 NULL NULL -1 14318180 0
    60 \\ServerName Network Interface Current Bandwidth 65792 -6 TEAM : Team _0 - Intel[R] PRO_1000 PT Dual Port Server Adapter _4 NULL NULL -1 14318180 0
    61 \\ServerName Network Interface Current Bandwidth 65792 -6 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _4 NULL NULL -1 14318180 0
    62 \\ServerName Network Interface Current Bandwidth 65792 -6 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _3 NULL NULL -1 14318180 0
    63 \\ServerName Network Interface Current Bandwidth 65792 -6 Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2 NULL NULL -1 14318180 0
    64 \\ServerName Memory % Committed Bytes In Use 537003008 0 NULL NULL NULL NULL 14318180 0
    65 \\ServerName Memory Available MBytes 65792 0 NULL NULL NULL NULL 14318180 0
    66 \\ServerName Memory Committed Bytes 65792 -6 NULL NULL NULL NULL 14318180 0
    67 \\ServerName ASP.NET Requests Current 65536 -1 NULL NULL NULL NULL 14318180 0
    68 \\ServerName ASP.NET Worker Process Restarts 65536 -1 NULL NULL NULL NULL 14318180 0
    69 \\ServerName ASP.NET Applications Running 65536 -1 NULL NULL NULL NULL 14318180 0
    70 \\ServerName ASP.NET Requests Queued 65536 -1 NULL NULL NULL NULL 14318180 0
    71 \\ServerName ASP.NET Application Restarts 65536 -1 NULL NULL NULL NULL 14318180 0
    72 \\ServerName ASP.NET Worker Processes Running 65536 -1 NULL NULL NULL NULL 14318180 0
    73 \\ServerName ASP.NET Request Execution Time 65536 -1 NULL NULL NULL NULL 14318180 0
    Put that together with the Actual CounterData in the appropriately named table.
    GUID CounterID RecordIndex CounterDateTime CounterValue FirstValueA FirstValueB SecondValueA SecondValueB MultiCount
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 1 2015-04-30 13:01:17.165 0 -1927979745 2 -598728243 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 2 2015-04-30 13:01:22.173 67581.3633745449 -1927642227 2 -527219720 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 3 2015-04-30 13:01:27.165 94686.4063445727 -1927169543 2 -455741935 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 4 2015-04-30 13:01:32.172 152203.041104636 -1926407371 2 -384042212 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 5 2015-04-30 13:01:37.180 165447.09804292 -1925578898 2 -312344215 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 6 2015-04-30 13:01:42.172 171837.776053684 -1924721043 2 -240864459 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 7 2015-04-30 13:01:47.180 173383.630948422 -1923852824 2 -169166134 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 8 2015-04-30 13:01:52.172 144598.914838348 -1923130989 2 -97690055 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 9 2015-04-30 13:01:57.179 174737.727857169 -1922255986 2 -25991455 706 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 10 2015-04-30 13:02:02.171 169321.861725293 -1921410708 2 45486867 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 11 2015-04-30 13:02:07.179 208117.127073016 -1920368562 2 117185118 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 12 2015-04-30 13:02:12.171 141008.757157554 -1919664632 2 188662923 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 13 2015-04-30 13:02:17.178 149495.458222544 -1918916026 2 260361927 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 14 2015-04-30 13:02:22.170 174341.539879002 -1918045605 2 331847154 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 15 2015-04-30 13:02:27.178 143957.916530014 -1917324818 2 403537258 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 16 2015-04-30 13:02:32.170 130619.882518362 -1916672720 2 475018386 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 17 2015-04-30 13:02:37.178 142332.32395318 -1915959971 2 546718673 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 18 2015-04-30 13:02:42.170 184550.944997403 -1915038722 2 618192753 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 19 2015-04-30 13:02:47.177 154267.317838657 -1914266244 2 689889592 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 20 2015-04-30 13:02:52.169 149238.629713526 -1913521218 2 761368514 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 21 2015-04-30 13:02:57.177 188584.542348845 -1912576880 2 833066869 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 22 2015-04-30 13:03:02.169 176918.705027469 -1911693639 2 904548308 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 23 2015-04-30 13:03:07.176 188369.179859497 -1910750431 2 976242743 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 24 2015-04-30 13:03:12.168 148606.905306921 -1910008537 2 1047723754 707 1
    8ADCC3A7-4D90-45A3-B912-FB18C9CB3646 1 25 2015-04-30 13:03:17.176 200078.077196397 -1909006668 2 1119420468 707 1
    The query above is working, but I feel there is a better way to get this done.
    Sample Output:
    CounterDateTime ComputerName Counter CounterValue
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23836753920
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23837396992
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23842693120
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23843172352
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23861657600
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23872827392
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23909138432
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23960690688
    2015-04-30 13:01:00 ServerName Memory\Committed Bytes 23972872192
    2015-04-30 13:01:00 ServerName PhysicalDisk(_Total)\Current Disk Queue Length 0
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 0
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 8.65725297547727
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 9.34837740384615
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 10.45515625
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 11.3926622596154
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 11.4480309928908
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 11.8893621695024
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 12.3306933461139
    2015-04-30 13:01:00 ServerName Processor(_Total)\% Processor Time 13.3301821231728
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 0
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 67581.3633745449
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 94686.4063445727
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 144598.914838348
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 152203.041104636
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 165447.09804292
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 171837.776053684
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 173383.630948422
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Received/sec 174737.727857169
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 0
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 354821.47994974
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 533111.927106303
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 849787.130317823
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 1015485.82303199
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 1286054.48388504
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 1528398.33137765
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 1600789.68540725
    2015-04-30 13:01:00 ServerName Web Service(AppName)\Bytes Total/sec 1690894.89372096
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23781527552
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23802056704
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23803797504
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23821389824
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23831420928
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23835803648
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23850049536
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23863857152
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23875534848
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23917281280
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23933739008
    2015-04-30 13:02:00 ServerName Memory\Committed Bytes 23978917888
    I hope this additional information I have provided will help. :)
    Thanks for your time!

Maybe you are looking for