Handy way to order columns in SET operator ?

Not only this operator can be one of the most loaded with numerous columns but every group has to be ordered the same way and I can't find any tool/menu to swap two columns (as an instance)
Do you know any other simpler way to do that rather than costingly emptying every single set to refill them in the right order one-by-one ?
Thanks

Basically the fastest way would be using OMBPLUS, first create the SET operator and next add columns in the desired order.
Another option is the OWB Client itself, but only if the order of the columns is the same as that of some table (maybe the target table for the SET operator?).
Get that table into the mapping, and use it as source for the columns of the SET operator. Next delete that table from the mapping an connect the columns in the SET operator with their desired sources.
I guess you could even define a 'dummy' table for that in OWB if you need to use it more often, if you set Deployable to FALSE you won't even have to bother about seeing it deployed to your target schema.
Hope this helps.
Cheers, Patrick

Similar Messages

  • Set operator Vs Self join

    hi all,
    i have a main table and a corresponding history table.
    Like employee and h_employee both has primary key as emp_id.
    now i want a query which should only retrieve the common values among these two table.
    I have an idea of doing this in two way 1.self join 2. set operator
    1.select emp_id
    from emp e,h_emp h
    using (emp_id)
    2. select emp_id from emp
    intersect
    select emp_id from h_emp
    now guide me which gives better performance? how to evaluate the performance in PL/SQL Developer client?
    is there any keyword to trace the timing of the each query?
    Please advice.
    Regards,
    Slu

    Set operators combines the output of 2 or more queries into single output....
    Internally its doing sorting the two tables
    Join is just matching the records based on the where condition ....
    use Explain plan to the cost of the query
    SQL> Explain plan for select emp_id
    from emp e,h_emp h
    using (emp_id)
    and use
    SQL > select * from plan_table
    to see the cost...
    Edited by: LPS on Jul 12, 2011 12:08 AM

  • Set operations & tables with different columns

    I have a problem. I have 3 tables - Countries, Locations & Departments. I want to output the country_id and country_name from the countries tables for countries that have no departments. Locations has country_id and location_id columns and departments has location_id and department_id columns. All is in Database 11g. I can produce a table which gives me the locations with departments or without departments as follows:
    select location_id from locations intersect select location_id from departments;
    This gives me a list of locations with departments. Conversely I can get a list of locations without departments as follows:
    select location_id from locations minus select location_id from departments;
    However, to combine this output with the countries table I need to produce country_id in the output. However, when I try to add country_id to my code from above as follows:
    select country_id, location_id from locations intersect select to_char(null), location_id from departments;
    I get no rows found. I understand why. There is no intersection between country_id in locations and the null output from departments (where there is no country_id column). Alternatively, if I try as follow:
    select country_id, location_id from locations minus select to_char(null), location_id from departments;
    I get rows with every country_id whether they have departments or not. Again, I understand why. I am essentially subtracting nothing (the to_char(null) from departments) from the country_id column in locations and getting the entire country_id column as output.
    How can I use set operations to produce the country_id column? I also do not want to show the location_id problem.
    This problem is repeated when I try for the final country_id, country_name final output. The countries table has these columns. However, the locations table does not have the country_name column. It only has the country_id column. So a query such as this one:
    select country_id, country_name from countries intersect country_id, to_char(null) from locations;
    presents me with the same problem as above. The country_id column intersects nicely, but the country_name file does not intersect as it does not exist in the locations table. Again, how can I use set operations to produce the country_id and country_name columns.

    Hi,
    the method I outlined for you above should be fine. It doesn't matter that there are one-to-many relationships which may cause repeated output rows; set operations (except for UNION ALL ) always return distinct rows.
    Can you do a query on the countries table, that shows all countries?
    Can you do a query involving all 3 tables inner-joined, that shows the countries that are related to locations and departments? (Repeated rows are okay.)
    Then you can do a MINUS, to get only the countries that are not related to departments.
    If you get stuck, post a little sample data (CREATE TABLE and INSERT statements), the results you want from tha data, your best attemptat a query, and a description of the problem (including the full error message, if any).

  • Interactive report - order column by other column values

    Hi Oracle experts,
    could you please advise how to order column A by values of column B in Interactive report ?
    When clicking on header of "Countries" column in order to sort it acs/desc I would like to order it by values of column "Sort_order" which stores values from 1 to 100.
    The goal is to order "Countries" not alphabetically, but according to values of "Sort_order" column.
    Any ideas?
    Thanks in advance for your help.
    Best regards,
    Konrad

    962622 wrote:
    Hi Oracle experts,Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "962622".
    When you have a problem you'll get a faster, more effective response by providing as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    could you please advise how to order column A by values of column B in Interactive report ?
    When clicking on header of "Countries" column in order to sort it acs/desc I would like to order it by values of column "Sort_order" which stores values from 1 to 100.
    The goal is to order "Countries" not alphabetically, but according to values of "Sort_order" column.
    Any ideas?I'm not an expert on Interactive Reports, so there may be a less brute force method using the built-in features, but here's an approach that's worked in the past.
    Modify the query to generate the column as:
    '<!-- '|| to_char(sort_order, '009') || ' -->' || countryi.e. prefix the country name with an HTML comment containing the required ordinal number. This won't be visible in the report, but will be considered when sorting in SQL.
    In the IR Column Attributes set the column's Display Text As property to Standard Report Column so APEX won't escape the HTML tags.
    This method has side effects: some IR filters won't work; aggregate calculations can't be applied to the column; and report exports contain the HTML rather than the expected value.
    Edited by: fac586 on 02-Oct-2012 13:28
    From APEX 4.2 IR columns have support for HTML Expressions, so Re: Report formatting/sorting issue using a hidden column and HTML Expression should be used, as it's purely declarative and provides better separation of concerns. (Still a problem on report exports though. Whilst the sort column can be suppressed using a condition, the hidden column can't be "unhidden" to replace it.)

  • Kodo 3 - inverse owner and order-column bug?

    Hi,
    I have problems to move an object from one ordered list collection to
    another.
    This is the scenario:
    A DocumentGroup is element of a tree, so it has children and a parent.
    Tree ordering is important, so it must be maintained.
    public class DocumentGroup
    * @link aggregation
    * @associates <{DocumentGroup}>
    * @supplierCardinality 0..*
    * @bidirectional <{de.daisi.model.DocumentGroup#parent}>
    * @clientCardinality 0..1
    * @supplierRole Children
    * @clientRole Parent
    private Vector children;
    * @bidirectional
    private DocumentGroup parent;
    public void addChild(DocumentGroup newChild)
    if (this.children.contains(newChild)==false)
    if (newChild.isRoot())
    newChild.setRoot(false);
    if (newChild.getParent()!=null)
    newChild.getParent().removeChild(newChild);
    // Add child
    newChild.setParent(this);
    this.children.add(newChild);
    if (this.tree!=newChild.getTree())
    newChild.setTree(this.tree);
    public void removeChild(DocumentGroup child)
    boolean removed = this.children.remove(child);
    if (removed)
    child.setParent(null);
    This is my mapping, the column DOCG_INDEX should be managed by KODO and
    ist NOT mapped to a Java field.
    <class name="DocumentGroup">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="pk-column" value="DOCG_ID"/>
    <extension vendor-name="kodo" key="table" value="DOCUMENTGROUP"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column" value="DOCG_LOCK"/>
    </extension>
    <field name="children">
    <collection element-type="DocumentGroup"/>
    <extension vendor-name="kodo" key="inverse-owner" value="parent"/>
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-many">
    <extension vendor-name="kodo" key="table" value="DOCUMENTGROUP"/>
    <extension vendor-name="kodo" key="ref-column.DOCG_ID"
    value="DOCG_DOCG_ID"/>
    <extension vendor-name="kodo" key="order-column" value="DOCG_INDEX"/>
    </extension>
    </field>
    <field name="parent">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.DOCG_ID"
    value="DOCG_DOCG_ID"/>
    </extension>
    </field>
    <field name="root">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="DOCG_IS_ROOT"/>
    </extension>
    </field>
    <field name="tree">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.DOCT_ID"
    value="DOCG_DOCT_ID"/>
    </extension>
    </field>
    </class>
    Now, if I move a document group several times (by invoking first
    removeChild() on the source group and then addChild() on the target
    group), the following error occurs:
    kodo.util.FatalUserException: Attempt to set column
    "DOCUMENTGROUP.DOCG_INDEX" to two different values: "0", "1" This usually
    occurs when you map different fields to the same column, but you do not
    keep the values of these fields in synch.
    at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java:95)
    at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java:535)
    at kodo.jdbc.sql.AbstractRow.setInt(AbstractRow.java:301)
    at
    kodo.jdbc.meta.OneToManyFieldMapping.updateInverse(OneToManyFieldMapping.java:364)
    at
    kodo.jdbc.meta.OneToManyFieldMapping.update(OneToManyFieldMapping.java:299)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.update(UpdateManagerImpl.java:303)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:126)
    at
    kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:71)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:503)
    at
    kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:158)
    at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:760)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:639)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:411)
    So, is there an error in my mapping configuration?
    (I tried to leave out the "inverse-owner", but that does not change the
    behaviour.)
    Any help to make my tree editable with Kodo 3 would be great...

    Abe White wrote:
    Is there any way you could send us a test case that reproduces this
    problem? Saying you have to move a DocumentGroup "several times" makes
    me think it might be best if you sent us a program that shows exactly
    what you mean. Just zip up your DocumentGroup class, metadata, mapping,
    and a driver program showing the error and send it to
    [email protected]
    We'd really appreciate it.I sent a program for testing to the mail address above. So I hope you can
    reproduce this error.

  • HELP!   SQL Query:  Other ways to reorder column display?

    I have a SQL query report with a large number of columns (users can hide/show columns as desired). It would be great if the column display order could be changed by changing the order of the columns in the SELECT list in the Report Definition, but that doesn't work -- it puts changed or added columns at the end regardless of the order in the SELECT list of the query.
    Is there some other way to reorder the columns displayed without using the Report Attributes page? It's extremely tedious to move columns around using the up/down arrows which redisplays the page each time. Am I missing a way to change display order, or does anyone have a "trick" to do this? It's so painful....
    When defining forms you can reoder columns by specifying a sequence number for each column. Just curious as to why reports were not done the same way, and are there any plans to address this in a future release?
    Karen

    Yes, reordering columns is extremely painful.
    It is supposed to be much improved in the next version.
    See
    Re: Re-ordering columns on reports
    Moving columns up/down in Report  Attributes
    See my example at
    http://htmldb.oracle.com/pls/otn/f?p=24317:141
    Basically, let the users move columns around until they are blue in the face, provide a Save button to save the column order in a user preference and reorder the columns when the page reloads.
    Or you can use Carl's PL/SQL shuttle as the widget to specify the columns shown and their order. The shuttle is at http://htmldb.oracle.com/pls/otn/f?p=11933:27
    Hope this helps.
    Message was edited by:
    Vikas

  • How can i enter multiple sales order numbers to set up table

    Hi,
    I need to reload about 8,000 sales orders to the set up table and the SO numbers are very scattered, so i can not enter them as a range. In transaction OLI7BW Sales Document field has no multiple selection option, therefore i have to enter the documents ONE BY ONE! Could you please tell me if there any faster way to enter them?
    regards,
    Tansu Aksu @ CHEP

    Try this link..
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    Regards.
    PS: if it help you, pls assign points.

  • Is there a way to only catalog backup set not in the catalog? "CATALOG START WITH" generates double entry.

    The DB version is 11.1.0.7.
    The "CATALOG START WITH" not only catalog backup set that are not in the RMAN catalog, but also catalog a second copy for files that are already in the catalog.
    Files are not a second copy; they are the same file in the same directory.
    Having two copies in the catalog, through an error when deleting explicitly the backups.
    We have to add the force clause to avoid the error.
    RMAN> delete FORCE backup tag 'offsite-1';
    The force clause ignores any I/O error.
    The delete is part of our scheduled offsite backup script, which returns a false positive error when the force clause is ommited.
    I don't want the force clause, in order to be notify if the backup set that are expected to be on disk are no more there, e.g., if someone had deleted files manually at the OS level bypassing rman.
    Is there a way to only catalog backup set not in the catalog?
    or May be remove the copy #2 entry from the catalog?
    Find bellow a test case example:
    RMAN> list backup summary TAG 'OFFSITE-1';
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time    #Pieces #Copies Compressed Tag
    12      B  F  A DISK        11-JUN-13 09:41:45 1       1       NO         OFFSITE-1
    13      B  F  A DISK        11-JUN-13 09:43:31 1       1       NO         OFFSITE-1
    14      B  A  A DISK        11-JUN-13 09:43:33 1       1       NO         OFFSITE-1
    15      B  F  A DISK        11-JUN-13 09:43:34 1       1       NO         OFFSITE-1
    RMAN> CATALOG START WITH 'C:\backups\offsite_disk\IBISdatabase\scheduled_offsite';
    searching for all files that match the pattern C:\backups\offsite_disk\IBISdatabase\scheduled_offsite
    cataloging done
    List of Cataloged Files
    =======================
    File Name: C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\scheduled_offsite\06OBTJEP_1_1
    File Name: C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\scheduled_offsite\07OBTJI3_1_1
    File Name: C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\scheduled_offsite\08OBTJI5_1_1
    File Name: C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\scheduled_offsite\09OBTJI6_1_1
    RMAN> list backup summary TAG 'OFFSITE-1';
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time    #Pieces #Copies Compressed Tag
    12      B  F  A DISK        11-JUN-13 09:41:45 1       2       NO         OFFSITE-1
    13      B  F  A DISK        11-JUN-13 09:43:31 1       2       NO         OFFSITE-1
    14      B  A  A DISK        11-JUN-13 09:43:33 1       2       NO         OFFSITE-1
    15      B  F  A DISK        11-JUN-13 09:43:34 1       2       NO         OFFSITE-1
    RMAN> DELETE BACKUP TAG 'OFFSITE-1';
    List of Backup Pieces
    BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
    24      18      1   1   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\06OBTJEP_1_1   <<--- same file
    30      18      1   2   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\06OBTJEP_1_1   <<--- same file
    25      19      1   1   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\07OBTJI3_1_1
    31      19      1   2   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\07OBTJI3_1_1
    26      20      1   1   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\08OBTJI5_1_1
    32      20      1   2   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\08OBTJI5_1_1
    27      21      1   1   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\09OBTJI6_1_1
    33      21      1   2   AVAILABLE   DISK        C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\09OBTJI6_1_1
    deleted backup piece
    backup piece handle=C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\06OBTJEP_1_1 RECID=24 STAMP=821470356
    deleted backup piece
    backup piece handle=C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\07OBTJI3_1_1 RECID=25 STAMP=821470356
    deleted backup piece
    backup piece handle=C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\08OBTJI5_1_1 RECID=26 STAMP=821470356
    deleted backup piece
    backup piece handle=C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\09OBTJI6_1_1 RECID=27 STAMP=821470357
    Deleted 6 objects
    RMAN-06207: WARNING: 4 objects could not be deleted for DISK channel(s) due
    RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
    RMAN-06210: List of Mismatched objects
    RMAN-06211: ==========================
    RMAN-06212:   Object Type   Filename/Handle
    RMAN-06213: --------------- ---------------------------------------------------
    RMAN-06214: Backup Piece    C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\06OBTJEP_1_1
    RMAN-06214: Backup Piece    C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\07OBTJI3_1_1
    RMAN-06214: Backup Piece    C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\08OBTJI5_1_1
    RMAN-06214: Backup Piece    C:\BACKUPS\OFFSITE_DISK\IBISDATABASE\SCHEDULED_OFFSITE\09OBTJI6_1_1

    Hi JM,
    Your demo with Oracle 10.2.0.5
    At line 36 you answered "No" to "Do you really want to catalog the above files (enter YES or NO)?".
    Just repeate your demo and answer Yes.
    Even if he might have replied with "YES" then also, the RMAN search for the files which it can recognize as a valid rman backup file. Else it would show the list of files which are not recognized by RMAN as a valid file.
    RMAN> catalog start with '/home/oracle/scripts';
    using target database control file instead of recovery catalog
    searching for all files that match the pattern /home/oracle/scripts
    List of Files Unknown to the Database
    =====================================
    File Name: /home/oracle/scripts/RMAN_BACKUP.sh
    File Name: /home/oracle/scripts/rman_clone.log
    File Name: /home/oracle/scripts/Db_Refresh.sh
    File Name: /home/oracle/scripts/rman_erp.scr
    File Name: /home/oracle/scripts/RMAN_14FEB.log
    File Name: /home/oracle/scripts/nid.sh
    File Name: /home/oracle/scripts/Full_Clone.sh
    File Name: /home/oracle/scripts/rman_staging.scr
    Do you really want to catalog the above files (enter YES or NO)? yes
    cataloging files...
    no files cataloged
    List of Files Which Where Not Cataloged
    =======================================
    File Name: /home/oracle/scripts/RMAN_BACKUP.sh
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/rman_clone.log
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/Db_Refresh.sh
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/rman_erp.scr
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/RMAN_14FEB.log
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/nid.sh
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/Full_Clone.sh
      RMAN-07517: Reason: The file header is corrupted
    File Name: /home/oracle/scripts/rman_staging.scr
      RMAN-07517: Reason: The file header is corrupted
    About the RMAN catalog, it will not catalog the same file twice. It will only catalog the files which are not known to the database.
    See this demo. (/backup/RMAN/STAGING/ is the location where all the backup pieces are.)
    RMAN> catalog start with '/backup/RMAN/STAGING/';
    searching for all files that match the pattern /backup/RMAN/STAGING/
    no files found to be unknown to the database
    This was the location based test, Another demo showing piece by piece catalogging .
    RMAN> list backuppiece '/backup/RMAN/STAGING/ERP_CNTRL_c-13949842-20130724-00';
    List of Backup Pieces
    BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
    1323    1321    1   1   AVAILABLE   DISK        /backup/RMAN/STAGING/ERP_CNTRL_c-13949842-20130724-00
    RMAN> catalog backuppiece '/backup/RMAN/STAGING/ERP_CNTRL_c-13949842-20130724-00';
    cataloged backup piece
    backup piece handle=/backup/RMAN/STAGING/ERP_CNTRL_c-13949842-20130724-00 RECID=1324 STAMP=821717283
    RMAN> list backuppiece '/backup/RMAN/STAGING/ERP_CNTRL_c-13949842-20130724-00';
    List of Backup Pieces
    BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
    1324    1321    1   1   AVAILABLE   DISK        /backup/RMAN/STAGING/ERP_CNTRL_c-13949842-20130724-00
    Hope its understandable, if any query please revert.
    Happy to Help.
    Thanks and Regards,
    Prashant

  • How to Sort Dimension in Pivot Table via Order Column which is changing like Factual values

    Hi,
    Recently in of our product offerings we got stuck on this following question:
    How to Sort Dimension based on the Order Value which Keeps Changing with Factual Values??
    We have a data source laid out as (example)
    In the above the “Order” columns are changing per
    Company/(DimensionA) for DimesnsionB.
    Instead what we want is: (But only if we can get the following result without putting the “Order” Column in the “Values” Section. 
    If there are any configurations that we can make to our power pivot model for the similar data set so that the
    DimesnionB in this case can be sorted by the Order column, would be greatly helpful to us. 
    Sample File:
    http://tms.managility.com.au/query_example.xlsx
    Thanks
    Amol 

    Hi Amol,
    According to your description, you need to sort dimension members in Pivot Table via order column, and you don't want the order column show on the Pivot table, right?
    Based on my research, we can sort the data on the Pivot table based on one of the columns in that table, and we cannot sort the data based on the columns that not existed on the Pivot table. So in your scenario, to achieve your requirement, you can
    add the column to pivot table and hide it.
    https://support.office.com/en-gb/article/Sort-data-in-a-PivotTable-or-a-PivotChart-report-49efc50a-c8d9-4d34-a254-632794ff1e6e
    Regards,
    Charlie Liao
    TechNet Community Support

  • Finding duplicates:Minus set operator in dealing with internal tables

    Dear experts,
    I am newbie to ABAP developement,i have been given an assignment to find the duplicate list of vendors in lfa table.
    Now duplicate list doesnot means that text tokens will be just exact to conclude them as duplicate ,it could also be like
    1111 Vendor ABC
    1222 ABC Vendor
    If anybody has clue ,how to work on such a problem ,plz come forward.
    Right now i just tried initially how to find exact duplicates,i found  on change command,it do works.
    Then i am trying a new way which should just do the same thing.
    I did as per this algorithm
    1.Compute wholesome list in one internal table itab1
    2.Used delete adjacent duplicates in itab2.
    3.I feel itab3=itab1-itab2 will contain all duplicates in itab3.
    Can anyone give me a hint.How can i do A-B ?.

    Hi Arul,
    There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
    Best regards, Sergei

  • Mapping - split followed by set operation

    Hi I'm trying to set up a mapping to use as part of testing my warehouse and need some help.
    Overview
    ======
    I have a number of different databases that combine through to my operational data store. One verification of our mappings is a simple check of record counts, source table vs target.
    Because table names differ between source and target I have loaded (from a flat file) a translation table that maps one table name to another.
    I have external SQL scripts that run on a scheduled basis to capture table names, record counts and date of last update from the system tables of four of my source databases and my target database. (soon I'll need to try and replace these with OWB scripts)
    I am trying to build a mapping to conform these so I end up with a single fact listing target table, record count, update date, source table, source environment, record count, update date.
    I have taken my statistics on the target database, outer Joined it to the translation table (not all target tables have matching translation table records)
    Then split the result set by target environment (and remainder)
    Then I join each result set to the statistics for the appropriate source.
    Next I am using a set operation to union all the results back to my conformed result.
    My Problem
    =========
    Those tables in the target database that do not correspond to a table in one of the four sources cause a problem. (they are either summary facts, flat files loaded or sourced from other databases I have not got statistics on yet)
    I can’t just link from the split’s output set to the set operation because the other joins have added extra fields for number of records in the source. The documentation is very clear that the same fields must exist in the same order and datatype.
    I have been trying to work out which mapping operation/s will produce the equivalent of SQL like “select col1, col2, null, sysdate, null from mytable”
    Hmm as I type this up I think another alternative may be to output extra fields in the split (so it looks like the dataset after the join) but not to pass these fields on in the join for sets for specific environments. I’ll try that alternative but would still like help with which mapping operator I could have used.

    Can I have a little bit more technical information : A small exmaple would be very helpful.
    Regards
    -Arnab

  • Changing attribute order in a mapping operator

    Is there a way that I can easily change the position or order of a mapping operator or object (e.g. Joiner object) without having to remove all the attributes in an object, and then either entering them manually or pulling them from the source to the mapping object (the target).

    Hi Kurt,
    Unfortunately that is not possible, operator attributes always show in the order you created it.
    Only tables, views, snapshots, dimensions and cubes allow to change the order of their attributes, but then only in their respective editors, not in a mapping.
    Regards, Patrick

  • Sort Order Column not Working

    I have set a sort order column on one of A VARCHAR field, but the functionality is not working. The sorting is enabled in the table view and when I sort by the said column it still sorts based on the VARCHAR values of the column instead of the other INT column I want to sort by. The logical SQL and physical query never even includes the column to sort. Are there any exceptions for the 'Sort Order Column' setting? Is there a config setting or data connections setting that I need to check to make this work?
    Thank You!
    Edited by: VNC on Oct 3, 2011 9:08 AM

    hi,
    can you give me more detailes like some sample column data like below kind
    Like Ex: varchar month column it sould display based on month id
    month : Fev-2011,Dec-2011,jan-2011 and month id 1 to 12
    set your month id as sort order column of month name.
    double click month name ->In general tab set the sort order column as month id
    FYI...see the sample link
    http://www.biconsultinggroup.com/obiee-tips-and-tricks/setting-a-sort-order-column.html
    i hope helped you
    THanks
    Deva
    Edited by: Devarasu on Oct 4, 2011 12:39 AM

  • Sort order column with a between filter

    Hi all,
    [using OBI-EE version 10.1.3.3.1]
    I've got a column 'BLOCK_ROW' which contains values A,B,C....AA,AB,AC...BA,BB...FK,FL
    Alphabetically this orders A,AA,AB.... which is incorrect. The order should be A,B,C...
    To be able to sort correctly we added a column 'ROW_SORT' to our model, which is numeric. This column is set as the 'sort order column' in the repository and makes sure the sorting is done correctly.
    So far, so good...
    Now, I want to be able to use a 'between' filter on this column, e.g. between 'A' and 'C'. Unfortunately this returns A,B,C,AA,AB... while I want it to return A,B,C.
    Is this possible?
    Thanks,
    Elio
    Generated SQL:
    select distinct T91353.BLOCK_ROW as c1,
    T91353.ROW_SORT as c2
    from
    <table_name> T91353
    where ( T91353.BLOCK_ROW between 'A' and 'C' )
    order by c2
    --> Sorting handled based on ROW_SORT, between filter not :(

    That will only do the trick in this particular example. Between 'A' and 'AA' will fail again and only returns A and AA while it should return A..Z and AA.
    Using extra filters is always possible but I'm looking for a more robust solution, which also allows for dashboard 'between' prompts based on this column.
    A workaround I came up with is to add a calculated field which concats an '_' in front of the single 'digit' values. This results in: A,B,_C,.....,AA,AB....FL. This set can be ordered alphabetically and this will work for now.
    In the future, however, it might happen that the order of the letters will completely change. In the datamodel this can be achieved by changing the order of the numbers in ROW_SORT.
    Example dataset:
    BLOCK_ROW | ROW_SORT
    Q | 1
    D | 2
    F | 3
    AA | 4
    A | 5
    The filter 'between D and AA' should then result in D,F,AA.
    Any suggestions?
    Thanks,
    Elio

  • Doing set operations on Result Sets

    Hi all
    I am trying to make a table synchronization application.As far as specs go, There can be two similar tables in two different databases I will run a query on both the databases which will fetch me two separate resultsets, now I want to try doing set operations on this result sets like union, intersection etc. Is it at all possible? Is there a way to compare two resultsets efficiently? Can I some how tell my two resultsets to get the records which are not the same in both?

    Not efficiently, no.

Maybe you are looking for

  • Time Machine fails when trying to backup

    I have a macbook running 10.5.8.  I am trying to use time machine with my iomega external hard drive but I keep getting an error that the backup failed.  I have been successful with backups in the past with this same hard drive.  Any ideas what's goi

  • How-to: add spotlight tags when printing to PDF

    Hello, I have an extensive knowledge base of articles that I store in one central folder. I would like to have the option of adding (predefined) spotlight tags in the process of doing this, so as to be able to use smartfolders in my knowlegde base to

  • After itunes and q/time upgrade I get an error #63440

    after the itunes and q/time upgrade whenever I try to acsess anything via q/time i get an error #63440 quick time was not found even though it is on my machine and I have removed and re-installed.

  • Windows to Mac + transferring ratings

    Hi guys, i'm currently using my ipod on my Windows PC which is about to pack up (based on the sounds it's making) and so i'm going to purchase a mac (iBook). I've pretty much got the transfer sorted (backed it all to CD/ DVD should the PC blow up) an

  • Robohelp displays twice in IE 9 when used in an iFrame

    I am building an application for a client who needs to be able to control access to their Robohelp content.  I am doing this by displaying the Robohelp content inside of an iframe in another page (ASP.NET).  The problem is the entire Robohelp framese