How to use Order by in ODI

Hello Friends,
We are extracting data from oracle table to Essbase target, we need to in-corporate Order By clause on source while extracting data.
Ex: Select xxxx, WEEK_NUM from aaaaa
where xxxx = yyy
ORDER BY WEEK_NUM asc
Can you suggest how to do this?
Thanks.

Hi Can you please check the below thread
Sorting or Order By on ODI
may be this what you looking for.

Similar Messages

  • How to use order by within Group by clause

    Hi All,
    I need a help as to how should i use the Order by clause so that the data should be in order with respect to one column, and at the same time whole data is grouped by some other column...like
    Select RaceNo,Venue,FP,BP from Race group by RaceNo
    Here I want to order by FP in ascending order for each group. When i am using it , whole order is changing.
    Can anybody suggest me how to use order by clause that would apply to each group of data.
    Thanks .

    order by clause should be used at the last in any query.......but in group by clause u can't use use that becoz u group according to column then no ordering is needed there......if u want to filter something then u can use having clause and later if u need to arrange then u can use order by clause.........
    i hope this eg.l gives u some clarification....
    e.g
    select deptno,count(empno)
    from dept
    group by deptno
    having count(empno) > 10
    order by deptno

  • How to use order by in stored procedure base block?

    How to use order by in stored procedure base block? I need to change order by dynamically

    Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');

  • How to use GROUP BY  in ODI

    how to use GROUP BY in ODI tool

    Hi ,
    you can combine the insert stamt with the select ....so that in the target u will get a single line .....
    SQL> select * from prop_details;
    PROPERTY RELAVANTD NOTICES
    10100 25-JAN-09 30
    10100 03-JAN-09 30
    10100 02-DEC-08 20
    10100 01-DEC-08 10
    10100 31-DEC-08 20
    10101 10-JAN-09 10
    10101 20-JAN-07 15
    10101 30-DEC-08 45
    10101 20-FEB-08 35
    10101 31-JAN-09 25
    10 rows selected.
    SQL> select PROPERTY,max(RELAVANTDATE),SUM(NOTICES) from PROP_DETAILS GROUP BY P
    ROPERTY;
    PROPERTY MAX(RELAV SUM(NOTICES)
    10101 31-JAN-09 130
    10100 25-JAN-09 110
    SQL>

  • How to use dual table in ODI in source side for nested queries?

    Hi,
    Any idea how to use dual table in source for more than once. I want to build a ODI interface for the following source query
    SELECT ACTV_TYP.ACTV_TYP_SRC_CD, ACTV_TYP.ACTV_TYP, PORT_ACTV_TYP.PORT_ACTV_TYP_SRC_CD, PORT_ACTV_TYP.PORT_ACTV_TYP, SFT_DLT_STS.SFT_DLT_STS_SRC_CD, SFT_DLT_STS.SFT_DLT_STS
    FROM
    SELECT LOW_VALUE PORT_ACTV_TYP_SRC_CD, MEANING PORT_ACTV_TYP
    FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
    WHERE TABLE_NAME = 'BRKR_PORTS'
    AND COLUMN_NAME = 'WORK_PORT_TYPE') PORT_ACTV_TYP,
    (SELECT LOW_VALUE SFT_DLT_STS_SRC_CD, MEANING SFT_DLT_STS
    FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
    WHERE TABLE_NAME = 'BANKS'
    AND COLUMN_NAME = 'REC_STATUS') SFT_DLT_STS,
    (SELECT 1 ACTV_TYP_SRC_CD, '?????' ACTV_TYP FROM DUAL
    UNION ALL
    SELECT 2 ACTV_TYP_SRC_CD, '???????' ACTV_TYP FROM DUAL) ACTV_TYP
    Regards

    If the below query is equivalent , it seems you don't need dual table at all , just default the values in the interface.
    You are using dual tables to populate values ACTV_TYP.ACTV_TYP_SRC_CD, ACTV_TYP.ACTV_TYP values. Look at your query in the following manner :
    SELECT '1', '?????', PORT_ACTV_TYP.PORT_ACTV_TYP_SRC_CD, PORT_ACTV_TYP.PORT_ACTV_TYP, SFT_DLT_STS.SFT_DLT_STS_SRC_CD, SFT_DLT_STS.SFT_DLT_STS
    FROM
    SELECT LOW_VALUE PORT_ACTV_TYP_SRC_CD, MEANING PORT_ACTV_TYP
    FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
    WHERE TABLE_NAME = 'BRKR_PORTS'
    AND COLUMN_NAME = 'WORK_PORT_TYPE') PORT_ACTV_TYP,
    (SELECT LOW_VALUE SFT_DLT_STS_SRC_CD, MEANING SFT_DLT_STS
    FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
    WHERE TABLE_NAME = 'BANKS'
    AND COLUMN_NAME = 'REC_STATUS') SFT_DLT_STS
    UNION
    SELECT 2 , '??????', PORT_ACTV_TYP.PORT_ACTV_TYP_SRC_CD, PORT_ACTV_TYP.PORT_ACTV_TYP, SFT_DLT_STS.SFT_DLT_STS_SRC_CD, SFT_DLT_STS.SFT_DLT_STS
    FROM
    SELECT LOW_VALUE PORT_ACTV_TYP_SRC_CD, MEANING PORT_ACTV_TYP
    FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
    WHERE TABLE_NAME = 'BRKR_PORTS'
    AND COLUMN_NAME = 'WORK_PORT_TYPE') PORT_ACTV_TYP,
    (SELECT LOW_VALUE SFT_DLT_STS_SRC_CD, MEANING SFT_DLT_STS
    FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
    WHERE TABLE_NAME = 'BANKS'
    AND COLUMN_NAME = 'REC_STATUS') SFT_DLT_STS
    Now you can use dataset to make UNION.

  • How to use "Order by" clause dynamically on LOV values in 10g r2 forms

    Hi ,
    I have following requirement,please guide me.
    1 Create a List Of Values with 2 fields, Code and Description
    2. Do not use order by clause in record Group Query
    3. Attach this LOV to a field in Form
    4. When user invokes the LOV user will see two fields in LOV with header as Code and Description
    5. Now when user clicks on Column Header “Code” then LOV should be sorted on Code
    6. And if User clicks on Column Header “Description” then LOV should be sorted on Description
    Thanks in Advance.

    Kindly post this problem in this forum ->
    [Forms Forum|http://forums.oracle.com/forums/forum.jspa?forumID=82]
    And, close this thread by marked it as answered. ;)
    Regards.
    Satyaki De.

  • How to use Update Statement in ODI Procedure

    Hi,
    How can I use an update statement inside an ODI procedure.
    Thanks

    Hi,
    You do not need the BEGIN and END. ODI procedures are free text, so you can simply write your update statement, as you would in toad/sql developer etc etc. Just make sure you set the Technology and the logical schema. It is how ever best practice to also use the API:
    <%=odiRef.getSchemaName("YOUR_LOGICAL_SCHEMA_NAME", "D")%>. to prefix tables. This way, you select data from different schema's in the same instance (as long a your user has the correct privs).
    Cheers
    Bos
    Edited by: Bos on Jun 22, 2011 3:09 PM

  • How to use oracle partition in ODI

    hi all,
    i have a oracle database with daily partition. partition syntex is tbl_abc partition(20090909), now i want to use it in interface..
    kindly tell the way...
    Regard
    Naseer

    Hi Naseer,
    How are you?
    ODI doesnt support partition. You can do a work around for that by creating a VIEW out of that partition name, reverse it in ODI and use that as a source.
    Like,
    CREATE TABLE sales_range
    (salesman_id NUMBER(5),
    salesman_name VARCHAR2(30),
    sales_amount NUMBER(10),
    sales_date DATE)
    PARTITION BY RANGE(sales_date)
    PARTITION sales_jan2000 VALUES LESS THAN(TO_DATE('02/01/2000','DD/MM/YYYY')),
    PARTITION sales_feb2000 VALUES LESS THAN(TO_DATE('03/01/2000','DD/MM/YYYY')),
    PARTITION sales_mar2000 VALUES LESS THAN(TO_DATE('04/01/2000','DD/MM/YYYY')),
    PARTITION sales_apr2000 VALUES LESS THAN(TO_DATE('05/01/2000','DD/MM/YYYY'))
    create view sales_jan200 as select * from sales_range PARTITION (sales_jan2000);
    Makes sense?
    Thanks,
    G

  • How to use useMaxValue property in ODI for XML?

    Hello All,
    I am using 11.1.1.5 version of ODI. I want to use "useMaxValue" for which description is given as follows by oracle.
    When this property is set to true, elements for which maxOccurs is not specified in the XSD are considered as maxOccurs ="unbounded". Otherwise, the driver assumes that maxOccurs=1 when maxOccurs is not specified.
    when I use this property as useMaxValue in the JDBC url for XML technology I get the following error.
    ODI-1227: Task SrcSet0 (Loading) fails on the source XML connection XML FILE.
    Caused By: java.sql.SQLException: ODI-40717: Unknown parameter : usemaxvalue
    I am trying to get multiple records for the same elements in XML for this I am using this property. Is there any other way to get it done?
    Thanks in Advance!

    please try uimv or useimplicitmaxvalue. I justed tried, both works well. I will file a doc bug to track the issue, maybe document need change, maybe code, waiting bug updates.
    Edited by: tina.wang on Oct 7, 2012 9:28 AM

  • How to use "full join" in ODI interface

    I need to join two tables using full join. So, when I drag and drop table columns (build join) and mark left and right join (get full join):
    +(All rows of OSS_NCELLREL (OSS_NCELLREL) including the rows unpaired with OSS_NECELASS (OSS_NECELASS) rows and all rows of OSS_NECELASS (OSS_NECELASS) incuding the rows unpaired with OSS_NCELLREL (OSS_NCELLREL)+
    I get the following error:
    Source panel of the diagram: Clause set to full join on a technology that does not support full joins
    I use Oracle DB tables in the same DB.
    Help! What I do wrong?

    Hi,
    You need to work around Topology Manager.
    Please follow the below steps,
    1. Edit the 'Oracle' technology from the Physical Architecture treeview.
    2. In the Technology Defintion Tab select 'Ordered (Sql ISO)' radio button.
    3. In the Technology 'SQL Tab' set the following:
    - Clause Location: From
    - Brackets supported in the ON clauses: check
    - Inner: check, type INNER JOIN
    - Cross: check, type CROSS JOIN
    - Left Outer: check, type LEFT OUTER JOIN
    - Right Outer: check, type RIGHT OUTER JOIN
    - Full Outer: check, type FULL OUTER JOIN
    PS: Please take a backup Oracle techno before editing. ;)
    Thanks,
    G
    Edited by: Gurusank on Nov 27, 2008 9:05 PM

  • SQL Override. How to use custom SQL in ODI?

    I am new to ODI & have an Informatica background. I am looking for an SQL override capability in ODI. I have an existing SQL which has complex joins, in-line queries, filters, unions & many other complexities. The query reads many existing tables & output 5 fields, which I need to populate in the target table. In Informatica, I would simply create a Target table of these 5 fields, import the same table as both source & target, & then override the source qualifier with the existing SQL. Does ODI have a similar feature?
    I know that the same can be achieved using core ODI features, but I am trying to get it done quickly without re-inventing the wheels.
    Thanks,
    Dinesh.

    Dinesh
    you can not use SQL over-ride feature which informatica has. I am an informatica developer myself. So I can feel your pain. You are gonna miss a lot of features Informatica has. the one you are looking can not be done using ODI Interfaces. But can be done using ODI Procedures. When you create a step in Procedure you would mention the Source and target schema informations/Context Logical Schema info which should do the work for you. If your source and targets are in different Server then create a DBlink between two servers. Now when you put your select query in it put it like an insert query.

  • How to use order by with hierarchical query

    I have a hierarchical query basically it brings back an organization chart. We start with a manager's id, get all that person's employees. If any of the employees is also a manager I want to get that person's employees and return them right after that person. I won't bother with the whole query but relevant part is:
           START WITH em.mgr_id = pi_mgr_id
          CONNECT BY nocycle PRIOR em.emp_id = em.mgr_id;Where pi_mgr_id is a parameter passed to the procedure and em is the alias for the emp_mgr_relationship table which contains emp_id and mgr_id. This works fine. What I want now is for the employees who work for the same manager to appear in name order. The table which contains the employee names is aliased as pe and the name column is called name1. I added the following:
           START WITH em.mgr_id = pi_mgr_id
          CONNECT BY nocycle PRIOR em.emp_id = em.mgr_id
            order by pe.name1;But that put the entire list in name order. What I want is for employees who work for the same manager to be in name order. Let's the manager whose organization I want is named Frank. What I'd like to get is this
    EMP_NAME    MGR_NAME
    Allen       Frank
    Beth        Frank
    Alex        Beth
    Charles     Beth
    Ed          Beth
    Dean        Frank
    George      Frank
    Benny       George
    David       George
    Sam         George
    Dan         Sam
    Harry       Sam
    John        Sam
    Terry       George
    James       Frank
    Ken         Frank
    Mike        Ken
    Warren      KenHow do I get the list in this order?
    Edited by: kendenny on Jul 28, 2010 7:31 AM

    Make use of ORDER SIBLINGS clause in hierarchial queries to set the order by child columns.
    START WITH em.mgr_id = pi_mgr_id
          CONNECT BY nocycle PRIOR em.emp_id = em.mgr_id
            *order siblings by name1;*

  • How to use generic action in ODI?

    I create new Action (Topology.Generic Action), for example, "DELETE TABLE", that contains 1. <%=odiRef.disableReferringFKs( )%> and 2. DELETE FROM ...
    If I want to perform this Action for any table before load data, what must I do?
    Where can I perform this in ODI? May be in Packages or in "Generic DDL" for model?
    I couldn't find this information((

    Hi Pani,
    my experience is that you can best use a procedure to do table deletions on either your source, staging or target schema.
    view the oracle users guide / reference guide for details.
    Where to perform? In the designer, create a project, open the first folder and there you'll find the procedures.
    Right click it and insert a procedure. But again, check the docs, which I believe are delivered with your installation.
    By the way, you can add the procedure in a package to have it executed before any other steps start.
    Good luck!
    Rudy Oosterling
    Edited by: user10081313 on 21-jan-2010 7:54

  • How to use encoded password in ODI SDK

    Dear Experts,
    I found one problem in case of ODI SDK while implementing it in eclipse. As everybody knows we are hardcoding the database credentials, DBA is not interested to share the password easily.If we could implement this in such a way like we are using encoded password for configuring agent then it may be much better for everyone.
    yes of course we can create one file that can contains the credentials but at the end someone can print it in console by reading line by line. Is it possible to develop one algorithm that can ensure to use the password safely (like encoded one).
    Need your valuable suggestion on the same.
    Thanks

    Hi-
    Yes it is possible by the way of KM custamization, You need to modify LKM call sqlldr via jython step to pass the user info and password as variable instead of ODI method. Try this command in your KM step:
    userid=#GLOBAL.user/#GLOBAL.psw
    Hope this will work for you.
    Thanks,
    Saravanan Rajavel

  • How can i use Order by inside a sub query in Oracle

    Hi!,
    Please help me, it's an urgent... how can i use Order by clause
    SELECT SalesProductKeyID,ActualUnitPrice,BillDateKeyID,ProductKeyID
    ,Qty,Profit,DD.dDate
    , (SELECT nvl(S.Qty,0) FROM Stock S , DateDimension DD1
    WHERE S.DateKeyID = DD1.DateKeyID AND
    S.ProductKeyID = SF.ProductKeyID AND
    DD1.dDate <= DD.dDate and rownum=1
    ORDER BY DD1.dDate DESC*) as StockQty
    , (SELECT nvl(SUM(Qty),0) from salesfact SF2,DATEDIMENSION DD2
    WHERE SF2.BillDateKeyID=DD2.DatekeyID AND SF2.ProductKeyID=SF.ProductKeyid
    AND DD2.dDate > DD.dDate
    AND DD2.dDATE=DD.dDate
    ) as TotalQtySold
    FROM SalesFact SF INNER JOIN DATEDIMENSION DD
    ON SF.billdatekeyid =DD.Datekeyid
    WHERE
    IsProfitCalculated = 1 AND
    IsSalesFactSuppPopulated =0 AND
    Qty > 0;
    kindly help
    Thank you.

    Actually I'm converting Procedures from SQL Server to Oracle.
    Actual Stored Procedure in SQL Server is as follows.
    SELECT --top 10000 
    SalesProductKeyID,ActualUnitPrice,BillDateKeyID,ProductKeyID
    ,Qty,Profit,DD.Date
    , (SELECT TOP 1 ISNULL(S.Qty,0) FROM dbo.Stock S , dbo.DateDimension DD1
    WHERE S.DateKeyID = DD1.DateKeyID AND
    S.ProductKeyID = SF.ProductKeyID AND
    DD1.Date <= DD.Date
    ORDER BY DD1.Date DESC) as StockQty
    , (SELECT ISNULL(SUM(Qty),0) from salesfact SF2,DATEDIMENSION DD2
    WHERE SF2.BillDateKeyID=DD2.DatekeyID AND SF2.ProductKeyID=SF.ProductKeyid
    AND DD2.Date > DD.Date
    AND DD2.DATE=DD.Date
    ) as TotalQtySold
    --INTO TEMP_Salesfact          
    FROM dbo.SalesFact SF INNER JOIN DATEDIMENSION DD
    ON SF.billdatekeyid =DD.Datekeyid
    WHERE
    IsProfitCalculated = 1 AND
    IsSalesFactSuppPopulated =0 AND
    Qty > 0

Maybe you are looking for

  • Error message everytime after waking computer

    So I bought a new Lenovo ideapad S415 touch a week ago. installed ram from 4g to 8g ddr3. Then I got Windows 8.1 from 8. After I got 8.1 my laptop ran extremely slow then I somehow fixed it by changing some settings and removed some adware. So after

  • Using Time Capsule to store iTunes library

    I use my 1 TB Time Capsule to store my iTunes library and point my iTunes to where it is stored in the Preferences/Advanced section of iTunes. However, iTunes often reverts to the old storage location on my MacBook Pro. Is there another folder or set

  • Why is the Discussion on the Moto X Update Locked?????

    Here is the thread I am referring to: https://community.verizonwireless.com/thread/806362 Below is the message I was trying to send to the community leaders and VZW customer support reps who commented on this thread, but I'm not being followed by the

  • DVD SP 3Subtitles HELP!!!!!

    I'm going crazy over here in South Korea. Here's the problem...I have two projects that I created in DVDSP 3. I created some of the subtitles in one project and the others in a seperate project. Now I cant seem to combine the two. If I try and import

  • Live Streaming from Panasonic SDR-H80

    Hello all. I'm writing to ask if there is any way to connect a Panasonic SDR-H80 Cam to my MacBook Pro for a "live stream" (no need to stream it over the internet, only on my screen); the problem is that this kind of Cam doesn't have a Firewire Port,