Apply distinct to all the columns in a select list

Select distinct name, date , venue , duration from tableA
the above query distinct onlu the first column in the select list but is it possible to distinct all the columns.
current out put is
1 , raj, 25-may-2009, uk , 10
1 , raj, 25-may-2009, usa , 10
1 , raj, 25-may-2009, uk , 20
requried output....
1 , raj, 25-may-2009, uk , 10
the first found row is enogh...
thanks in advance :)
raj

But all these tree rows are distinct. Doesn't it? Why you want to take only first row? What's the logic?
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

Similar Messages

  • Return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST

    Hi,
    How to return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST?
    For example : if the row has 3 columns then after selecting the particular row, the RETURN_TAB internal table should contain all the three column values.
    Regards,
    Raghu

    Hi,
       Try the following...
    DATA : it_fields like help_value occurs 1 with header line.
    data: begin of w_vbap,
            vbeln      like vbap-vbeln,    
            posnr      like vbap-posnr,   
            werks      like vbap-werks,  
          end of w_vbap.
    data: i_vbap   like w_vbap   occurs 0 with header line,
             w_fields type help_value,
          i_dfies type table of dfies,
          i_return_tab type table of ddshretval with header line,
          i_field  type dfies.
      select vbeln posnr werks
          from vbap into table i_vbap up to 5 rows.
    if sy-subrc = 0.
       sort i_vbap by vbeln.
    endif.
      clear it_fields[] , it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'VBELN'.
      it_fields-selectflag = c_on.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'POSNR'.
      it_fields-selectflag = space.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'WERKS'.
      it_fields-selectflag = space.
      append it_fields.
      loop at it_fields into w_fields.
        i_field-tabname   = w_fields-tabname.
        i_field-fieldname = w_fields-fieldname.
        i_field-keyflag   = w_fields-selectflag.
        append i_field to i_dfies.
      endloop.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield               = 'VBELN'
         window_title           = 'Select'
        tables
          value_tab              = i_vbap
          field_tab                = i_dfies
          return_tab             = i_return_tab
       exceptions
         parameter_error        = 1
         no_values_found        = 2
         others                 = 3
      read table i_return_tab into w_return_tab index 1.
      if sy-subrc = 0.
      endif.
    Regards,
    Srini.

  • Report Column Attributes Does Not Display All the Column Names

    Good Morning,
    I have an interactive query Select * from table_name. I have to select * since my query returns well over 32k. I have 162 columns in the query. On the screen, all the columns are displayed; however, on the report tab, only about half of the columns are displayed. The rest are cut off. I need to be able to go into these field's attributes. Is this an APEX bug, or am I just missing something.
    Regards,
    Kelly

    Hello Tony,
    I can't break them out because APEX is limited to one interactive report per page. There is need to be able to do computations on the data, which interactive reports allows. The data is all statistical.
    Regards,
    Kelly

  • How can I display all the columns on the screen without scrolling from side to side?

    My clinic software has many columns. How can I display all the columns without having to scroll from left to right all the time?

    If the software you are using doesn't offer the ability to increase or decrease document size, as many do, then the only way is to increase your screen resolution. If that's not possible, maybe you can decrease your font size?  If you can't do any of these, I think you're out of luck!

  • How can I instruct SqlMetal to exclude the 'storage' attribute of all the columns on a mapping file when converting a .dbml file to a mapping file?

    Hi,
    I'm trying to use LINQ to SQL with a top down approch using my own POCO classes. I'm using a XML file for the external mapping but in order to avoid typing a long file by hand I found that I could use the O/R designer to create the .dbml and from there I
    could use SqlMetal.exe to generate the map file from the .dbml. The only thing is that, by default, SqlMetal generates a map file which includes the 'storage' attribute for all the columns of the database. For example:
    <
    Column
    Name="Ticker"
    Member="Ticker"
    Storage="_Ticker"
    DbType="NChar(20)
    NOT NULL"
    CanBeNull="false"
    />
    However, in my code I only use automatic properties (Ticker, in this example) and not properties with the corresponding private field. Basically, I don't have any field "_Ticker" in my class. I found out that this the reason why I'm getting the error
    "Bad Storage property: '_Ticker' on member 'TTS.Domain.Asset.Ticker" when trying to add an entity to the database. However, ff I delete the all the 'storage' attributes from my mapping file everything works fine.
    Is there a way so I could use SqlMetal to generate a map file from a .dbml file but in which it never includes the 'storage' attribute?
    Thanks.
    Best,
    Miguel T.
    This is reason why I'm getting the error.

    Hi Serguey,
    I was expecting that answer but I still had some hope that it could be possible! I checked those 2 links before sending my question.
    Currently, I'm deleting the storage attributes everytime that I generate a mapping file. The issue is that I will have to do this eveytime that I need to add data in my O/R designer which happens quite frequently since I'm working with iterations in my project.
    It's not very practical but it's still better than write the additional data by hand.
    I don't know how I could create my own mapping validation in order to exclude the 'storage' attributes everytime that I generate a mapping file from a .dbml file with SqlMetal but I will check that option too.
    Thanks for your helps.
    Best,
    Miguel.

  • Query to get the data of all the columns in a table except any one column

    Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
    For Example:
    Let us consider the EMP table.,
    From this table except the column comm all the remaining columns of the table should be listed
    For this we can write a query like this..
    Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
    Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
    As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
    but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
    Is there any other way of writing the query to get the required result..?
    Thanks..

    Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
    If you really need to list all the columns for a table because you don't want to type them, just use something like...
    SQL> ed
    Wrote file afiedt.buf
      1  select trim(',' from sys_connect_by_path(column_name,',')) as columns
      2  from (select column_name, row_number() over (order by column_id) as column_id
      3        from user_tab_cols
      4        where column_name not in ('COMM')
      5        and   table_name = 'EMP'
      6       )
      7  where connect_by_isleaf = 1
      8  connect by column_id = prior column_id + 1
      9* start with column_id = 1
    SQL> /
    COLUMNS
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
    SQL>

  • Export to PDF is not printing all the columns in one single page.

    Hi,
    I have a report, I am exporting the report to PDF, but ALL the columns are not printing in a single page, It is getting printed 2 or more pages.
    I am okay if I have a horizontal scroll bar or if the test size is reduced. Please see the recording and let me know whether it is possible.

    Sorry sir, It is a slip of the tongue, I corrected my response already.
    So it is defenitely possible to make ALL the columns appear in the same page in PDF regardless of how much width the report occupies?
    If yes, can I see a horizontal scroll bar or the text will be shrinked to fit the page?

  • How to get all the columns displayed in pdf.

    If the ALV Display contains 25 columns.When i tried to give the print in PDF format.
    in the PDF it is displaying only 10 columns.Can you let me know how to display all the columns (i.e 25) in the pdf.

    Hi,
    Check the OSS Note 186603 which deals with how to handle Spool lists with width > 255 characters.
    Regards,
    Satish

  • All the columns of an alv grid report are not downloading in excel in 1 lin

    Hi All,
    I have some 60 columns in my alv grid report and user can download the report using list->export->localfile->spreadsheet.
    What the issue is that all the columns are not downloading in one line, instead they split in two rows.
    Please help.
    Regards,
    Neha Patel

    hi,
    just use this procedure it will solve your problem:
    Firstly export  the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    Regards
    Rahul sharma

  • How can I list all the column names of a table by programming?

    Hi,
    Now I want to write an function which has the following features:
    Firstly, The function was given a parameter as table name.
    Then, it will lists all the columns names of the table.
    e.g
    table: person
    ---firstName------lastName----+
           Michale               Jackson
    We can get the columns 'firstname' and 'lastName' by calling the function with table name 'person'.
    And I also wonder that where I can get reference book or any other materials?
    Thanks.
    Edited by: wenjing wang on Feb 15, 2008 6:42 AM
    Edited by: wenjing wang on Feb 15, 2008 6:57 AM

    hi,
    hope the below code helps u. Just take the headee which contains the field name and split it like below and compare it with the field name u want here 'last name'.
    here,
    'First name' will be in wt_filedata1 and remaining field names in wt_filedata2, so 'do' continues.
    c_tab must be the separator, either , or + or tab etc..
    CODE:
    read table person into wl_header index 1.
    do.
        split wl_header at c_tab into: wt_filedata1 wt_filedata2.
        if wt_filedata1 <> 'lastname'.
          cnt1 = cnt1 + 1.
          wl_header = wt_filedata2.
        else.
          exit.
        endif.
      enddo.
    Please reward if it is useful.
    regards,
    sri

  • Cannot display all the columns

    Hi
    I am having this weird problem , i gave some selected columns in my select query and data displayed with the given conditions perfectly then i added some more columns , around 30 coloumns to my select query(initially i just tested by selecting 6-10 columns names) , and my report does not display data for all the columns , its just displaying the data for columns i previously selected , do i need to do something to get all the columns, is there a limit in Apex that report should display only fixed number of columns ?or do i need to refresh any where in order to adapt the changes i have made in my select query ?
    i have logout and logged in , but it did'nt work..
    Could any body please let me know what could be the reason for this?
    Thank you

    Just found out that the other columns were selected as Not Display in report in actions ->select columns...

  • Infoview not displaying all the columns

    Hi All,
    I have abt 25 columns in my crystal report. Report looks fine in CR designer but when i view the same report in infoview , it doesnt display all the columns. Although i can scroll upto the right but  about 10 columns are missing.
    Kindly suggest.
    Thanks

    Hi,
    Can you please brief me what the approach you took to solve this issue, because even me facing the same problem and I have 35 columns in my report, I build the report on 11x17 page size.
    In that most of them are string type holding the 10 different levels of manager names, employee names and their contact information and few columns are numeric fields
    Since I adjusted all the fields to fit into the page, for all the lengthy name columns like "VenkateshwarRao" its showing "Venkat" and rest of the letters are truncated.
    So basically the user needs the report to download in Excel format, so currently I m able to export and manually adjusting them by selecting all fields in excel.
    But I am not able to show up all fields in info-view, only the first 15 columns are displayed and most of the textual columns are truncated.
    Thanks in advacne,
    Venkat

  • How to see all the columns in the spool output of an ABAP program

    I have an ABAP program which displays all the columns when I run it manually. (by scrolling to the right using right arrows). When I run that report in the scheduler and when I see the output in the spool in transaction SP01, it does allow me to go to the right to see all columns.
    thanks
    Ram

    Check OSS Note 409339 - Spool requests with ABAP lists with more than 255 columns.
    Summary
    Symptom
    As of Release 4.6x, the ABAP list processor can create spool requests for ABAP lists with a width of more
    than 255 columns. However, when you print using the SAP spool, only the start of the list lines is printed,
    the rest of the line is truncated at the end of the page.
    Other terms
    ABAP, lists, print parameter, LINE-SIZE
    Reason and Prerequisites
    Creating "wide" lists on the screen (in other words, lists in the SAPGUI with more than 255 columns) was
    already introduced by the ABAP list processor for Release 4.0B. However, before Release 4.6 these lists
    cannot be printed out in the width used on screen.
    In older releases (for example, 4.0B, 4.5B), you were not able to generate spool requests for lists with a
    width of more than 255 columns:
    The system issues error message PT 026: "No. of columns > 255, no standard print-out possible".
    Therefore, we did not have the problem described here of non-existing device-type support in 4.0/4.5 for
    printing out "wide" lists.
    Up to and including 4.6C there are no SAP device types that support print formats for lists with a width of
    more than 255 characters). Since Release 3.0A, all SAP device types support a maximum list width of 255
    characters with device format X_65_255.
    Solution
    When you create the spool request and a print dialog box appears, enter a column width of maximum 255
    in the "Number of columns" field.
    As of Release 4.6D, you have the option of using device type SWIN with the new format X_65_1024/4 when
    printing with Windows (see Note 213382).

  • To equall the size of all the columns

    Hi,
    i want to equall the size of all the columns. How can it be done??

    If I am getting it properly then you want nto fix the column size but not the data size..correct?.
    If it is column size then you can override the column name my clickin on the -->Column Prperties -->Column Format -->Column Heading and give the name with your specified width
    (Like Veeresh --which is 7 in width)
    Or
    Click on Edit formula -->Click on Custom Heading ->Type your own column name of your own width.
    If it is data size then
    -->Column properties -->Data Format -->Override Default Data format -->Treat number as number -- specify the limit.
    Do the same for all columns,by doing so report you will have the data in fixed width.
    Marks helpfull or correct if it answres
    Regards,
    Veeresh Rayan

  • SPD WorkFlow is not able to read all the column values

    So quick run through of what is going on so far and the environment set in place.
    Number of Environments: 2
    Environment Details:
    Dev: One front end server, One App Server, One SQL Server,
    Production: Two Front End Servers, Two App Servers, One SQL Server,
    We have a InfoPath form made in InfoPath 2010.
    After making the form, it was published to the dev site with all the needed property promotions in place. It was than attached to a library, and than a workflow was made using SharePoint Designer 2010. When the workflow initiates when CreateBy value is not
    empty. The workflow works fine and all the columns promoted from the form are read and placed in the email and set to end user.
    when we move the same form to Production side, what happens is that the workflow reads certain properties and skips certain properties. So when the end user receives the email it is missing information that has been filled out in the form.
    Just to confirm is all the values were being saved to the library properly, i went to modify view under the library tab at the top of my SharePoint library. Opened the view settings and checked off each of the properties that were promoted from the InfoPath
    form (refereed to as site columns on the SharePoint side). All the columns that were filled out show the values that were either chosen or entered by the user (check box, text box, drop down, people picker). But the WorkFlow does not pick up all the values.
    lets say we have the following:
    We have: TextBox A for First Name
    TextBox B for Last Name
    TextBox C for Location Name
    Dropdown 1 for Division Name
    Dropdown 2 for age
    People Picker for requester name
    What happens is that when the user receives the email it will have the only the first name, last name, have the location missing, the division would there there, but the age would again be missing.
    This is really confusing as to why it would be happening. It works fine on the Dev side, but screws up on the Production side.
    Below is what the library looks like with the information populated.
    same names are referenced in the workflow.

    It depends on what you mean by "what messages are available on the topic".
    if you want to know what messages would be delivered to a new consumer on the topic, then you can simply create a consumer yourself. Each messages on a topic is delivered to all subscribers, so by creating a consumer yourself you won't be interfering with the delivery of messages to other consumers. (That's not possible with queues which is why the queue browser is provided).
    If you want to know what messages are "persisted in the topic" then there's not really such a concept. Messages sent to a topic are only persisted in individual durable subscriptions created for individual clients. If there are no durable subscriptions when messages are not persisted. The JMS APi doesn't provide a way to browse the messages saved in an individual durable subscription. It could, but it doesn't.
    Nigel

Maybe you are looking for

  • N500 HDMI at Windows XP SP3 doesn't work

    Hy! I installed XP SP3 on N500 , i installed every driver what i found lenovo site's ( but nvidia driver not ,because it write my machine has got intel video card). When i connect HDMI cable and put into the TV nothing happening only i can watch the

  • DNG in Photoshop V6.0

    Hi I have an Olympus E-520 and I have just downloaded the DNG converter. I cant get my version of Photoshop 6.0 to read these DNG 5.4 files. Am I missing something, do I need to download an update to my version of Photoshop? I tried 'open as' and alt

  • Migrate  oracle database to Microsoft sql server 2005

    Hi All, I have to migrate production oracle database to Microsoft sql server 2005. Below are the details: Oracle database version: 8.1.7.4 Platform : Aix Kindly help me out

  • Old iMac,new solid state drive?

    Is it possible to replace the hard drive in my 2008 Intel iMac with a newer solid state drive? Processor           2.66 Ghz Intel Core 2 Duo Memory             4GB 667 Mhz DR2 SDRAM Graphics            ATI Radeon HD 2600 Pro 256 MB Software          

  • SP13 - missing indicator Configure Certificate Authentication

    Hi all, We are trying to set up configuration for scenario with certificate authentication. XI will send data to remote system using certificate authentication. Even if we are on SP13, we don't see any "Configure Certificate Authentication" indicator