Group by for one column

there is a scenario in informatica..where we can select more than one rows and group by on only one row..its possible in informatica..
so can any one tell how to sql for those type of scenarios
For example there are
SEQUENCE_ID NUMBER NOT NULL,
SAT_ID VARCHAR2(30 BYTE) NOT NULL,
MFG_ID VARCHAR2(99 BYTE),
SOLD_DT DATE,
VIN VARCHAR2(30 BYTE)
HE IS SELECTING ALL THE COLUMNS AND GROUPING BY ON SAT_ID ..so do any one tell how to write sql in that scenario

in oracle you can have groupings without having to group all of the columns in the select clause by using an analytic query.
  select a.*
    from (select sequence_id,
                 mfg_id,
                 sold_dt,
                 vin,
                 row_number() over (partition by mfg_id order by sold_dt) rn
            from <table>
           where <conditions>) a
   where a.rn = 1
try to post some sample data and output. we might be able to come up with some simple query that might be compatible or supported by informatica queries.

Similar Messages

  • In BI Publisher Report of excel output for one column is filled with spaces

    Hello,
    We have issue in BI Publisher report of excel output.
    In Excel output for one column few records are displaying as left alignment
    and few record are displaying as right alignment.
    If you are having any xml tag or any syntax for removing spaces for left side
    Please help on this issue.
    Thanks in Advance.
    Regards,
    Swaraj

    Please post the details of the application release, database version and OS along with BI Publisher.
    Is the issue with all reports or specific one(s) only?
    Do you have the patches in the following docs applied?
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 10g [ID 797057.1]
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 11g [ID 1276869.1]
    Overview of Available Patches for Oracle XML Publisher embedded in the Oracle E-Business Suite [ID 1138602.1]
    BI Publisher 10g RTF Template Changes Alignment Settings for Numbered Lists [ID 1418504.1]
    Thanks,
    Hussein

  • To set a dropdown list for one column in the excel file before downloading

    Hi all,
    I am downloading an excel file which has the format of an internal table with a number of fields. I want to set a dropdown list for one column in the excel file. How can i do this?
    Thanks

    HI ,
    U can use function module " QINT_GET_EXCEL_DATA " ....
    and modify the excel sheet based on ur requirement ......
    Try this ...
    Hope it works
    Thanks
    Shambhu

  • Select List and Popup LoV for one column

    Hello,
    is there a built-in functionality to show a select list and a popup lov for one column similar to "Condition Type" in the condition region when editing a page.

    Hello,
    No, you have to code that yourself. For instance by adding HTML in the Post Element Text field (like <IMG src=... />).
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • How to change Group Asset for one Asset

    Hi,
    Please how can i change a Group Asset for one Asset ?
    i try with Tcode AS02 but i find "Act determination" in grey.
    i hope ur help
    Regards
    Edited by: jehade el aoumari on Jan 22, 2008 11:38 AM
    Edited by: jehade el aoumari on Jan 22, 2008 12:35 PM

    HI,
    In the Depreciation tab, double click on the the Depreciation area, where you want to change the Group Asset. because Group asset is specific to the Depreciation area.
    You will see the Group Asset field.
    If you still do not see the Group Asset field, then you have to change the Screen Layout in the Customisation for the Depreciation area in T-Code AO21.
    Hope this helps you.
    Thanks
    Siva

  • Set custom font size for one column

    hey guys! I am trying to decrease the font-size for one column based on an lov and used
    style="font-size:8pt"It does not work though! Do you have a hint?
    brgds,
    seb

    Hello Seb,
    >> Might it be important whether the column is of type "...based on lov"?
    If by "...based on lov" you mean “Display as Text (based on LOV, does not save state)” the answer is yes. This type of column is not treated as an updatable column (the implementation is by using a regular <td> tag and not the <input> tag) so the Apex engine ignores the Element Attributes field.
    As far as I can tell, this column can only be styled in the query itself (and you need to implement the LOV yourself).
    Another option is to use a select list and disabled it, but the column will appear in gray, and with small font size it doesn’t look that good.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • How to boldface the header for ONE column

    hi,
    I want to know how to boldface the header for ONE column. The following will boldface the header for all the columns in the table
    table.getTableHeader().setFont(new java.awt.Font("Dialog", 1, 12));
    Thanks.
    Jrabi

    jtable.getColumnModel().getColumn( indexOfBoldColumn ).setHeaderRenderer( TableCellRenderer aRenderer )

  • Sap.m.Table: How to disable includeItemInSelection for one column?

    Dear UI5 Experts,
    I have used includeItemInSelection method for whole table as it is required for me on selectionChange event in sap.m.Table control.
    Now, I have a requirement where I need to disable that method for one column. Is there a way to disable includeItemInSelection method for only one column in sap.m.Table control. Please Advice.
    Thank you!
    Regards,
    Sai Vellanki

    Hi,
    you can use method oTable.bindAggregation
    Refer example sap.m.Table and see the source code.
    Regards,
    Chandra

  • How do I group by only one column in a SELECT statement?

    Hi everyone,
    Here is my novice question:
    I would like to run a query where I select (display) several columns from my table, yet group (categorize) by one of these columns.
    For example:
    SELECT A, B, COUNT(A)
    FROM TableX
    GROUP BY A
    I realize now that this is not valid. My first question is why? Doesn't it make sense that you would want to group by only one of the columns? To me, it seems natural that you would most often want to categorize by one attribute, which is why it seems odd that this is not valid. I realize that I can remove column B, but I do want to display that info. I could also change the last statement to GROUP BY A, B to avoid errors, but this will also not display what I am looking for.
    In addition to understanding why Oracle is set up this way, I guess I also need to know how I can legally accomplish this query, grouping by A but also displaying the values of B.
    Thank you very much for your help!
    Holly

    Hi everyone,
    Thank you for your responses... very interesting and useful. Since I came across inline views in my reading, I tried the approach recommended by g feng, although I am eager to try the other approaches too.
    I ended up using an inner join simply to get more descriptive info. on the column that was being counted. With Y representing this second table, Y.B being the column containing the descriptive info., and A being the common key between X and Y, here is the simple code I came up with.
    SELECT Y.B, V.*
    FROM Y,
    SELECT A AV, COUNT (*)
    FROM X
    GROUP BY A
    ) V
    WHERE V.AV = Y.A
    Does this seem correct... anything I need to watch out for?
    Thanks again to everyone for your help!!
    Holly

  • ALV grid display the subtotal not getting for one column at the output

    Hi,
    I am working one report ALV grid display and subtotal is not getting for one paricular coulumn.
    Eventhough that column has some values.
    So can anyone give the proper solution.
    Waiting quick response.
    Best Regards,
    Bansi

    Hi
    see this link .
    https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALinALV
    or try this program.
    REPORT zalv.
    DATA:
    t_sflight TYPE TABLE OF sflight,
    fs_sflight TYPE sflight.
    DATA:
    r_container TYPE REF TO cl_gui_custom_container,
    r_grid TYPE REF TO cl_gui_alv_grid.
    *FIELD CATALOG
    DATA:
    t_fcat TYPE lvc_t_fcat,
    fs_fcat TYPE lvc_s_fcat.
    *SORTING THE BASIC LIST
    DATA:
    t_sort TYPE lvc_t_sort,
    fs_sort TYPE lvc_s_sort.
    fs_fcat-fieldname = 'PRICE'.
    fs_fcat-do_sum = 'X'.
    APPEND fs_fcat TO t_fcat.
    fs_sort-spos ='1'.
    fs_sort-fieldname = 'CARRID'.
    fs_sort-down = 'X'.
    fs_sort-group = '*'.
    fs_sort-subtot = 'X'.
    APPEND fs_sort TO t_sort.
    SELECT * FROM sflight INTO TABLE t_sflight.
    CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'SCREEN1'.
    SET TITLEBAR 'TITLE1'.ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    **& Module HANDLER OUTPUT
    MODULE list OUTPUT.
    CREATE OBJECT r_container
    EXPORTING
    container_name = 'CONTAINER'.
    CREATE OBJECT r_grid
    EXPORTING
    i_parent = r_container.
    CALL METHOD r_grid->set_table_for_first_display
    EXPORTING
    i_structure_name = 'SFLIGHT'
    CHANGING
    it_fieldcatalog = t_fcat
    it_outtab = t_sflight
    it_sort = t_sort.
    ENDMODULE. "list OUTPUT
    Regards
    Hareesh Menon

  • How to enable AI(accent insensitiv) for one column without changing session

    Following is my test SQL:
    create table accent_test(col varchar2(10 char);
    insert into accent_test values('INDIA');
    insert into accent_test values('india');
    insert into accent_test values('InDiÄ ');
    Following SQL can only enable CI(Case insensitive), but can’t enable AI(accent insensitive):
    select *
    from accent_test
    where NLS_UPPER(col, 'NLS_SORT=GENERIC_BASELETTER') LIKE NLS_UPPER('INDIA', 'NLS_SORT=GENERIC_BASELETTER')
    COL
    INDIA
    india
    Upper SQL can’t return the third row ‘InDiÄ’ which includes accent character.
    I know following SQL can enable AI by changing the session. However it will change the whole session and other columns in one table:
    SQL> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    SQL> ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    Is there any solution to enable AI for only one column without changing the session?

    convert(<Any Chinese Character>, 'US7ASCII') will all return same character '?'.might be an matter of using the right characterset:
    SQL> select 'ä' str, convert('ä', 'JA16SJIS') converted_str from dual union all
    select 'á', convert('á', 'JA16SJIS') from dual union all
    select 'â', convert('â', 'JA16SJIS') from dual union all
    select 'à',  convert('à', 'JA16SJIS') from dual
    STR CONVERTED_STR
    ä   a           
    á   a           
    â   a           
    à   a           
    4 rows selected.

  • Sqlloader for one column

    Hi
    I want to load a table from .csv file having only one column
    is this possible please suggest.
    i tried it but only 1st character of records is loading rest is getting ignored

    user511621 wrote:
    Hi
    I want to load a table from .csv file having only one column
    is this possible please suggest.yes
    >
    i tried it but only 1st character of records is loading rest is getting ignoredpost what you did & show results using COPY & PASTE

  • Group by only one column

    Hi friends,
    I have a create table script as below:
    CREATE TABLE GROUPBY_TEST
    ( NAME VARCHAR2(5),
    HIREDATE DATE,
    DEPARTMENT VARCHAR2(5),
    SALARY NUMBER(5)
    Insert script :
    INSERT INTO GROUPBY_TEST VALUES ('A','1-JAN-2000','XYZ',1000);
    INSERT INTO GROUPBY_TEST VALUES ('A','1-FEB-2000','ABC',5000);
    INSERT INTO GROUPBY_TEST VALUES ('A','1-APR-2000','DDD',5000);
    INSERT INTO GROUPBY_TEST VALUES ('B','10-JAN-2000','EEE',1000);
    INSERT INTO GROUPBY_TEST VALUES ('B','10-FEB-1999','FFF',500);
    INSERT INTO GROUPBY_TEST VALUES ('C','15-MAY-2005','GGG',500);
    INSERT INTO GROUPBY_TEST VALUES ('C','27-JUN-2003','LLL',10000);
    My table data looks like :
    SELECT * FROM GROUPBY_TEST;
    NAME HIREDATE DEPAR SALARY
    A 01-JAN-00 XYZ 1000
    A 01-FEB-00 ABC 5000
    A 01-APR-00 DDD 5000
    B 10-JAN-00 EEE 1000
    B 10-FEB-99 FFF 500
    C 15-MAY-05 GGG 500
    C 27-JUN-03 LLL 10000
    7 rows selected.
    I want output as:
    Name HAREDATE DEPT SAL
    A 01-APR-00 DDD 5000
    B 10-JAN-00 EEE 1000
    C 15-MAY-05 FFF 500
    i want to have max(HIREDATE) records group by NAME only and NOT BY DEPARTMENT AND SAL.
    When i tried query as below:
    select name,max(hiredate),department,salary from groupby_test
    group by name,department,salary;
    It returned all 7 records which i dont want
    can some one help me getting neccessary output ?
    Thanks a lot
    JP

    A way :
    SQL> select name, hiredate, department, salary
      2  from   (select a.*, dense_rank() over (partition by name order by hiredate desc) dr from groupby_test a)
      3  where  dr = 1;
    NAME  HIREDATE DEPAR     SALARY
    A     01/04/00 DDD         5000
    B     10/01/00 EEE         1000
    C     15/05/05 GGG          500
    SQL> An other way without subquery :
    SQL> select name,
      2         max(hiredate) keep (dense_rank last order by hiredate) hiredate,
      3         max(department) keep (dense_rank last order by hiredate) department,
      4         max(salary) keep (dense_rank last order by hiredate) salary
      5  from   groupby_test
      6  group by name;
    NAME  HIREDATE DEPAR     SALARY
    A     01/04/00 DDD         5000
    B     10/01/00 EEE         1000
    C     15/05/05 GGG          500
    SQL> Nicolas.
    Ok, too slow, and too late for me now...
    Message was edited by:
    N. Gasparotto

  • OBIEE Answer : SQL Filter for one column of the Dashboard sample : 201301

    I need to filter the report on the basis of one of the filter on the column which is created by custom calculation :
    YEAR ("Order Header Attributes"."Status Date" ) * 100 + WEEK("Order Header Attributes"."Status Date" )
    and this in the Number format.
    I need the filter as : 2013 + Week(CurentWeek) -1 = 201302
    Please help me create a custom SQL filter for the same.

    Anitha ,
    I am getting the error while doing it with Prompt :
    I went to the Dashboard on top Left next to results there is a Prompt there i clicked a new prompt i gave a name , description selsected my column in Filter on Column
    Operator : = is equal to / is in
    How should the user choose a value or values?
    * Select it from a drop-down list
    Browse through choices and/or type in directly
    * Single Value Only
    What values should be shown to the user?
    None
    All Values
    Limited Values
    * SQL Results (year("Status Date")*100) + WEEK_OF_YEAR("Status Date")-1)
    (The values returned by this SQL statement)
    Other options
    Choices per page
    (leave blank for automatic setting)
    Allow user to constrain choices
    Allow user to skip prompt
    I am doing correctly please help me in case i am not doing it correctly
    Regards ,
    Nidhi

  • How to pass more than one value for one column in procedure

    hi
    select id, name from col_tab where dept_name in ('ECE','CIVIL');
    when i was running this it is working well.
    CREATE OR REPLACE PACKAGE pack_str
    AS
    TYPE type_refcur IS REF CURSOR;
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
    IS
    BEGIN
    OPEN ans FOR
    select id,name from col_tab where dept_name in char_in ;
    END str;
    END pack_str;
    the package was created.
    my doubt is
    1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
    2. when i was storing the value in string like val = 'ECE,CIVIL' ,
    how to get the id,name for ECE and CIVIL.
    plz help me

    Hi Rebekh ,
    I am recreating your packages for the desired output.
    CREATE OR REPLACE PACKAGE pack_str
    AS
         TYPE type_refcur IS REF CURSOR;
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
         IS
              lv_t varchar2(200);
         BEGIN
              lv_t := REPLACE(char_in,',',''',''');
              lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
              OPEN ans FOR lv_t;
         END str;
    END pack_str;
    Note:-
    Input Parameter char_in is a comma seperated value for dept_name
    -Debamalya

Maybe you are looking for

  • IBM SK8840 Driver Not Working on Thinkpad SL410k

    I'm using SK-8840 ps2 keyboard connected to my laptop computer Thinkpad SL410k via an adapter(coz the SL410k has only USB port), without SK-8840 drivers. The Trackpoint does work without the driver, but I can't configure the sensitivity of the trackp

  • How to Type Farsi in Illustrator CS6

    Hi, Having Adobe Illustrator CS6 Installed on my 64 bit windows 7 and enabling windows Farsi keyboard and installing Farsi fonts on my computer, I am having issues on typing farsi in illustrator and words aooear seperatly from Left to Right(Please be

  • Problem with SQL connection and a Collection

    hi all, I have two problems with sql... 1. how can I assign the values of a resultset to a collection? 2. how can I close the sql connection, because when I close the statement and connection error shows me in the resultset thanks!

  • EjbLoad() called multiple times

    "I have a Bean Managed Persistence Entity Bean that is deployed on iAS6 sp4 (Solaris). I am having problems with the persistence, or lack of, of the bean. I am new to entity beans but not Java or iPlanet. My first problem is after I call my custom fi

  • Cash journal Back dated entry it' s allowed to 300.00 only.

    Dear Experts, When i try to post cash journal Back dated entry it' s allowed to 300.00 only. for example I want to post one expenses in 6th month 1200.00. But 6th month closing balance is 16675.00. then also it's shown error Payment amount is larger