How to convert a Query to a Workbook

Hi Pioneers
             Could u plz tell me in steps how can we create a work book from a query??I am confused...
BR
Ravi
Message was edited by: Ravi Sekhar

Hi,
First is good to know which are the differences between query and workbook :
In a Workbook:
-You can have severals querys.
-You can format the report, change the font, colors,etc.
-You can write some Visual Code.
In order to transform a query into a Workbook :
-Open your Query
-After that, click on the save button and select "Save as new workbook" (you can save it into a role)
-After this, you can change the font, color (to do this, click in the Format Icon).
Asigns points if useful please.
Regards

Similar Messages

  • How can I insert Query in a Workbook

    Hi,
    I am new in BI 7.0. I am trying to insert a query in a workbook. but the tools button is not giving me the option to insert query like 3.X
    How can i insert query in 7.0
    Can anybody please give me the step by step instruction.
    Thanks in Advance

    1. Open BEx ANalyzer.
    2. Create new excel workbook by hitting the "New" icon in Excel.
    3. Logon to a backend BI system.
    4. Click the design mode icon.
    5. Put your mouse on a cell and insert a table.
    6. Assign a dataprovider to this table.
    7. Switch off design mode.
    Hope it Helps
    Chetan
    @CP..

  • How to convert MDX query to SQL

    Hi everyone,
    can you please suggest me, how to convert the below mdx query to sql query. can you please tell me what it is doing?
    CREATE MEMBER CURRENTCUBE.[Measures].[calculation]
     AS IIF(([Measures].[Clear Call Count],[Trouble Code].[Is Battery].&[Battery T-Code],[Service Provider].[Is Towmark].&[Towmark],[Provider Technician].[Is Towmark].&[Towmark]) = 0, NULL,
    ([Measures].[ Total Shipped],[Service Provider].[Is Towmark].&[Towmark],[Provider Technician].[Is Towmark].&[Towmark])/
    ([Measures].[Clear Call Count],[Trouble Code].[Is Battery].&[Battery T-Code],[Service Provider].[Is Towmark].&[Towmark],[Provider Technician].[Is Towmark].&[Towmark])),
    FORMAT_STRING = "Percent",
    VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Sale'; 
    Thanks
    Vishu

    Hi Vishu,
    As Olaf said, this is a calculated member which used in MDX script in your cube, we cannot execute it in SQL Server Management Studio directly. Here are some document about calculated members and MDX script for your reference.
    Defining Calculated Members
    MDX Scripting Fundamentals (Analysis Services)
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to convert Access query to Oracle?

    I am trying to convert this query into an Oracle 8i query: -
    SELECT *
    FROM EMPLOYEE
    LEFT JOIN ATTENDANCE ON EMPLOYEE.EMPID = ATTENDANCE.EMPID
    WHERE ATTENDANCE.COL1="#"
    AND ATTENDANCE.COL2>=#1/1/2007#
    AND ATTENDANCE.COL2<Now()
    GROUP BY EMPLOYEE.EMPID, EMPLOYEE.EMPNO;
    How do I put the above query in plain Oracle join operator (+) notation? Thanks for the help.

    Hi,
    Let us take a look at the solution you had suggested -
    EMPLOYEE.EMPID = ATTENDANCE.EMPID (+)
    AND ATTENDANCE.COL1="#"
    AND ATTENDANCE.COL2 >= TO_DATE ('1/1/2007','dd/mm/yyyy')
    AND ATTENDANCE.COL2< SYSDATE;
    Since we are outer joining ATTENDANCE but not using the (+) operator in the later filter conditions; it will still be a normal join i.e. it will not outer join on ATTENDANCE. That is my question.

  • How to convert my query to SQL Procedure

    Hi all,
    I am running an SQL Query in my page process to set few items on my page.
    begin
    declare
    l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
    begin
    IF APEX_APPLICATION.G_F01.COUNT = 0 THEN
    RAISE_APPLICATION_ERROR(-20001, 'Please select a email template to edit!!!');
    END IF;
    IF APEX_APPLICATION.G_F01.COUNT > 1 THEN
    RAISE_APPLICATION_ERROR(-20001, 'Please select a single email template to edit at a time!!!');
    END IF;
    FOR i in 1..APEX_APPLICATION.G_F01.count
    LOOP
    l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(APEX_APPLICATION.G_F01(i),'$');
    :P32_SUBJECT := l_vc_arr2(1);
    :P32_TYPE := l_vc_arr2(2);
    :P32_BODY := l_vc_arr2(3);
    END LOOP;
    end;
    end;
    It is running perfectly fine. Now i want to convert this query into custom procedure. I am writing follwing code to create SQL Procedure,
    create or replace
    procedure Edit_EmailTemplate as
    begin
    declare
    l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
    begin
    IF APEX_APPLICATION.G_F01.COUNT = 0 THEN
    RAISE_APPLICATION_ERROR(-20001, 'Please select a email template to edit!!!');
    END IF;
    IF APEX_APPLICATION.G_F01.COUNT > 1 THEN
    RAISE_APPLICATION_ERROR(-20001, 'Please select a single email template to edit at a time!!!');
    END IF;
    FOR i in 1..APEX_APPLICATION.G_F01.count
    LOOP
    l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(APEX_APPLICATION.G_F01(i),'$');
    v(P32_SUBJECT) := l_vc_arr2(1);
    v(P32_TYPE) := l_vc_arr2(2);
    v(P32_BODY) := l_vc_arr2(3);
    END LOOP;
    end;
    end;
    but it is not getting compiled. Do anyone know what the problem is???
    With Regards,
    Sunil Bhatia

    hey thanks,
    but my problem is not of creating,
    it has been created and i can see it in sql browser. but it is not getting compiled
    it is returning with the following error
    Compilation failed,line 18 (13:22:08)
    PLS-00306: wrong number or types of arguments in call to 'V'Compilation failed,line 18 (13:22:08)
    PL/SQL: Statement ignoredCompilation failed,line 19 (13:22:08)
    PLS-00306: wrong number or types of arguments in call to 'V'Compilation failed,line 19 (13:22:08)
    PL/SQL: Statement ignoredCompilation failed,line 20 (13:22:08)
    PLS-00306: wrong number or types of arguments in call to 'V'Compilation failed,line 20 (13:22:08)
    PL/SQL: Statement ignored
    my statement is
    create or replace
    procedure Edit_EmailTemplate as
    begin
    declare
    l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
    begin
    IF APEX_APPLICATION.G_F01.COUNT = 0 THEN
    RAISE_APPLICATION_ERROR(-20001, 'Please select a email template to edit!!!');
    END IF;
    IF APEX_APPLICATION.G_F01.COUNT > 1 THEN
    RAISE_APPLICATION_ERROR(-20001, 'Please select a single email template to edit at a time!!!');
    END IF;
    FOR i in 1..APEX_APPLICATION.G_F01.count
    LOOP
    l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(APEX_APPLICATION.G_F01(i),'$');
    v('P32_SUBJECT') := l_vc_arr2(1);
    v('P32_TYPE') := l_vc_arr2(2);
    v('P32_BODY') := l_vc_arr2(3);
    END LOOP;
    end;
    end;

  • How to convert nested query to join

    Hello All
    I wrote a query, at first i find the name of the highest mountain,then find its provience and then list of mountains in this porvience.please help me to convert it to a join or generally a standard form.thank you in advance.
    select mountain from geo_mountain where province=
    (select province from geo_mountain where mountain=(select name from mountain where height=(select max(height) from mountain)))
    mountain: name,height,...
    geo_mountain: mountain,country,province

    Hi,
    Welcome to the forum!
    Here's one way to do it:
    WITH     got_r_num     AS
         SELECT     name
         ,     RANK () OVER (ORDER BY  height  DESC)     AS r_num
         FROM     mountain
    SELECT  p.mountain
    FROM      got_r_num     r
    JOIN     geo_mountain  n      ON  n.name       = r.name
    JOIN     geo_mountain  p  ON  p.proivince  = n.province
    WHERE     r.r_num        = 1
    ;A slightly different approach, closer to what you posted, involves a 4-way join:
    (1) In a sub-query (let's call it got_max_height) find just the maximum height from mountain
    (2) Join got_max_height to mountain, to get all mountains with that height. (There may be a tie)
    (3) Join this to geo_mountain to get the province(s)
    (4) Join this to another copy of geo_mountain to get all mountains in the same province(s). This step is just like the self-join in the query I posted.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Point out where the query above is producing the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • How to convert sql query to oracle query?

    Hi all,
    Hope doing well,
    sir i am using oracle database where i am running my sql query in oracle. but this query is not working properly. i used sql developer translation scratch editor to convert that.
    it's converted but i am not getting the exact value.
    which i was getting in sql server.
    here is my query below:
    SELECT C.*,ISNULL(P.Comp_Name,'') + ' (' + ISNULL(P.Comp_ID,'') + ')' Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID Where C.Comp_ID='C02'
    please convert it into oracle so that i can use this query
    thanks in advance.

    Try --
    1. Use NVL instead of isNull
    2. Use *||* instead of +*
    /* Formatted on 9-13-2012 4:39:09 PM (QP5 v5.163.1008.3004) */
    SELECT c.*, NVL (p.comp_name, '') || ' (' || NVL (p.comp_id, '') || ')' parent
        FROM comp_master c LEFT JOIN comp_master p ON c.parent_id = p.comp_id
    WHERE c.comp_id = 'C02'
    PS - Do remember to mark the solutions as Helpful or Correct. Thanks for understanding.

  • How to convert the query to function

    Please help to convert the below given query to a function :
    SELECT
      ITEM_CODE, ITEM_NAME,
      ROUND(OPSTK/CNV/ML,2) OPSTK, ROUND(OPVAL,3)OPVAL,
      ROUND(INQTY/CNV/ML,2) INQTY, ROUND(INVAL,3) INVAL,
      ROUND(OUTQTY/CNV/ML,2) OUTQTY,ROUND(OUTVAL,3)OUTVAL,
      ROUND((NVL(OPSTK,0)+NVL(INQTY,0)-NVL(OUTQTY,0))/CNV/ML,2) CLSTK,
      ROUND((NVL(OPVAL,0)+NVL(INVAL,0)-NVL(OUTVAL,0)),3) CL_VAL
    FROM
      SELECT ITEM_CODE, ITEM_NAME, IU_CONV_FACTOR CNV, IU_MAX_LOOSE_1 ML
      FROM   ITEM,ITEM_UOM
      WHERE  ITEM_CODE = IU_ITEM_CODE AND IU_UOM_CODE = ITEM_UOM_CODE
      SELECT SL_ITEM_CODE OP_ICODE,
             SUM(DECODE(RCVD_ISSD,'R',1,'I',-1)*QTY_BU) OPSTK,
             ROUND(SUM(DECODE(RCVD_ISSD,'R',1,'I',-1)*VAL_1),2) OPVAL
      FROM   STK
      WHERE  DT <  TO_DATE(:P249_DATE1,'DD-MM-YYYY')
      GROUP BY SL_ITEM_CODE 
      SELECT SL_ITEM_CODE TX_ICODE,
             SUM(DECODE(RCVD_ISSD,'R',1)*QTY_BU)INQTY,
             SUM(DECODE(RCVD_ISSD,'R',1)*VAL_1) INVAL,
             SUM(DECODE(RCVD_ISSD,'I',1)*QTY_BU)OUTQTY,
             SUM(DECODE(RCVD_ISSD,'I',1)*VAL_1) OUTVAL
      FROM   STK
      WHERE  DT BETWEEN TO_DATE(:P_DATE1,'DD-MM-YYYY')
      AND    TO_DATE(:P249_DATE2,'DD-MM-YYYY')
      GROUP BY SL_ITEM_CODE
    WHERE ITEM_CODE = OP_ICODE(+)
    AND   ITEM_CODE = TX_ICODE(+)
    --AND   ITEM_CODE LIKE :P_ITEMCODE
    ORDER BY ITEM_CODEYogesh

    create or replace type typ_stk is object(
      ITEM_CODE number, ITEM_NAME varchar2(100) ,
      OPSTK number, OPVAL number,
      INQTY number ,  INVAL number,
       OUTQTY number ,OUTVAL number,
       CLSTK number,
       CL_VAL number
    create or replace function fn_stk return typ_stk is
    v_ITEM_CODE number;
    v_ITEM_NAME varchar2(100) ;
    v_OPSTK number;
    v_OPVAL number;
    v_INQTY number ; 
    v_INVAL number;
    v_OUTQTY number ;
    v_OUTVAL number;
    v_CLSTK number;
    v_CL_VAL number;
    begin
      select 1,'item',2,3,4,5,6,7,8,9 into
      v_ITEM_CODE ,
    v_ITEM_NAME ,
    v_OPSTK ,
    v_OPVAL ,
    v_INQTY , 
    v_INVAL ,
    v_OUTQTY ,
    v_OUTVAL ,
    v_CLSTK ,
    v_CL_VAL
      from dual;
      return typ_stk(v_ITEM_CODE ,
                        v_ITEM_NAME ,
                        v_OPSTK ,
                        v_OPVAL ,
                        v_INQTY , 
                        v_INVAL ,
                        v_OUTQTY ,
                        v_OUTVAL ,
                        v_CLSTK ,
                        v_CL_VAL);
    end fn_stk; 
    select treat(fn_stk as typ_stk).item_code item_code,
           treat(fn_stk as typ_stk).ITEM_NAME ITEM_NAME,
           treat(fn_stk as typ_stk).OPSTK OPSTK,
           treat(fn_stk as typ_stk).OPVAL OPVAL,
           treat(fn_stk as typ_stk).INQTY  INQTY,
           treat(fn_stk as typ_stk).INVAL  INVAL ,
           treat(fn_stk as typ_stk).OUTQTY OUTQTY,
           treat(fn_stk as typ_stk).OUTVAL OUTVAL,
           treat(fn_stk as typ_stk).CLSTK CLSTK,
           treat(fn_stk as typ_stk).CL_VAL CL_VAL
      from dualare you expecting something like this ?

  • How to convert sql query to hql format?

    I want to convert the following query from SQL to HQL.
    SELECT
    student.first_name AS student_first_name,
    course.name AS course_name,
    course.id AS course_id,
    admission.admission_no AS admission_admission_no,
    attendance.status AS attendance_status,
    case WHEN attendance.status=1 THEN 'P'
    WHEN attendance.status=2 THEN 'A'
    End as Status,
         count(course.id) as Periods,
         count(attendance.status) as Total,
    time_table_item.tt_date AS time_table_item_tt_date,
    attendance.student_batch_id AS attendance_student_batch_id
    FROM
    public.time_table_item time_table_item
    INNER JOIN public.attendance attendance ON time_table_item.id = attendance.time_table_item_id
    INNER JOIN public.syllabus_course syllabus_course ON syllabus_course.id = time_table_item.act_syl_course_id
    INNER JOIN public.course course ON syllabus_course.course_id = course.id
    INNER JOIN public.student_batch student_batch ON attendance.student_batch_id = student_batch.id
    INNER JOIN public.admission admission ON student_batch.admission_id = admission.id
    INNER JOIN public.student student ON admission.student_id = student.id
    AND course.id = syllabus_course.course_id
    INNER JOIN public.time_table time_table ON time_table_item.time_table_id = time_table.id
    where
         student_batch.batch_id= $P{Batch} and time_table.level_id= $P{Level} and syllabus_course.course_id = $P{Course} course.id=9142294     course.id=9142294
    group by
         course.id, admission.admission_no,time_table_item.tt_date,attendance.student_batch_id,
         student.first_name,attendance.status,course.name
    order by
         course.id, admission.admission_no,time_table_item.tt_date
    Can i get the corresponding HQL query for this?
    Please help

    Well, the Hibernate Query Language is only one degree of separation from Java. Javert has a Bacon number of 4: http://oracleofbacon.org/cgi-bin/oracle/movielinks?firstname=Bacon,%20Kevin&game=1&secondname=Javert

  • How to insert a query into a NEW workbook ?

    Hi Friends,
    Could some one tell me how to insert a query into a new workbook? i am trying to run query in NW2004S BEx Query Designer, which always open the query on web when executed. i want to run the query in NW2004S BEx Query Designer and want it to open the result in Excell.
    If i am not wrong then to do the same, i need to embed the query into workbook. Correct me if i am wrong. If i am right then plzz tell me the steps to insert the query into workbook.
    Ur help will be rewarded in terms of points.
    Thanks,

    Hello,
    If you open the BEx Query Designer from the desktop, you cannot execute the query directly to the BEx Analyzer for an Excel view. You can only execute it directly to the Web. This is true for the SAP BW 3.x version as well as the SAP NetWeaver 2004s version.
    If you open the BEx Query Designer from within BEx Analyzer, once you select (or create) your query, you will have a green check mark icon that will then allow you to deploy the query directly to the BEx Analyzer for the Excel view.
    However, this would only make sense if you are creating or modifying the query. If not, you would simply open BEx Analyzer and use the Open Query option in this tool to see your query in an Excel format, as has been previously suggested by the other respondents to this posting.
    Regards,
    Katie Beavers
    SAP NetWeaver Product Management

  • How to save Query in a workbook and Role

    Hello All
    What are this workbook and role?How to save the query into this and how it helps/use us.
    can anyone tell about this?
    regards
    balaji

    Hi,
    You need to assign a role to a user. WHen this user enters the system s/he will be able to save queries under the role (the button 'Roles' will be seen).
    See here an example of working with roles:
    Re: How to protect Queries from being modified ?
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • How to convert milliseconds to date format in sql query

    Hi All,
    The following code is in java.     
    String yourmilliseconds = "1316673707162";**
    Date resultdate = new Date(Long.parseLong(yourmilliseconds));
    could you plese tell me how to convert milliseconds into date format in query and comparing with another date like(sysdate-3)

    Hello,
    http://stackoverflow.com/questions/3820179/convert-epoch-to-date-in-sqlplus-oracle
    Regards

  • Re: How to converting from PL/SQL query to T-SQL query

    How to converting from PL/SQL query to T-SQL query... Its Urgent

    Download the
    SQL Server Migration Assistant for Oracle.  It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
    With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
    But you can try
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to convert LongRaw to String when querying using DB Adapter?

    Hi All,
    How do we use a DB Adapter to query on LONG Raw data? Is there a way to implicitly convert data to a string before returning the resultSet?
    JDev: 11.1.1.4
    Regards.

    Hi,
    LONG RAW data will be retrieved as base64binary, you can use and Embed Java to convert it back to string.
    How to convert String to base64Binary in BPEL process
    Or you can use doTranslateFromNative oracle extension function, you will need a NXSD template to use it.
    http://docs.oracle.com/cd/E15523_01/integration.1111/e10224/bp_appx_functs.htm#CJACABGA
    Cheers,
    Vlad

  • How to change the reference of a Workbook to a Query

    I have a Query Q1 and I have a workbook W1 for this query in 3.5,  I copied query Q1 to a new Query Q2,  and copied workbook W1 to a new workbook W2. (using RSZC)
    Now I have Queries Q1 and Q2 and Workbooks W1 and W2. But as the workbook W2 is a copy of W1, it still has the reference to query Q1. Is there any way to change the reference of a workbook to a query ?
    My requirement is, workbook W2 should refer to query Q2.
    Appretiate your help.
    Regards,
    R. Vodnala

    Go to design mode of the second workbook and change the query using the edit option to Q2 then your workbook W2 will refer to query Q2
    Just to get the idea go through this link here it is shown how to change the query.
    https://wiki.sdn.sap.com/wiki/display/BI/Issue%20with%20Migrating%20BEx%20Query%20and%20Workbook

Maybe you are looking for