Swap columns in query

Hi All,
      We've a new query  that we are now using on a regular basis is missing a feature ability to swap columns in the query results pane.
All of our original queries/workbooks allow the user to "Swap" Column headings with other column headings. The above query does not offer this as an option or choice. Other existing column headings are absent from this selection.
Is there any way to activate this feature?
Thanks
BI Consultant

The order of columns in a strucure can be very easily changed in the BEx Excel Analyzer:
You can change the order in the Local Query definition, or in the Filter settings in the query output in Excel.
I had a look and it appears be more difficult in the Web Analyzer.
Without spending too much time on this issue, I did find a roundabout way to change the order of the structure columns:
- execute the query in the BEx Excel Analyzer
- change the column order as outlined above
- save the resulting workbook as a global view
- open (& refresh) the global view in the Web Analyzer.
You may need to create a number of views to satisfy the column orders desired by the users.
Hope this helps . . .

Similar Messages

  • Blank Column in Query

    Hi There
    Please advice me how to create a blank column in Query?
    Thanks in advance..
    Regards,
    Chandu.

    Hi
    I don't have any IO's regarding that.I just need create a column with some description then user can fill with data.
    How can i run that?
    Thanks in advance.
    Regards,
    Chandu.

  • The issue with using the multiple columns sub-query in WHERE clause

    Hi All,
    my database version is 10.2.
    the problem i am trying to deal with is that when I use multiple column sub-query in the WHERE clause of the SELECT statement, the actual row number returned from the sub-query is different from the whole statement.
    And what I found is that, whenever there is NULL in any of those columns returned from the SUB-QUERY, the outer query will just return NULL for that whole row.
    Here is an example:
    select empno, ename, job, mgr, hiredate, sal, deptno from EMP
    intersect
    select empno, ename, job,  mgr, hiredate, sal, deptno from t;
    7782     CLARK     MANAGER     7839     09-JUN-81     2450     10
    7839     KING     PRESIDENT  NULL  17-NOV-81     5000     10
    7934     MILLER     CLERK     7782     23-JAN-82     1300     10
    select * from EMP where (EMPNO, ENAME, job, MGR, HIREDATE, SAL, DEPTNO) in (
    select empno, ename, job, mgr, hiredate, sal, deptno from EMP
    intersect
    select empno, ename, job,  mgr, hiredate, sal, deptno from t);
    7782     CLARK     MANAGER     7839     09-JUN-81     2450          10     
    7934     MILLER     CLERK     7782     23-JAN-82     1300          10     If I specifically deal with the NULL situations for the columns which might return NULL, I can get the result right.
    select * from EMP where (EMPNO, ENAME, job, NVL(MGR,-1), HIREDATE, SAL, DEPTNO) in (
    select empno, ename, job, nvl(mgr,-1), hiredate, sal, deptno from EMP
    intersect
    select empno, ename, job,  nvl(mgr,-1), hiredate, sal, deptno from t);
    7782     CLARK     MANAGER     7839     09-JUN-81     2450          10     
    7839     KING     PRESIDENT  null   17-NOV-81     5000          10     
    7934     MILLER     CLERK     7782     23-JAN-82     1300          10     the problem is that, I feel this is a very lame way of handling it.
    So, I wonder or am asking if there is any better or standard way to do it?
    any help would be highly appreciated.
    Thanks

    Hi,
    As you discovered, INTERSECT treats NULL as a value, but IN does not.
    What you did with NVL is one way to handle the situation. If there was a chance that any of the columns could be NULL, then you might prefer something like this:
    select      *
    from      EMP
    where      ( EMPNO      || '~' ||
           ENAME      || '~' ||
           job           || '~' ||
           MGR           || '~' ||
           TO_CHAR (HIREDATE, 'DD-MON-YYYY HH24:MI:SS')
                    || '~' ||
           SAL           || '~' ||
           DEPTNO
         ) in (
              select  EMPNO      || '~' ||
                     ENAME      || '~' ||
                   job     || '~' ||
                   MGR     || '~' ||
                   TO_CHAR (HIREDATE, 'DD-MON-YYYY HH24:MI:SS')               
                        || '~' ||
                   SAL      || '~' ||
                   DEPTNO
              from     emp
             intersect
              select  EMPNO      || '~' ||
                     ENAME      || '~' ||
                   job     || '~' ||
                   MGR     || '~' ||
                   TO_CHAR (HIREDATE, 'DD-MON-YYYY HH24:MI:SS')               
                        || '~' ||
                   SAL      || '~' ||
                   DEPTNO
              from      t
             );This assumes that you can identify some string (I used '~') that never occurs in the strings in these tables.
    This is implicitly converting the NUMBERs. That's usually not a good thing to do. but explicitly converting them would make this even more tedious.
    You should explicitly convert any DATEs to strings, however. Depending on your default format, and your data, you might get away with implicit conversions even for DATEs, but don't bet on it.
    If you had to do this often, you might consider writing a user-defined function:
    delimited_string (empno, ename, job, mgr, hiredate, sal, deptno) would return a string like
    '7839~KING~PRESIDENT~~17-NOV-1981~5000~10'
    This will make the coding easier, but beware: it will make the execution slower.

  • Create Column in Query

    Using FK: 0balance
    I need to create a Column in Query to return the following
    Full Year Forecast
    Forecast to the end of the financial year, variable dependent on plan selected (Q1,2,3  or 4). If select Q2,3, or 4 then use Actual figures for months until the start of the plan. Eg if select Q2 then full year forecast will be Actual for April, May and June plus Forecast for July to March.
    Anyone have any ideas please?
    thanks

    Hi Smith,
    You can follow following approach.
    1. Create 2 KF's (KF1 & KF2) one for actual & other for Forcast (using restriction - Plan/Actual & for Quarter / Month).
    2. Use variables , say VAr1 & VAR2 (with Customer Exits) to populate values for Month/Quarter (for characteristic used in restriction in step 1) .
    3. Value for variables in step 1 will be populated based on value entered for variable VAR3 (this is for user entry Q1,2,3,4).
    4. Create KF3 as KF1+KF2.
    Regards
    SS

  • Java.sql.SQLException: Invalid column index Query: while using ROWNUM

    hi ,
    i am getting the invalid column index query error while executing following query .i m able to run it properly without using rownum but when i append rownum i m getting error.i m using apache queryrunner for execution of query.
    java.sql.SQLException: Invalid column index Query: select * from (
    SELECT
    TO_CHAR(A.REQ_FOR_RATING_ID) RFQID,
    TO_CHAR(F.COV_PLAN_ID) COVPLANID,
    B.FIRM_NAME FIRMNAME,
    B.PRIMARY_ZIP_CD ZIP,
    A.PRODUCR_CD PRODUCERCD,
    A.PRODUCR_NAME PRODUCER,
    H.COV_NAME COVDESP,
    C.SALE_OFFC_CD SALEOFFCCD,
    C.USR_OFFC_NAME USROFFC,
    C.USR_NAME USR,
    C.USR_REP_CD USRREPCD,
    to_char((SELECT TO_CHAR(COUNT(EMP_NBR)) COUNT FROM ROSTR_DATA WHERE ROSTR_ID = F.ROSTR_ID)) AS count,
    TO_CHAR(B.SIC_CD) SICCD,
    F.INDSTRY_TYPE_IND INDTYPEIND,
    TO_CHAR(F.MANL_SIC_FCTR_NBR) MANSICFACTOR,
    TO_CHAR(F.UW_OVERD_SIC_FCTR_NBR) UWOVERDSICFACTOR,
    TO_CHAR(G.AREA_FCTR_NBR) STRAREAFACTOR,
    G.COV_ID COVID,
    F.PLAN_APPRVL_STATUS_CD PLANAPPRVLCD,
    F.PLAN_PROGRS_STATUS_CD PLANPROGRESSSTATUSCD ,
    F.PLAN_SALE_ASSMNT_CD PLANSALEASSMTCD,
    F.CREATD_DT CREATEDDT,
    NVL(to_char(F.PLAN_RELSED_DT),' ') PLANRELSEDDT,
    TO_CHAR(F.PLAN_RELSED_BY_ID) PLANRELSEDBYID,
    TO_CHAR(F.PROPOSD_EFF_DT) PROPOSDEFFECTIVEDT,
    TO_CHAR(A.GRACE_PERIOD_NBR) GRACEPERIOD,
    A.RNWL_15_MONTH_IND FIFTEENMONTHRNWLIND ,
    I.CO_DESC_TXT COMPANYNAME ,
    NVL(to_char(F.PLAN_APPRVL_DT),' ') approvedDt,
                   (Select U.USR_NAME from USR_DETL U WHERE U.USR_ID = F.PLAN_RELSED_BY_ID) as planRelsedByName,
    (Select U.USR_NAME from USR_DETL U WHERE U.USR_ID = F.PLAN_APPRVR_ID) as approvedByName,
    '' createdByName,
    ROWNUM rnum
    FROM
    REQ_FOR_RATING A,
    FIRM B,
    USR_DETL C,          
    SALE_OFFICE D,
    QUOTE_SCENRIO E,
    QUOTE_COV G,
    COV_PLAN F,
    COV_LKUP H,      
    CO_LKUP I
    WHERE
    A.FIRM_ID = B.FIRM_ID AND
    A.SALE_REP_ID = C.USR_ID AND
    C.SALE_OFFC_CD = D.SALE_OFFC_CD AND
    A.REQ_FOR_RATING_ID=E.REQ_FOR_RATING_ID AND
    E.QUOTE_SCENRIO_ID=G.QUOTE_SCENRIO_ID AND
    G.QUOTE_COV_ID=F.QUOTE_COV_ID AND      
    G.COV_ID=H.COV_ID AND
    I.CO_CD = F.CO_CD AND
    TO_CHAR(F.CREATD_DT,'YYYYMMDD') > TO_CHAR(TO_DATE('07/16/2007', 'MM/DD/YYYY HH24:MI:SS'),'YYYYMMDD') AND
    TO_CHAR(F.CREATD_DT,'YYYYMMDD') < TO_CHAR(TO_DATE('10/16/2007', 'MM/DD/YYYY HH24:MI:SS'),'YYYYMMDD')
    and rownum <=?) where rnum >=? Parameters: [07/15/2007 00:00:00, 10/15/2007 23:59:59, 1117, 1]

    That's a SQL fault, not a JDBC/Java fault.

  • Please guide to improve the performance of XML column reading query.

    Hi Experts,
    The below query is taking 45 seconds to return 170 records.
    Due to selecting XMLTYPE column in query.
    select *
    from RANGE where WSNO = 3
    order by PREFERENCE desc;
    The total number of records in the table is 1060.
    Even it's a very small table why it's taking 45 seconds.
    Can anybody please help me on how to get the output in 2 to 3 seconds.
    I want all the columns from the table.
    The problem only with REST column XMLTYPE.
    If I am not selecting this column I am getting output in 1 to 2 seconds.
    I am posting the execution plan and DDL for table and index.
    PLAN_TABLE_OUTPUT
    Plan hash value: 3593186720
    | SNO  | Operation                    | EMPNAME                   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                        |    31 | 23281 |    21   (5)| 00:00:01 |
    |   1 |  SORT ORDER BY               |                        |    31 | 23281 |    21   (5)| 00:00:01 |
    |   2 |   TABLE ACCESS BY INDEX ROWID | RANGE                 |    31 | 23281 |    20   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | INDX_WSNO              |    31 |       |     1   (0)| 00:00:01 |
    Predicate Information (SNOentified by operation SNO):
       3 - access("WSNO"=3)
    CREATE TABLE RANGE
      SNO                              NUMBER,
      BUSNO                            NUMBER,
      EMPNAME                          NVARCHAR2(64),
      PREFERENCE                       NUMBER,
      TSNO                             NUMBER,
      MEMBER                          CHAR(1 CHAR) ,
      EQU                             CHAR(1 CHAR) ,
      REMAIL                          CHAR(1 CHAR) ,
      SSR                             CHAR(1 CHAR) ,
      SUB                             CHAR(1 CHAR) ,
      SPN                             CHAR(1 CHAR) ,
      SEMPNAME                        NVARCHAR2(128),
      FVL                             NUMBER(32),
      TVL                             NUMBER(32),
      ISD                             CHAR(1 CHAR),
      CHANGED                         NVARCHAR2(64),
      CDATE                           TIMESTAMP(6) ,
      UDBY                            NVARCHAR2(64),
      UDATE                           TIMESTAMP(6),
      LSTU                            CLOB,
      WSNO                            NUMBER,
      ASTN                            CHAR(1 CHAR),
      ASTNPL                          CHAR(1 CHAR),
      AVAF                            CHAR(1 CHAR),
      REST                            SYS.XMLTYPE
    TABLESPACE USERS
    PCTUSED    0
    PCTFREE    10
    INITRANS   11
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                NEXT             1M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    XMLTYPE REST STORE AS CLOB
          ( TABLESPACE  USERS
            ENABLE      STORAGE IN ROW
            CHUNK       8192
            PCTVERSION  10
            NOCACHE
            INDEX       (
              TABLESPACE USERS
              STORAGE    (
                          INITIAL          64K
                          NEXT             1
                          MINEXTENTS       1
                          MAXEXTENTS       UNLIMITED
                          PCTINCREASE      0
                          BUFFER_POOL      DEFAULT
            STORAGE    (
                        INITIAL          64K
                        NEXT             1M
                        MINEXTENTS       1
                        MAXEXTENTS       UNLIMITED
                        PCTINCREASE      0
                        BUFFER_POOL      DEFAULT
      LOB (LSTU) STORE AS
          ( TABLESPACE  USERS
            ENABLE      STORAGE IN ROW
            CHUNK       8192
            RETENTION
            NOCACHE
            INDEX       (
              TABLESPACE USERS
              STORAGE    (
                          INITIAL          64K
                          NEXT             1
                          MINEXTENTS       1
                          MAXEXTENTS       UNLIMITED
                          PCTINCREASE      0
                          BUFFER_POOL      DEFAULT
            STORAGE    (
                        INITIAL          64K
                        NEXT             1M
                        MINEXTENTS       1
                        MAXEXTENTS       UNLIMITED
                        PCTINCREASE      0
                        BUFFER_POOL      DEFAULT
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE INDEX INDX_WSNO ON RANGE(WSNO);
    CREATE UNIQUE INDEX RULE_EMPNAME ON RANGE(BUSNO, EMPNAME);
    Please help me how to improve the performance of this query.
    Thanks.

    Can you try something like this and check if its faster? (this is just my guess as I dont have your data )
    SELECT SNO,
           BUSNO,
           EMPNAME,
           PREFERENCE,
           TSNO,
           MEMBER,
           EQU,
           REMAIL,
           SSR,
           SUB,
           SPN,
           SEMPNAME,
           FVL,
           TVL,
           ISD,
           CHANGED,
           CDATE,
           UDBY,
           UDATE,
           LSTU,
           WSNO,
           ASTN,
           ASTNPL,
           AVAF,
           xmltype.getclobval (rest) rest
      FROM RANGE
    WHERE wsno = 3
    order by PREFERENCE desc;
    Cheers,
    Manik.

  • Does Coloring Of Rows and Column in Query effect the Performance of Query

    Hi to all,
    Does Coloring of Rows and Column in Query via WAD or Report designer , will effect the performance of query.
    If yes, then how.
    What are the key factor should we consider while design of query in regards of Query performance.
    I shall ne thankful to you for this.
    Regards
    Pavneet Rana

    There will not be any significance perofrmance issue for Colouring the rows or columns...
    But there are various performance parameters which should be looked into while designing a query...
    Hope this PPT helps you.
    http://www.comeritinc.com/UserFiles/file/tips%20tricks%20to%20speed%20%20NW%20BI%20%202009.ppt
    rgds, Ghuru

  • Update a single column in query only form

    Forms 9i, database 10g
    I am migrating the form from 6i to 9i. I have a form that is query only except for one field that can be updated. The main block1, based on a view, includes most of the person's personal data, none of which is updateable.. Another block2, based on a table, includes the 3 not-null colums that cannot be updated, and a remarks field, which can be updated. The block2 properties are set YES for insert, update, delete. The three non-updatable columns have properties set to NO for I,U and D, but the remarks column has I,U and D properties set to YES. When I enter data into the remarks field and press the Save on the Forms icon bar, I get error FRM-40508:unable to insert record and the ORA-00001:unique constraint. I don't should not be able insert and I don't want to, I just want to update one column.
    What am I not setting correctly in 9i? The same triggers and code works in 6i.
    Any suggestions are greatly appreciated.
    Vija

    No, there are no on-update triggers, but there are Post-Qry. I did run it in debug mode, but there is no good place to put a break point, since retrieval of the data works fine. Should I have key-commit trigger on the block to do the update?
    Vija

  • Update one column in Query only block

    Hi,
    I have a question regarding multi-record, multi-columns form block.
    A block has 100 columns (column1 to column100).
    We have two separate version of same form. In query only mode, update_allowed property of all the blocks in the form is False.
    But in query only form, one specifc column should be updateable.
    How can use Custom.pll to achive this functionality ?
    I tried following steps
    1. In when-new-item instance of column 54, wrote set_item_property and set_block_property
    2. Update allowed for block and specific item is True
    I know that Block property will override the property of items.
    Now all the items are updateable in query only form. But i want only one column updateable.
    Appreciate you valuable input on this.
    Thanks

    This is an eBusiness-related question, you should post it in the eBusiness-forum. From the "pure" forms point of view, set the Block as updateable and set all item except the one you want to be updateable to UPDATE_ALLOWED =PROPERTY_FALSE

  • SWAP COLUMNS AND ROW IN AN INTERNAL TABLE to display in ALV

    Hi ,
    I want to swap all the rows in an internal table with the column of the internal table to display it horizontally in ALV grid.
    e.g
    1     2   3  (field names)
    A    P   X
    B    Q   Y
    C    R    Z
    should look like :
    D       A   B     C
    E      P   Q    R
    F       X    Y    Z
    Where D , E, F in first column is already apended in new table.
    Or else is there a way to rotate the ALV grid so that it can display rows as columns & columns as rows.
    regards

    hi,
    i have an internal table which is like
    f1  f2 f3  f4 (column header)
    A  1  2   3
    B  4  5   6
    C  7  8   9
    the values in o/p table should be
    A B C  ( column header)
    1  4 7 
    2  5 8
    3  6 9
    Please help!!

  • Count column in query

    Hi all,
    I work with forms 6i and database oracle 8. I want to know if it's possible to count the number of column in a sql query. For exemple, i have : "select id, name, dtbirth from table". In this query, I have 3 column. But I don't know how can I get it! Someone can help me! please!
    best regards.

    You are in the wrong forum, try the database forum.
    Steven Davelaar,
    JHeadstart Team.

  • Function tuterial -  Mapping columns in Query of DI

    Hi friends
    I searched Internet to find a good tutorial to help me to write functions in DI, but couldn't find any. I need to write rules for mapping columns in Mapping Section of my query object, but honestly as I don't have a sample or tuterial , I've faced by too many errors.
    Could anyone introduce me a link to a good manual for writing mapping functions and custom function?
    Any help is greatly appreciated.

    (Have solved it by looping instead, but it'd be nice if I
    could get the more elegant UNION to work.)

  • How to swap column-data along with Table header

    Hi All!
    I found a smple JTableDemo.java class. When I run it it provided sorting on the table as well as Dragging Column-data along with Table header while swaping two columns-headers.
    I designed my own table and apply some changes to TableModel. Afterwords it swaps Table-Headers only, but not their respective columns.
    Can someone give me a clue for that, where the logical error may be?
    Thanx in Advance

    surprised.. since you have asked, it must have some more tricky issue. Any way what i thought of it
    in before insert on table2
    simply insert into table1 (cr_id) values (:new.cr_id_id);
    i assume that table1 pk does not generated through sequence
    proposed insertion will not violate the uniqueness and create another record only in table1
    what is thehidden agenda for not using simple before insert trigger as above.
    yours
    dr.s.r.bhattachar

  • Number of columns in query form

    I have an <af:query> component from a View Criteria. In the design it says "No search fields added." I have 10 query fields. I want to display 3 columns, with 4,2,4 fields respectively. If I set the property "Rows" to 3, it displays 4,4,2 fields in the three columns. Is there a way to achieve 4,2,4?
    I'm using JDeveloper 11.1.1.5.0

    I went into 'Set Source Order', but there are some non-transient attributes that were generated from the SQL query -- they cannot be moved up or down. I want to move some of them below some transient attributes at the bottom. Is this possible?

  • How can I access user defined column(in query) inside the trigger?

    Hi
    I have 3 unions and each query displays different records on some criteria. I also have a column hard-coded
    Ex:
    select a.col1, a.col2,
    add as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    change as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    del as update
    from table1 a
    where ...
    And I need to display a column in the report only if update is Add. I was thinking of writing a format trigger for that field. But I do not know how can I access this user defined column named update in the trigger?
    Any help?

    Try ":update" minus the double-quotes. Ex:
        IF :update = 'add' THEN
          RETURN(TRUE);
        ELSE
          RETURN FALSE;
        END IF;
    You'll want to place your hard-coded values in single-quotes. Ex:
        select a.col1, a.col2,
        'add' as update
    - Brian

Maybe you are looking for

  • Playlist has up to 50 empty play lists for some artists or albums that I have not put there?

    , & growing have spent at least 6 hours with ? supervisors 0 solutions also match, dups and deletes from my albums when used. I spend 80% time on Mac fixing 20% using. Also have soent over $400.00 having Mac in shop for corrupted files, programs move

  • Safari 5.1.7 Crashed every time I open it. How can repair or update to safari V6?

    Hi There!! I got this problem since I used appel migration assistance. In my old MBP 13" Os X 10.7.4 - 2,8 GHZ Intel Core i7 - I got safari (V.6), and in the new one MBP 15" Os X 10.7.4 - 2,6 GHZ IC i7 the version of safari its 5.1.7 The following re

  • Help with REGEX to block invalid characters

    I have a regex that is used to block unusual characters from being entered into a user name, so they can put pipes etc in there, I just want 0-9 and a-z (upper or lowercase), but I just noticed that it's not working. I am not up to speed on regex, I

  • Rogue AP/Adhoc/Client not showing up

    I was able to view rogue ap's, adhoc's and clients prior to upgrading to Cisco WCS 6.0.181 once I upgraded the rogues are no longer showing on my floorplans.  Do I have to restart the Location Appliance services? I have RLDP enabled and I ensured the

  • How to change localized numbers in iGrid V11.5

    Hi, we use MII Version 11.5SR4 and I have a client which use a german localization on his PC. When the user call an irpt page with an iGrid then this iGrid is displaying numbers for this german client allways with a comma for a decimal delimiter like