A question in the query

Hi,
i would lke to display 2 rows and 2 columns in the query.
2 rows: material nr and year
2 columns: Total amount for whole year and a quarter of this year
eg.      material nr    year      amount for 2010    amount for 4. quarter 2010
           0000021      2010       50000                        12000
iput variable is  calenderyear. I think that we could do it.
but i have a question about row and column.  In my row there is only Calenderyear.  In my columns there are amount for year and this year's quarter. I would like to know if the data for 4. quarter will be displayed , because  row represents calender year und the column repesents 4. quarter 2010?
Thanks!
Edited by: gang qin on Jan 15, 2011 1:00 PM

Hi:
Your question is a little confusing. Are you wanting to display all 4 quarters. Not just the current quarter?
If you are already displaying the amount for the year and the current quarter. You can add 3 more restricted key figures restricted by current calendar quarter and then offset those 3 restricted key figures by -1 -2 and -3 respectively to get the 3 prior quarters.
If you want to display Qrtr 1 Qrtr 2 Qrtr3 and Qrtr 4 and not the past 4 quarters, then you need to have a info object for cal quarter in your info provider and then create 4 restricted key figures - each restricted to Qrtr 1 Qrtr 2 Qrtr 3 and Qrtr 4.
I am not sure if Calendar Quarter is a standard object available. If not you have to model it.
Hope this helps.
MP.

Similar Messages

  • Some question about the query designer

    hello, dear all,
    I am a new comer of here, and I am intersting in BI, but I have no basic knowledge about it.
    so I just want someone could give me some advice about it.
    our boss need I do the developer about the query designer,  I just have searched in this forum. but nothing founded for I am a new comer here,
    I heard there are some training document of the query designer, could someone give me the URL, thanks.

    Hi,
    Query desinger is used to develop a Query, Query can be created on following data targets
    -Info Cube
    -DSO
    Virtual data target
    -MultiCube
    -Infoset
    -Multiprovider
    We have 5 section in query designer
    - Infoprovider : where we select the data target , on which report to be created
    -Filter : to restrict value at infoprovider level ( if you want data for year 2008, for example)
    -Free Characterstic : this allow you to drill down
    -Columns : char/keyfigs to be display in columns can be added here
    Row: key/char to be display in Rows can be added here
    gv me ur mailid i will let u have Bex manual,
    I would suggest , if you have any IDES ( training ) system , where you can log in and then go to RRMX,
    and try to create new query and add any data target ( which is already created ) and then drag and drop the char/key fig to the required section ,
    save it and execute it .....
    if you play arround and see the output , that would help u to understand how to work with query designer.
    Hope this helps
    Sukhi
    Edited by: Sukhvidner Singh on Nov 4, 2009 5:36 PM

  • Two questions about the query and lsmw .

    Hi Experts ,
    Could you tell me how to download the query to local driver ? is it possible to do that ?
    I hear somebody introduce lsmw this t-code . it can transfer the data from non-sap/r3 system ? has somebody can fully expain this t-code ?
    Many thanks !!!
    Best Regards,
    Carlos Z

    Hi,
          LSMW – Step by Step Guide: Legacy System Migration Workbench is an R/3 Based tool for data transfer from legacy to R/3 for one time or periodic transfer.
    Basic technique is Import data from Spreadsheet / Sequential file, convert from source format to target format and import into R/3 database. LSMW not part of standard R/3, if we need this product email [email protected]
    Advantages of LSMW:
        • Most of the functions are within R/3, hence platform independence.
       • Quality and data consistency due to standard import techniques.
       • Data mapping and conversion rules are reusable across projects.
       • A variety of technical possibilities of data conversion.
       • Generation of the conversion program on the basis of defined rules
       • Interface for data in spreadsheet format.
       • Creation of data migration objects on the basis of recorded transactions.
       • Charge-free for SAP customers and partners.
    Working With LSMW:
    Use TCODE LSMW
    Objects of LSMW:
      •Project   – ID with max of 10 char to Name the data transfer project.
      • Subproject   – Used as further structuring attribute.
      • Object   – ID with max of 10 Characters, to name the Business object .
      • Project can have multiple sub projects and subprojects can have multiple objects.
      • Project documentation displays any documentation maintained for individual pop ups and processing steps
    User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
    Object type and import techniques:
      • Standard Batch / Direct input.
      • Batch Input Recording
          o If no standard programs available
          o To reduce number of target fields.
          o Only for fixed screen sequence.
        • BAPI
        • IDOC
          o Settings and preparations needed for each project
    Preparations for IDOC inbound processing:
        • Choose settings -> IDOC inbound processing in LSMW
        • Set up File port for file transfer, create port using WE21.
        • Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
        • Setup partner type (SAP recommended ‘US’) using WE44.
        • Maintain partner number using WE20.
        • Activate IDOC inbound processing.
        • Verify workflow customizing.
    Steps in creating LSMW Project:
        • Maintain attributes – choose the import method.
        • Maintain source structure/s with or without hierarchical relations. (Header, Detail)
        • Maintain source fields for the source structures. Possible field types – C,N,X, date, amount and packed filed with decimal places.
        • Fields can be maintained individually or in table form or copy from other sources using upload from a text file
        • Maintain relationship between source and target structures.
        • Maintain Field mapping and conversion rules
        • For each Target field the following information is displayed:
          o Field description
          o Assigned source fields (if any)
          o Rule type (fixed value, translation etc.)
          o Coding.
          o Some fields are preset by the system & are marked with Default setting.
        • Maintain Fixed values, translations, user defined routines – Here reusable rules can be processed like assigning fixed values, translation definition etc.
        • Specify Files
          o Legacy data location on PC / application server
          o File for read data ( extension .lsm.read)
          o File for converted data (extension .lsm.conv)
        • Assign Files – to defined source structures
        • Read data – Can process all the data or part of data by specifying from / to transaction numbers.
        • Display read data – To verify the input data being read
        • Convert Data – Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
        • Display converted data – To verify the converted data
    Import Data – Based on the object type selected
        • Standard Batch input or Recording
          o Generate Batch input session
          o Run Batch input session
        • Standard Direct input session
          o Direct input program or direct input transaction is called
    BAPI / IDOC Technique:
        • IDOC creation
          o Information packages from the converted data are stored on R/3 Database.
          o system assigns a number to every IDOC.
          o The file of converted data is deleted.
        • IDOC processing
          o IDOCS created are posted to the corresponding application program.
          o Application program checks data and posts in the application database.
    Finally Transport LSMW Projects:
        • R/3 Transport system
          o Extras ->Create change request
          o Change request can be exported/imported using CTS
        • Export Project
          o Select / Deselect part / entire project & export to another R/3 system
        • Import Project
          o Exported mapping / rules can be imported through PC file
          o Existing Project data gets overwritten
          o Prevent overwriting by using
        ‘Import under different name
        • Presetting for Inbound IDOC processing not transportable.
    Regards

  • Question about the Query Optimizer

    For an Excercise during my database lecture the following table
    CREATE TABLE TASKS
        "ID" NUMBER NOT NULL ENABLE,
        "START_DATE" DATE,
        "END_DATE" DATE,
        "DESCRIPTION" VARCHAR2(50 BYTE)
    ) ;with about 1.5 Million Entries were given. In addition there was the following Query:
    SELECT START_DATE, COUNT(START_DATE) FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE;And the Index:
    create index blub on Tasks (start_date asc);The main excercise was to speed up queries with indexes. Because all data is accessed the optimizer ignores the index and just did a full table scan.
    Here the QEP:
    | Id  | Operation          | Name  | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                                
    |   0 | SELECT STATEMENT   |       |  9343 | 74744 |  3423   (6)| 00:00:42 |                                                                                                                                                                                                                                
    |   1 |  SORT GROUP BY     |       |  9343 | 74744 |  3423   (6)| 00:00:42 |                                                                                                                                                                                                                                
    |   2 |   TABLE ACCESS FULL| TASKS |  1981K|    15M|  3276   (2)| 00:00:40 |                                                                                                                                                                                                                                
    ----------------------------------------------------------------------------Then we tried to force him to do the index with this query:
    ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_1;
    SELECT /* + INDEX (TASKS BLUB) */ START_DATE, COUNT(START_DATE) FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE;but again it ignored the index. The optimizer guide states clearly, that each time you access all data from a table it has to do a full scan.
    So we tricked him in doing a fast index scan with this query:
    create or replace function bla
    return date deterministic is
      ret date;
    begin
      select MIN(start_date) into ret from Tasks;
      return ret;
    end bla;
    ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_1;
    SELECT /* + INDEX (TASKS BLUB) */ START_DATE, COUNT(START_DATE) FROM TASKS
    where start_date >= bla
    GROUP BY START_DATE
    ORDER BY START_DATE; now we got the following QEP:
    | Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                               
    |   0 | SELECT STATEMENT     |      |     1 |     8 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                               
    |   1 |  SORT GROUP BY NOSORT|      |     1 |     8 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                               
    |*  2 |   INDEX RANGE SCAN   | BLUB |     1 |     8 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                               
    ----------------------------------------------------------------------------- So it do use the index.
    Now to my two questions:
    1. Why should it always do a full scan (because the optimizer documentation answer is a little bit unsatisfying)?
    2. After looking at the difference between the costs (FS: 3276 IR: 3) and the time the system needs (FS: 9,6 sec IR: 4,45) why does the optimizer refuse the clearly better plan?
    Thanks in advance,
    Kai Gödde
    Edited by: Kai Gödde on May 30, 2011 6:54 PM
    Edited by: Kai Gödde on May 30, 2011 6:56 PM

    John Spencer mentioned already the most important point (the role of NULL values) but here are some minor additions:
    * with the additional NOT NULL condition Oracle will do an INDEX FAST FULL SCAN (a multiblock scan of the index segment, similar to a FULL TABLE SCAN)
    * with the additional NOT NULL condition you don't need a hint and Oracle will choose the IFFS access
    * if the index was a bitmap index you would not need a NOT NULL condition because Oracle stores NULL-values in bitmap indexes (but you should not define bitmap indexes in an OLTP system because they bring massive locking issues)
    * if the index would contain a second value the additional NOT NULL condition would also be needless
    CREATE TABLE TASKS
        "ID" NUMBER NOT NULL ENABLE,
        "START_DATE" DATE,
        "END_DATE" DATE,
        "DESCRIPTION" VARCHAR2(50 BYTE)
    insert into tasks
    select rownum
         , case when mod(rownum, 5) = 0 then null else sysdate - round(rownum/100) end
         , case when mod(rownum, 4) = 0 then null else sysdate - round(rownum/50) end
         , lpad('*', 50 , '*')
      from dual
    connect by level <= 1500000;
    exec dbms_stats.gather_table_stats(user, 'TASKS')
    -- the IFFS access without a hint:
    create index blub on Tasks (start_date);
    SELECT START_DATE
         , COUNT(START_DATE)
      FROM TASKS
    WHERE START_DATE IS NOT NULL
    GROUP BY START_DATE
    ORDER BY START_DATE;
    | Id  | Operation             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |      | 15001 |   102K|  1871  (16)| 00:00:10 |
    |   1 |  SORT GROUP BY        |      | 15001 |   102K|  1871  (16)| 00:00:10 |
    |*  2 |   INDEX FAST FULL SCAN| BLUB |  1200K|  8203K|  1631   (3)| 00:00:09 |
    Statistiken
              0  recursive calls
              0  db block gets
           3198  consistent gets
              0  physical reads
              0  redo size
         378627  bytes sent via SQL*Net to client
          11520  bytes received via SQL*Net from client
           1002  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
          15001  rows processed
    -- the bitmap index
    create bitmap index blub on tasks(START_DATE);
    SELECT START_DATE
         , COUNT(START_DATE)
      FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE
    | Id  | Operation                    | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |      | 15001 |   102K|   132   (1)| 00:00:01 |
    |   1 |  SORT GROUP BY NOSORT        |      | 15001 |   102K|   132   (1)| 00:00:01 |
    |   2 |   BITMAP CONVERSION TO ROWIDS|      |  1500K|    10M|   132   (1)| 00:00:01 |
    |   3 |    BITMAP INDEX FULL SCAN    | BLUB |       |       |            |          |
    Statistiken
              1  recursive calls
              0  db block gets
           1126  consistent gets
              0  physical reads
              0  redo size
         378682  bytes sent via SQL*Net to client
          11520  bytes received via SQL*Net from client
           1002  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          15002  rows processed
    -- the composite index
    create index blub on tasks(START_DATE, 0);
    SELECT START_DATE
         , COUNT(START_DATE)
      FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE;
    | Id  | Operation             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |      | 15001 |   102K|  2400  (15)| 00:00:12 |
    |   1 |  SORT GROUP BY        |      | 15001 |   102K|  2400  (15)| 00:00:12 |
    |   2 |   INDEX FAST FULL SCAN| BLUB |  1500K|    10M|  2095   (3)| 00:00:11 |
    Statistiken
              0  recursive calls
              0  db block gets
           4120  consistent gets
              0  physical reads
              0  redo size
         378682  bytes sent via SQL*Net to client
          11520  bytes received via SQL*Net from client
           1002  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
          15002  rows processedRegards
    Martin Preiss

  • Question in SAP QUERY- SQ01,SQ02,SQ03

    Hi SAP QUERY Experts,
    I have a question for the query. Is it possible using a interface parameter for report-to-report interface? I mean when I double click on one the data record of query, I want to transfer the key information of this record to the query or report or transaction as parameters. Is it possible? If yes, could you tell me how?
    This is on SQ01, SQ02,SQ03
    Thanks and Regards
    Saravana

    hi all,
    i am having one abap standard query, i have to modify that one and i have to include another colum which needs the requirment.
    07 Depreciation /SAPQUERY/AM07 ADA FIAA - DEPRECIATION
    the above i mentioned is the query, how ever i tryed this standared to copy but i am not able to connect infoset and all stuff.
    pls guide me how to insert additional colum in that standard report or query.
    pls guide me
    thanks and regards,
    sai

  • Another BW question about filter in the query definition

    Hi ,
    I have another question about filter in the query definition.
    <u>Question:</u>
    Which of the following objects can be filtered in the query definition?
    A. characteristic
    B. Key figure
    C. Structure
    D. Units
    E. Hierarchy
    My answer is A,B,D,E.
    The answer in the book is A,B,D
    Can anybody tell me which one is wrong?
    Thanks in advance,
    Liu Jia

    HI
    1.The answer could be A,B,D.you can not apply filters on hierarchies
    2.Whenever there is a change in Attribute data(like Location,Num etc...)that has to be reflected in all aggregates of the cube.Thsi can be done by running "ATTRIBUTE CHANGE RUN".
    sri

  • The Query Question.

    Hi everyone.
    I created a Query button. And the MB's code is:
    ApplicationModule am=ADFUtils.getApplicationModuleForDataControl("HrModuleDataControl");
    ViewObject vo=am.findViewObject("HrHumanView1");
    int tmp=vo.getCurrentRowIndex();
    vo.setNamedWhereClauseParam("HumanSort","abc");
    vo.executeQuery();
    vo.setCurrentRowAtRangeIndex(tmp);
    There is 100 records in my database,and the view of HumanSort='abc' have 30 records. If I execture other query operate, for instance,there is 70 records left, next I execture this query operate, the result doen't query from the 70 records,it still query from 100 records.
    And on other page, I have a button used the same MB's method. It query from the 70 records.
    I don't understand it.
    I have already set the task flow 's Data Control Scope to shared.
    Help me.Thanks.

    I didn't quite understand the problem that you are having, sorry.
    First, you can accomplish what your code above is trying to do using declarative features of ADF. The ExecuteWithParams built-in operation assigns values for named bind variables of a view object then re-executes the query.
    You need to provide a bit more details about what you mean by "I execute other query operation" (how was this first step achieved? declaratively? using code?) followed by "next I execute this query operation" (assuming you mean the code that sets the bind variable value).
    It sounds as if you're expecting the second query to further-filter the results of the first query, but I need to understand better what you did in the first step to let you know if what you're seeing is expected behavior or not.

  • Spool file problem,Can't see the query in output file.

    Hello ,
    I am facing a very old school kind of problem .....about spool file ....
    The scenario -
    I have made a script by name DB_Status_checkup.sql which i want to fire on the database to check the database status. In this script their are many queries regarding the data dictionary views to know about the database. It consist of nearly 25-30 different select queries..
    The problem is i want to make a spool file of the output of that query....i want to see the SQL query & the output below in the spool file, so it will be easy for me to judge the result. But i can't see the SQL query , i can only see the output , & in so many queries it all gets jumbled up....even i can't understand where the next output starts ...
    Sample of my SQL Script ....
    clear buffer
    spool D:\DB_status.txt
    /*To check the database startup time*/
    Select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time"
    from v$instance
    .........next query n so on....
    spool off;
    In the output pf the spool file at D:\db_status.txt..
    Startup time
    08:25 16-JUL-10It shows only the output of the query in the spool file not the query,
    What should i do to get the SQL query as well as the output of that query just below it in the spool file ???
    Please suggest if you have anymore ideas , regarding this .....
    ORACLE 10g R2
    Windows Server 2008
    Thanks in advance ...

    Why don't you just use database control, instead of re-inventing the wheel?
    Apart from that, SQL*Plus has it's own reference manual, which you apparently refuse to read.
    The answer to your quiz/doc question is
    set echo on
    Sybrand Bakker
    Senior Oracle DBA

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • A few Questions on ABAP Query

    Hi Guru's
    I would like to ask some questions on ABAP query.
    1. Can you transport abab queries? Should it only be Global or you can also transport Standard Areas?
    2. Once transported, am i able to change query?
    Thanks,
    Jograd

    hi....
    you can transport a quary but for that the quary should be an object itself or attached to some object
    and
    if once transported to production....you cannot change it there and for changing you have to get it in developement sysytem and then make any change.
    regards

  • Questions on the ODT Tool enhancements

    First of, great job on the ODT. It installed no problem and I like the new query window and the ability to run functions and procdures with test params. A couple of questions on the future of the product:
    Are you guys going to be adding more functionality to the query window making it more like SQL*Plus?
    Also is the an expected time frame for the PL/SQL Debugger and the .Net/CLR Extensions to the database?
    Will there be sessions on the .Net/CLR extension at the upcoming Openworld?
    Thanks in advance and keep up the great work,
    Al

    Are you guys going to be adding more functionality to the query window making it more like SQL*Plus?
    Our goal is not to match SQL*Plus feature for feature, no.
    If there are features that are missing that you wish were there, let me know.
    Also is the an expected time frame for the PL/SQL Debugger and the .Net/CLR Extensions to the database?
    PL/SQL Debugger - end of 2005
    .NET/CLR Extensions - when Oracle 10g Database Release 2 for Windows ships
    Will there be sessions on the .Net/CLR extension at the upcoming Openworld?
    Almost certainly... I'll be demoing it at Teched Amsterdam in 3 weeks as well.

  • NOt able to get text value for 0calmonth in the query

    hi,
    I am not able to get the test for the calmonth in the selection screen of the Query.
    i.e If the user enter the value 01/2010 as input in the selection screen. I am not able to get its text Janurary 2010 displayed in the selection screen of the query.
    please let me know what could be the reason for this.
    regards,
    Mahesh

    Hi Mahesh,
    I regret to inform you there is no option to display the month text.
    The system works as designed. The "Key and text" option for the      
    infoObject is for display the technical name and the description.                                                                               
    I found a customer on SDN which the same doubt and the answer for your
    question. Please, check the link below:                                                                               
    0calday text variable        
    Best Regards,
    Des

  • How to modify the query to get the output in a single row

    Hi All,
    Below is the query i have written it works fine
    select DISTINCT right(left(CTACCT,13),4) AS LocationNum,
    tODS_GLBalance.FiscalYearId AS FiscalYearId,
    tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
    --tods_GLMetadata.Metric,
    Case when
    tods_GLMetadata.Metric = 'Gross Margin'
    Then SUM(Balance)
    Else 0
    END AS GrossMargin,
    Case when
    tods_GLMetadata.Metric = 'Occupancy'
    Then SUM(Balance)
    Else 0
    END AS Occupancy,
    Case when
    tods_GLMetadata.Metric = 'Payroll Dollars'
    Then SUM(Balance)
    Else 0
    END AS Payroll,
    Case when
    tods_GLMetadata.Metric = 'CF Sales'
    Then SUM(Balance)
    Else 0
    END AS OperatingSales,
    Case when
    tods_GLMetadata.Metric = 'Operations'
    Then SUM(Balance)
    Else 0
    END AS OperatingExpenses
    -- 0 as payroll
    from ods.[JJill].[tODS_GLBalance]
    inner join ods.Staging.tODS_INF_GLPCT ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
    inner join ods.JJill.tods_GLMetadata ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
    where
    (tODS_GLBalance.FiscalYearId = 2012) and
    (tODS_GLBalance.FiscalMonthOfYearId = 2) and
    (right(left(CTACCT,13),4)= 3020)
    group by
    right(left(CTACCT,13),4),
    tODS_GLBalance.FiscalYearId,
    tODS_GLBalance.FiscalMonthOfYearId,
    tods_GLMetadata.Metric
    This is the sample output,
    LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
    3020 2012 2 -112477.00 0.00 0.00 0.00 0.00
    3020 2012 2 0.00 0.00 0.00 -158288.94 0.00
    3020 2012 2 0.00 0.00 0.00 0.00 5625.44
    3020 2012 2 0.00 0.00 24185.79 0.00 0.00
    3020 2012 2 0.00 31075.53 0.00 0.00 0.00
    But, i am expecting the output to be something like this
    LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
    3020 2012 2 -112477.00 31075.53 24185.79 -158288.94 5625.44
    Can someone please help me with changing my query to get the desired output?
    Please let me know if you have any questions.
    Thanks

    Try this:
    SELECT DISTINCT
    RIGHT(LEFT(CTACCT,13),4) AS LocationNum, tODS_GLBalance.FiscalYearId AS FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Gross Margin' THEN Balance ELSE 0 END ) AS GrossMargin,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Occupancy' THEN Balance ELSE 0 END ) AS Occupancy,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Payroll Dollars' THEN Balance ELSE 0 END ) AS Payroll,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'CF Sales' THEN Balance ELSE 0 END ) AS OperatingSales,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Operations' THEN Balance ELSE 0 END ) AS OperatingExpenses
    FROM ods.[JJill].[tODS_GLBalance]
    INNER JOIN ods.Staging.tODS_INF_GLPCT
    ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
    INNER JOIN ods.JJill.tods_GLMetadata
    ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
    WHERE tODS_GLBalance.FiscalYearId = 2012
    AND tODS_GLBalance.FiscalMonthOfYearId = 2
    AND RIGHT(LEFT(CTACCT,13),4) = 3020
    GROUP BY right(left(CTACCT,13),4), tODS_GLBalance.FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId, tods_GLMetadata.Metric

  • Changing the query on a view object

    I have a view object right now, based on an entity. It is the default view object, so that means the query in the view object is straight forward, it grabs all of the attributes from the table. And there is no WHERE clause.
    In reality I only want to show a finite set of rows from my table. Every time a record is changed/edited in this entity and committed, a new row in the database is created with the same information (I'm using CreateWithParams) except for a few columns.
    I actually don't really have update on this table, just creation of new rows. But to the user, I want it to 'look' like they are editing something in the table.
    Example:
    12, 11:32,Thompson, 60 (the user edits this information in an adf table, and a new row is created in the db)
    12, 11:55, Thompson, 75
    I have a timestamp (see above) field in the database that is used as part of my primary key, so that I know which record is the latest.
    When the VO query is run, I want the user to only see the latest row from the db.
    12, 11:55, Thompson, 75
    So...
    I went to my VO, and I changed the WHERE query to add this:
    where t1.TimeStamp = (Select MAX(t2.TimeStamp) FROM rcl.x t2 where t1.uid = t2.uid);
    Now, this isn't a mysql/sql question. There's actually a better query that I'd rather run, but the VO editor doesn't allow me to change the query itself....
    When I save the new WHERE to my VO, run my page again, I get the expected result (showing me only the latest records).
    However, when I try and sort on the table in which my data is displayed, I am now getting ORDER BY errors.
    I don't want my VO to be read-only sql based. I want to be able to update my table, so I have my VO running off of the entity.
    Why doesn't the VO allow me to change the query itself? (Like do a subquery, instead of having my where clause do the work)
    Why are order by errors being thrown when I sort on my adf table after changing the where clause in my view?
    Hopefully I wasn't too convoluted in the explanation of my problem..
    Thanks in advance,
    Joel

    HI Joe,
    Regarding your problem you can do one of the following tasks:
    1- easily to tuning on your view object, I mean in the tuning page of the view you can set that only return 1 record or 2-3 record fetch not all the record.
    in the order by you will order by the timestamp field and descending.
    2- you can order by the timestamp descending and in the where clause only set the rownum<2 (will return the last record) you can also set rownum<5 and get the 4 last record etc.
    3-editing the view query in the expert mode is not advised at all because of many consequences that you will face.
    4- maybe it is not bat that you add a readonly view for the table you mentioned and every time you unpdate the entity just re-execute the read-only view.( this method maybe is good maybe is not it depends on your business logic)
    Regards.
    Edited by: Amir Khanof on Sep 3, 2010 11:11 PM

  • How to manage Locale info in the URL path, but not the query string

    We are building an application using Struts 1.1 and Tiles, on Oracle Application Server 10.1.3.3...
    I know this is a strange question... but we have a requirement to represent the locale info in the URL string using one of the following options:
    option 1: /eng/page.do?id=2 for english.../fra/page.do?id=2
    option 2: /page-eng.do?id=2 for english.... and /page-fra.do?id=2 for french
    We need to represent the 3 letter ISO lang code either in the directory structure, or suffix the page name (in our case, the struts action name)... we cannot replicate this using a parameter in the query string. I know this is odd, but that is what we are told to implement.
    Is there any robust way of implementing either option in Struts 1.1, JSP, JSTL etc...?
    Currently, we are looking at using a servlet filter to intercept the HTTP requests, parse the URL string, and extract the ISO lang value, and set locale and forward on the request.
    This poses a few problems... adding additional action mappings (page-eng... page-fra... page) to our struts-xml.config file to handle lang permuations... but the biggest issue is all the embedded html:link action values throughout our code...
    Because all our public facing URLs must comply with the rule, we need to change the html:link action to point to a different action, based on locale.
    Very inefficent, and I'm sure not industry standard best practice... we are using Tiles, and resource bundles for all our labels etc... but fall short in meeting this rule with regards to URLs and locale.
    Any advice or tips etc.. is greatly appreciated.

    The filter option sounds like a good solution. So it can receive the urls and parse them appropriately.
    You just need to take it one step further.
    Additional actionmappings in your struts-config should not be necessary.
    Filter:
    - analyses the url and sets the appropriate locale
    - adjusts the url such that the next level of the chain does not have to know anything about the locale being encoded in the url string.
    Thus your struts classes and mappings can remain unchanged
    /eng/page.do or /fra/page.do once through the filter should just look like /page.do to struts.
    That should get rid of half of your headache.
    Next the issue of generating urls.
    There are two approaches I can see here
    1 - use the filter approach again, this time with some post processing. Gather the generated HTML in a buffer, and do a find/replace on any urls generated, to put the locale encoding into them.
    2 - Customise struts to produce urls in this format. This would involve the html:link tag, and the html:form tag at the least (maybe others?). Get the source code for struts, and grab the html:link tag code. Extend that class to generate urls as you want them to be generated. I think you would need to extend the class org.apache.struts.taglib.html.LinkTag and override the protected method calculateURL. You would then have to edit/modify the struts-html tld to point the link tag at your classes rather than the standard ones.
    Option 1 is architecturally good because it gives you a well defined layer/border between having the locale encoded in the url, and not having it there. However it involves doing a find/replace on every html going out. This would catch all urls, whether generated by html:link tag or not.
    Option 2 requires customising struts for your own requirements, which may be a bit daunting, but has the advantage of generating the urls correctly without the extra overhead involved with option 1. Of course you would have to ensure that ALL urls are generated with the html:link tag.
    On reflection, I think option 1 is preferable, as both easier and quicker to implement, and doing a better separation in the architecture.
    Cheers,
    evnafets

Maybe you are looking for

  • Can I authenticate to multiple ASA5510's at the same time?

    All, In my company we have several networks that are segregated from the overall corporate LAN  (2 in the US, 2 outside of the US).  These are physically seperate networks on seperate subnets, but all of the computers on the 4 networks are on the sam

  • How to electronically add users

    I need to add over 1000 users for access to Instant Portal with a selection of rights falling into 5 basic groups. How can this be achieved electronically?

  • Account Transformations with wildcards

    Hi Forum, I was wondering if anyone knew if the 'source account' field within account transformations accepts wildcards or a property from the account dimension. Basically I have a number of accounts which classify as 'additions' and I want to transp

  • IPhone 3G 4.2.1 Downgrade help

    Hi please help me... I recently updated my iPhone to 4.1 and accidentally updated the baseband, thus losing my unlock... I then had to resort to updating to 4.2.1 to update my BB to 6.15.00. I then decided that 4.2.1 was too slow for me and decided t

  • CRM sales order line item change with ECATT

    Hi All, We have just started to use ECATT's and have a scenario where in a CRM sales order certain line item data needs to be updated as part of the test. The problem we have is in the selection of the line item. The filter option based on the line i