A better way to rearrange the sort in Pivot mode?

Hello
First question - is there a better way to do it?

Background - have a simple pivot w / requirements to the Status column so that logic to not alphabetical company.
Example, # Service req with status should be listed as affected, accepted, completed, closed, re-assigned.

My solution has been to create a column iin table view, use a CASE to say one time statement accepted = 1, etc.. I then sorted CSA, hidden column in a table view and then rotate view I added the status column and hid the new CASE column. I get the results that I expected, but I was wondering if there was a better way to do it?

Thanks - years

As far as the presentation layer is concernd (i.e., in the responses) your way is the best I can think of. The only way you can sort a list of values outside the way that the system can determine automatically (for example, in alphabetical, chronological, order numerically, etc.) is to create your own definition. Without human intervention or custom rules, there is no way any system know that 'C' must come before the "S" (as in "Assigned" and "Accepted" or "O" should come before the 'L' as in 'Complete' and 'Closed').

Because the system knows how to order numbers (e.g., 1,2,3, etc.), it makes sense to create your 'rule' (using your CASE statement) to assign each level of the State to 'correct' number in the sequence.

That's what I'd do. The only addition I can add is that you can do to the RPD by adding a column 'command' to your table LOVs and expose that as a column in the presentation layer. Then you can use this column in sort order.

Tags: Business Intelligence

Similar Questions

  • Is there a better way to remove the toolbar "Frequently used tools" (which I've never used!) to open whenever I open Acrobat reader. rather than uninstall Acrobat and use another PDF reader?

    Is there a better way to eliminate the "frequently used tools.
    toolbar (which I've never used!) to open whenever I open Acrobat
    drive. rather than uninstall Acrobat and use another PDF reader?

    Hi jg49392310,

    You can disable the tool pane with Adobe Acrobat Reader DC was last updated, see this note cover hide the tools Panel in Acrobat and Acrobat Reader DC at all times.

    Kind regards

    Nicos

  • Looking for a better way to count the responses to the survey questions

    Hello all - I have created a survey for a site and now want to display the results to the admins of the site. I am trying to display the countdown - the number of times that a question has been answered in a certain way. I realize that I may need to build the investigation itself differently and how it stores data, but here is how it goes far.

    There are 10 questions, each with 4 options of radio button groups. The database table contains a column for each issue and stores the value of the selected option button. So it's pretty simple.

    Now on the results page, that it's the only way I can think to do, but there must be a better way. For each answer, I create a Recordset filtered on the issue and the value option, then display the total number of records. Which works great, but count each option, which means that 40 recordsets on the page - al simply determine "how many times was the Question 1, Option was selected and how many times has the Question 1, selected Option B and so on.»

    The only other thing I can think it maybe is a better way to count the occurrences of these values in the table is with PHP or in the SQL itself.  Or, perhaps, if the values themselves are entirely digital and follow a kind of model I can use a solution of math.

    Thoughts, solutions, and ideas are welcome!  Thank you.

    Your problem is a bad design. You should have a separate line for each answer, not to separate the columns. It also makes the very rigid investigation. A simple design would include a few tables - a master of the investigation that stores the questions and response table that contains a foreign key to the question number in the master, the answer, as well as any other details you need to capture. You might get more elaborate, but it's essential. Your result page and then just be a single recordset with a simple query with a group by clause.

    I urge you to review this before going any further.

  • Is there a better way to make the selection on this slider?

    Is there a better way to make the selection on this slider?
    I need to retrieve the test scores max (tesc_code SO1, S02, S03 etc... etc...)
    I get the results presented here, but I wonder if it's a better way to do this.
    The results should be back in the same cursor... e
    CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
    p_term in saradap.saradap_term_code_entry%TYPE)
    IS
    SELECT   s01.sortest_pidm       pidm_s01,
             s01.sortest_tesc_code  tesc_code_s01,
             s01.sortest_test_score score_s01,
             s02.sortest_pidm       pidm_s02,
             s02.sortest_tesc_code  tesc_code_s02,
             s02.sortest_test_score score_s02,
             s07.sortest_pidm       pidm_s07,
             s07.sortest_tesc_code  tesc_code_s07,
             s07.sortest_test_score score_s07,
             s08.sortest_pidm        pidm_s08,
             s08.sortest_tesc_code   tesc_code_s08,
             s08.sortest_test_score score_s08,
             s09.sortest_pidm        pidm_s09,
             s09.sortest_tesc_code   tesc_code_s09,
             s09.sortest_test_score  score_s09
      FROM   saturn.sortest s01,
             saturn.sortest s02,
             saturn.sortest s07,
             saturn.sortest s08,
             saturn.sortest s09
     WHERE       s01.sortest_tesc_code IN ('S01')
             AND s01.sortest_pidm = p_pidm
             AND s01.sortest_term_code_entry = p_term
             AND s01.sortest_test_score =
                   (SELECT   MAX (s01a.sortest_test_score)
                      FROM   saturn.sortest s01a
                     WHERE   S01.sortest_pidm = s01a.sortest_pidm
                             AND S01A.sortest_tesc_code IN ('S01'))
             AND s02.sortest_tesc_code IN ('S02')
             AND s02.sortest_pidm = p_pidm
             AND s02.sortest_term_code_entry = p_term
             AND s02.sortest_test_score =
                   (SELECT   MAX (S02A.sortest_test_score)
                      FROM   saturn.sortest s02a
                     WHERE   S02.sortest_pidm = s02a.sortest_pidm
                             AND S02A.sortest_tesc_code IN ('S02'))
             AND s07.sortest_tesc_code IN ('S07')
             AND s07.sortest_pidm = p_pidm 
             AND s07.sortest_term_code_entry = p_term
             AND s07.sortest_test_score =
                   (SELECT   MAX (S07A.sortest_test_score)
                      FROM   saturn.sortest S07A
                     WHERE   S07.sortest_pidm = S07A.sortest_pidm
                             AND S07A.sortest_tesc_code IN ('S07'))
             AND S08.sortest_tesc_code IN ('S08')
             AND S08.sortest_pidm = p_pidm 
             AND S08.sortest_term_code_entry = p_term
             AND S08.sortest_test_score =
                   (SELECT   MAX (S08A.sortest_test_score)
                      FROM   saturn.sortest S08A
                     WHERE   S08.sortest_pidm = S08A.sortest_pidm
                             AND S08A.sortest_tesc_code IN ('S08'))
                     AND S09.sortest_tesc_code IN ('S09')
             AND S09.sortest_pidm = p_pidm 
             AND S09.sortest_term_code_entry = p_term
             AND S09.sortest_test_score =
                   (SELECT   MAX (S09A.sortest_test_score)
                      FROM   saturn.sortest S09A
                     WHERE   S09.sortest_pidm = S09A.sortest_pidm
                             AND S09A.sortest_tesc_code IN ('S09'));

    Hello

    The problem is that you to act as a Cartesian product with all the tables (you will get: S01 * S02 * S08 * S09 lines!) Is it really what you want?
    I don't think...

    Wharton, you can do (with no Cartesian product) is:

    CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
    p_term in saradap.saradap_term_code_entry%TYPE)
    IS
    SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
           sortest_test_score score
      FROM sortest
     WHERE (sortest_tesc_code, sortest_test_score) IN (
              SELECT   sortest_tesc_code, MAX (sortest_test_score)
                  FROM sortest
                 WHERE sortest_tesc_code IN ('S01', 'S02', 'S07', 'S08', 'S09')
                   AND sortest_pidm = :p_pidm
                   AND sortest_term_code_entry = :p_term
              GROUP BY sortest_tesc_code)
       AND sortest_pidm = :p_pidm
       AND sortest_term_code_entry = :p_term
    

    However you absolutely need a Cartesian product, you can do:

    WITH allrows AS
         (SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
                 sortest_test_score score
            FROM sortest
           WHERE (sortest_tesc_code, sortest_test_score) IN (
                    SELECT   sortest_tesc_code, MAX (sortest_test_score)
                        FROM sortest
                       WHERE sortest_tesc_code IN
                                              ('S01', 'S02', 'S07', 'S08', 'S09')
                         AND sortest_pidm = :p_pidm
                         AND sortest_term_code_entry = :p_term
                    GROUP BY sortest_tesc_code)
             AND sortest_pidm = :p_pidm
             AND sortest_term_code_entry = :p_term)
    SELECT s01.pidm pidm_s01, s01.tesc_code tesc_code_s01, s01.score score_s01,
           s02.pidm pidm_s02, s02.tesc_code tesc_code_s02, s02.score score_s02,
           s07.pidm pidm_s07, s07.tesc_code tesc_code_s07, s07.score score_s07,
           s08.pidm pidm_s08, s08.tesc_code tesc_code_s08, s08.score score_s08,
           s09.pidm pidm_s09, s09.tesc_code tesc_code_s09, s09.score score_s09
      FROM allrows s01, allrows s02, allrows s07, allrows s08, allrows s09
     WHERE s01.tesc_code = 'S01'
       AND s02.tesc_code = 'S02'
       AND s07.tesc_code = 'S07'
       AND s08.tesc_code = 'S08'
       AND s09.tesc_code = 'S09'
    

    The lines will be stored in memory to a temporary table before that product happen (should be faster)...

  • Is there a better way to generate the custom timed digital signals

    I'm trying to generate the digital output from the top and down with delays on different lines. Each daq assistant is activate single line on a port USB 6501. There more complex high and lows that I need to generate variable time difference between high and low. There is codebelow that does what I'm trying to achieve, but for a model executing high and low signal is much of your time to do it this way. I'm sure there is a better way to do it, I'm not an expert on labview so I only discovered its potential. Anyone can suggest a more effective and a quick way to do it. I would like to hgihly appreciate. Thank you!

    I've not shown in the code below, but using the DAQ assistant, I initialized lines at low logic level.


  • A better way to treat the form as a table with the variable column type?

    I wanted to make a column to return according to the status of a flag column as readonly. I have a column defined as follows in the report query.

    Decode (sys_flag, 'Y', APEX_ITEM. DISPLAY_AND_SAVE 3, TYPE_CODE, APEX_ITEM. SELECT_LIST_FROM_LOV (3, TYPE_CODE, 'LOV_TYPE_CODE_LOV')) AS TYPE_CODE

    To get the SRM process noting that column, I had to put this 'band of HTML code' to 'No', then the column attributes, I put:
    "Expression HTML" to "#TYPE_CODE #
    ' Display under "to"text display (saves the State).

    And then it took me to get new lines of work:
    "Default of Type" to "Expression of PL/SQL.
    'Default' to APEX_ITEM. SELECT_LIST_FROM_LOV (3, NVL(:P18_TYPE_CODE,'LOV_TYPE'), NULL, 'LOV_TYPE_CODE_LOV', ' NO')

    This makes large, however submit that it seems that the checksum of line used by MRU included the raw HTML generated by the APEX_ITEM package and not just the value of the column. I worked around this by including an element hidden checksum and creating a process that replaces the checksum generated automatically with my custom.

    Is there a better way to intercept this checksum, preferably before it is rendered on the page? I now hide the sum of hidden HTML control in the output HTML of another column, so it's a bit ugly. If not, is there an easier way to achieve what I'm looking for? I tried several combinations, and it seems to work better. It's just a shame there's no way to have a standard hidden column included in the SRM process.

    Hello

    I tried different possibilities and seems to run the following:

    Create a report questioning in NORMAL SQL function to help:

    SELECT
    APEX_ITEM.HIDDEN(1,EMPNO) || APEX_ITEM.TEXT(2,ENAME) ename,
    CASE WHEN DEPTNO = 10 THEN
     APEX_ITEM.HIDDEN(3, SAL) || SAL
    ELSE
     APEX_ITEM.TEXT(3, SAL)
    END SAL,
    EMPNO,
    DEPTNO || APEX_ITEM.MD5_CHECKSUM(ENAME, SAL) DETPNO
    FROM EMP
    

    Do not specify something special for column definitions.

    Create a button that submits the page.

    Create a PL/SQL process that runs "On submit - after calculations" and Validations, triggered by this button and using the following code:

    BEGIN
    APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:EMP:EMPNO,1:,|ENAME,2:SAL,3');
    END;
    

    I've done here: http://htmldb.oracle.com/pls/otn/f?p=55041:35

    Any element with the value of DEPTNO 10 has the value SAL, read-only, as otherwise it's editable. This is done by creating a hidden input field for the actual value, followed by the text version OR by creating a single entry field. This ensures that we have the correct number of SAL elements on the page.

    APEX_ITEM. MULTI_ROW_UPDATE is the "manual" version of the MRU that you would normally get with a form of table and works for above normal as sql based query reports. The format of this very strict is that you must always allow for two primary keys. See the text of presentation here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDFDACC

    Andy

  • Is there a way to hide the menu in windowed mode VMware Workstation 8 bar?

    While in windowed mode is there a way to hide the menu bar on a crowd of Win7?  This menu bar is absolutely huge (about 2 x as large as it should be!) so I was wondering if it was possible to get rid of it?  I know it was possible in older versions, because I found some guides on how to do it.  These guides apply to Workstation 8.  I don't want to use the unit because it's too hard to keep the instances of BONE separate and organized in a meaningful way.

    If any VMware staff are reading this, I would recommend that VMware uses a menu bar of title as Firefox 8 on Windows 7.  With the little drop down menu built into the title bar of the window instead of a space hogging the menu bar stretched all the way in all top of the window.  Or at least implement a combination of keys in option show/hide the menu bar. Please?

    See if this thread helps you not at all:

    http://communities.VMware.com/thread/329429

  • Is there a quick and easy way to rearrange the data off interlaced?

    I collect 5 channels of data through a FIFO DMA by interlacing, then save them in a PDM file. When I check it, it is in good condition for the most part, but there are some points where the channels get switched. For example, channel order when I open the file is 1 2 3 4 5, as expected, for the thousands of several elements. But at some point, he gets 4 5 1 2 3 and later 2 3 4 5 1. Left to right, they are always classified correctly, so it is easy to rearrange them, but very painful along with millions of elements. I have attached some examples of data. I'm looking for A) a way to prevent this or B) some kind of sorting tool or script in DIAdem or LabVIEW can sort for me. I'll work on a scenario of sorting in the meantime.

    I use 2011 LabVIEW Real-time and FPGA 2011 and the standard open and write TDMS functions. I also have access to tiara.

    Seems to me that the problem is that you do not remove the elements of the FIFO in multiples of your number of channels.  Array decimate returns always arrays of equal length.  If the size of the input array is not a multiple of the number of tables of output, it falls out of the elements, and that's where you lose data.  You must round down the number of elements to read to the nearest multiple of the number of channels - I would insert a "Quotient and remainder" function with the divisor as the number of channels and subtract the rest by the number of items.

  • Better way to clone the hard disk SSD evo 850 samsung

    I want to clone my current HARD drive to SSD samsung. The problem is that the OEM partition (100 mb) is not cloned with the Samsung tool. What is the best way to keep that partition? Should what tool I use? If I do a fresh install of windows 7 with the Dvd from Dell, it will recreate this hidden OEM partition? Thanks for your advice.

    I've used easeus http://www.easeus.com/disk-copy/ succesfully maintaining OEM partitions and recovery.

    I used it to cram a 750 GB HARD drive which had plenty of free space on a 250GB SDD while preserving the OEM partition with the diagnoses.

    I used a USB to Sata adapter and it was really easy.

    It goes without saying, but... BACK UP DATA THAT YOU CARE ABOUT THE FIRST...

  • Create a single pdf document from multiple scans of a doc to double-sided printing. What is the simpler, faster way to rearrange the pages in their correct order?

    I am currently trying to create a single pdf file of several analyses of groups of pages in a document of front and back of the page. The manual is about 80 pages and I didn't scan each page regardless. Is there a way to move pages once they are all together in a single pdf? All odd pages are in order. However, two other analyses allowing same abd pages, they are at the end after the odd pages.

    Open the Pages panel on the left and you will be able to drag and drop the

    thumbnails of page around.

  • Better way to format the text: tags HTML or CSS?

    Probably a silly question, but...  I can format the text in a div using CSS Styles (Font size, make-Style, Font-Weight, etc.) or by applying an HTML tag, for example, < H1 >. (Or, I guess a combination where I use CSS to format the tag, but never mind that for now.)

    In general, one approach is better than the other? Thank you!

    Titles, paragraphs, lists, etc. give the semantic meaning and the vital structure to your content.  You can build a site without CSS styles, but you can not build a site without titles, paragraphs, and other HTML tags.

    Nancy O.

  • need a better way to reset the selected cells in a table

    Hi all

    I've been watching the various threads of discussion reset only certain fields in a form and leaving the others unchanged.

    The form, I am currently a table of 20 lines of body with 8 columns. I want to have a reset button that resets the 6 cells in each row.

    I use the following code snippet:

    for (var equal nrow = 1; nrow equal < 21; nrow equal ++)

    for (nCell var = 0; nCell < 6; i ++)

    {

    xfa.host.resetData ("form1.page1.wrapper.ICC.Table1.Row [" + equal nrow + "] .rate [" + nCell + "]");

    }

    It works but it is extremely slow (order of 10 seconds) and my pc is not outdone.  There must be a simpler (and faster!) way to do it.

    I saw a thread where cells that were to be spared from reset could be entered but could not do this work to all the. I thought to put the cells to be spared in a subform, but that went nowhere, because I was able to place cells individual separate subforms.

    Any suggestions will be welcomed with formcalc script if possible :)

    Thank you.

    Harry Ohm.

    Edit: now, it seems that this does not work as I first thought. It works on a single line, but not when the nested for loops are used.

    Post edited by: HarryOhm

    Hi Harry,.

    Just two quick questions. I would wrap the first for loop {} and then you have i ++ in the second loop:

    for (var nRow = 1; nRow < 21; nRow++)
    {
         for (var nCell = 0; nCell < 6; nCell++)
         {
              xfa.host.resetData("form1.page1.wrapper.ICC.Table1.Row[" + nRow + "].rate[" + nCell + "]");
         }
    }
    

    It seems that your table is static (lines do not repeat). One option would be to build a variable/string with object names and reset that. It is an example of a reboot of one of our forms (http://assure.ly/gBJYj9). Here it is set to zero, a line and two fields outside the table:

    // reset page 6 only
    var f1 = Table1.Row1.description.somExpression + ", ";
    var f2 = f1 + Table1.Row1.quantity.somExpression + ", ";
    var f3 = f2 + Table1.Row1.unitPrice.somExpression + ", ";
    var f4 = f3 + positionedSF.myName.somExpression + ", ";
    var f5 = f4 + positionedSF.myAddress.somExpression;
    
    xfa.host.resetData(f5);
    

    Hope that helps,

    Niall

    Ensure the dynamics

  • Better way to write the simple query?

    I'm trying to get the date of 'busy' max 'mansion '.

    It is an example, I imagined, since I can't post our actual data. The following query works, but is their path easier.
    CREATE TABLE TEST_TABLE (  
    LOAN_NUMBER                 VARCHAR2(15 Byte),
    UN_ID                       NUMBER,
    CHANGE_DATE                 DATE,
    PROP_TYPE                   VARCHAR2(25 Byte),
    OCCSTAT                     VARCHAR2(25 Byte)
    ); 
    COMMIT;
    
    
    INSERT INTO TEST_TABLE VALUES (123456,  1,'01-JAN-09','Tent','Occupied');
    INSERT INTO TEST_TABLE VALUES (123456,  2,'01-FEB-09','Shack','Occupied');
    INSERT INTO TEST_TABLE VALUES (123456,  3,'01-JUN-08','Single Family','Occupied');
    INSERT INTO TEST_TABLE VALUES (123456,  4,'01-OCT-08','Single Family Plus','Occupied');
    INSERT INTO TEST_TABLE VALUES (123456,  5,'01-DEC-08','Mansion','Occupied');
    INSERT INTO TEST_TABLE VALUES (123456,  6,'05-JAN-09','Mansion','Unoccupied');
    COMMIT;
    Reason, I take the ID's for the second join because I know that the ID max = max.
    select     
    i2.UN_ID,
    i2.CHANGE_DATE,
    i2.PROP_TYPE,
    i2.OCCSTAT
    from 
    (
        select 
            distinct(LOAN_NUMBER) AS "LOAN_ID", 
            max(UN_ID) AS "ID_MAX"
        from(
        select 
            LOAN_NUMBER,
            UN_ID
      from
            TEST_TABLE
        where OCCSTAT = 'Occupied'
        group by LOAN_NUMBER, UN_ID
        ) 
        group by LOAN_NUMBER
    )i
    left join TEST_TABLE i2 on i.ID_MAX = i2.UN_ID
    easier way without the second join?

    Thanks in advance.

    R

    Try this query, it should be equivalent to your:

    select UN_ID, CHANGE_DATE, PROP_TYPE, OCCSTAT
    from (
        select LOAN_NUMBER, UN_ID, CHANGE_DATE, PROP_TYPE, OCCSTAT, rank() over(partition by LOAN_NUMBER order by un_id desc) rn
        from test_table
         where OCCSTAT = 'Occupied'
    )
    where rn=1
    

    Max

  • is there a better way to set the value?

    It is a very simple application. Here's what I'm trying to accomplish:

    I click on the 'new order' button on page 1, and it takes me 10 page. In the meantime a new empty order is created. order_id is stored in the application element.

    Page 10, I click on 'choose the customer', and takes me to page 11, where I have a list of customers (a report), and by opting for a client (link column), p10_customer_id is defined, and the application navigates back to page 10.

    On page 10, there is a process of page that fires whenever the page is displayed (if order_id is not null), and update the orders table by setting the value of the item p10_customer_id the customer_id.

    What I want is simple: create a command, set the customer_id (and possibly settle the customer_id again if the user wants to change).

    It works now, but I don't like that the customer_id is updated each time this page is rendered. Simply put the customer_id of page 11 only, when the user selects a customer in the list.

    But I have not found a way to do it.

    Also, it would be good to create all of the order, the customer id, order items all in one transaction and post them right at the end, but I did see a way to not make any changes on a page when I navigate to another page. Because now, if something unexpected occurs, for example the user does not complete the order (navigates away, or closes the browser), the orders table will be almost completely empty, unused lines

    I use Oracle10g XE and Apex 3.1.2

    Thank you
    Gabor

    Hi Gee2,

    Have you checked how the collections of the apex? In my opinion, you can create an application of the cleaning by using this technique.
    There is a demand to make orders, created by default when you install APEX. Check the app.

    I hope this helps.
    Kind regards

    --
    Paulo Vale
    http://Apex-notes.blogspot.com

  • Better way to monitor the ESX host

    We currently have in ESX hosts, a 3.5 and 4.0 a.  I am in the process of upgrading our support contract, allowing us to upgrade the two hosts of the latest version.  We have Server Advanced licenses, which, I think I understand VCenter.  I would like to know how to hardware such as hard drives monitoring etc. and alert us by e-mail when there is failure.  Is there than anything that is included with VMware for this?  I can install now or should I wait for vcenter.  Thanks in advance for any help that anyone can provide.

    Make sure you know what you have ordered. There are advanced for the 6 processors acceleration Kit and it has Advanced vSphere by processor. The acceleration Kit includes vCenter. The other does not.

Maybe you are looking for