How to display record in column mode?

Hi,
I have difficulty in displaying record in column mode.
Example: I have CALENDAR table with column DATECOL
CALENDAR
DATECOL DATE
Data in CALENDAR table is follow : 1/1/06, 2/1/06, 3/1/06, 4/1/06, 5/1/06, 6/1/06
How to create SELECT statement so result will be follow:
DATECOL 1 2 3 4 5 6
Any advise from you ?
Regards

Hi,
Try this:
DECLARE
z_result VARCHAR2(2000) := ' ';
CURSOR c1 IS
SELECT DATECOL
FROM CALENDAR;
BEGIN
FOR i IN c1 LOOP
z_result := z_result || TO_CHAR(i.DATECOL,'DD') || ' ';
END LOOP;
DBMS_OUTPUT.ENABLE;
DBMS_OUTPUT.PUT_LINE('DATECOL ' || z_result);
END;
Peter D.

Similar Messages

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

  • How to display records in jsp

    i have 100 records can anybody tell me how i display records 10 at atime in jsp & by clicking the next button another 10 records displays in the same jsp. How i can do that thing.

    You have to implement a page breake yourself.
    Simple scenario would be to store a page number into a session:
    session.setAttribute("page", selectedPage)
    every time user clicks on a next page link
    When displaying the record read the page and display only those which should be on the page
    Integer selectedPage = session.getAttribute("page")
    if (selectedPage == null) selectedPage = 1;
    //display code goes here

  • How to display a BLOB column in ADF.

    How to display a BLOB column in ADF.

    hi agowlikar786
    Maybe the forum thread "ADF BC : download BLOB " can help
    at ADF BC : download BLOB
    regards
    Jan

  • How to display records dynamically by columns of the table?

    hi to all,
    i'm trying to figure out quite a long time now. is it possible to populate html table with records via columns? (because most of us are familiar with rows up to the last record) i do have a pseudocode below:
    print ('<table>');
    while (!eof) {
    if (cnt % 4 == 0)
    // breakline w/c means let's have another row since
    // we displayed the records 4x now so we need
    // another row to continue
    else
    // continue column generation
    cnt++
    print ('</table>');
    i don't know if this is quite clear... but i do hope you know what my goal is... i have an app that i need to display (like live.com in searching images) to display all the searched items (and then onmouseover it will get big some sort)... but since the records i have are the ff:
    CREATE TABLE "ERA_DB"."PARTS"
    (     "PARTID" VARCHAR2(15 BYTE) NOT NULL ENABLE,
         "PARTNAME" VARCHAR2(75 BYTE) NOT NULL ENABLE,
         "RETAILPRICE" NUMBER NOT NULL ENABLE,
         "COSTPRICE" NUMBER NOT NULL ENABLE,
         "ACTIVE" NUMBER DEFAULT 1,
         "CATEGORY" VARCHAR2(2 BYTE) DEFAULT 'NA',
         "DESCRIPTION" VARCHAR2(255 BYTE),
         "TYPE" NUMBER DEFAULT 1 NOT NULL ENABLE,
         CONSTRAINT "PARTS_PK" PRIMARY KEY ("PARTID") ENABLE
    i need to display like the ff:
    partname
    partid
    image
    description
    price
    these are inside a box w/ borders (the concept is like live.com in their image search)
    thanks so much!

    This was written for pear::db but I think it should go pretty similar for ADODB.
    $result = $db->query ("SELECT PRODUCT FROM INVENTORY WHERE COMPANY='$_SESSION[company]'");
    while ($data1 = $result->fetchRow(DB_FETCHMODE_ASSOC))
    $data2 = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $data3 = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $data4 = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $rows .= " <tr>\n";
    $rows .= " <td width=150 align=right>".$data1[PRODUCT]."</td>\n";
    $rows .= " <td width=150 align=right>".$data2[PRODUCT]."</td>\n";
    $rows .= ' <td width=150 align=right>".$data3[PRODUCT]."</td>\n";
    $rows .= " <td width=150 align=right>".$data4[PRODUCT]."</td>\n";
    $rows .= " </td>\n";
    $rows .= " </tr>\n";
    }

  • How to display records of int. table in list tree?

    friends,
       i want to display a list tree using fm RS_TREE_CONSTRUCT and RS_LIST_DISPLAY.
    this is the data that i have to display
    Matnr      doc no.        Stock qty.     Age
    1     45601236           100          55
    1     45601237           10          54
    1     45601238        11          53
    1     45601239           101          52
    now, only the first record should be displayed with a + symbol... when the user clicks the + symbol, then the node has to expand and display the other 3 records pertaining to that material...how to display 4 fields of an internal table in one line and like that, 3 records...i have seen some threads relating to this, but they all display only one value in the child node..how to  display multiple fields like this?
    please address this functinality using FMs alone, as i am not exposed to objects :!
    thanks all
    Sathish. R

    satish,
    Before passing the Node name ,Concatenate all the values of record in one string and pass that string as node name.Now it will work.
    To develop the basic logic  simple program name is :
    "SAPSIMPLE_TREE_CONTROL_DEMO"  In this program use above logic.
    Don't forget to reward if useful.
    Don't forget to reward if useful

  • How to display BLOB image column with WEB application, JSF, ADF BC

    I looking for a way to display the content from a blob column on a WEB application, JSF, ADF BC
    The blob column contains a JPEG image.
    About the application
    The model contains a viewobject where the blob column attribute (photoimg) type is of type : BlobDomain
    Now I have to create the view to display the content of photoimg inside a JSF-JSP page.
    Any advice ?

    Search is your friend
    How to display the content of a BLOB column in a ADF/BC pages ?
    John

  • How to display only selected columns in the table on the tableview

    Hi All,
    I am displaying in the below tableview the data from the SFLIGHTS tables in the tableview using flow logic. It displays all the columns in the database table. How can I set in the code to display only selected columns and not all columns.
    Also, in these columns displayed I want to make the key columns of SFLIGHT as non editable and the rest of the columns in SFLIGHT editiable. Can you please kindly share the code to implement this.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "10"
                           selectionMode   = "lineEdit"
                           table           = "<%= flights %>"
                           filter = "SERVER"
                           sort = "server"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks
    Karen

    Hi,
       Please try this code.
    <!-- To display Table control on BSP page with table internal table it_hist  --!>
              <htmlb:tableView id              = "TV_HIST"
                               headerText      = "Previous History"
                               headerVisible   = "TRUE"
                               footerVisible   = "TRUE"
                               design          = "ALTERNATING"
                               selectionMode   = "LINEEDIT"
                               visibleRowCount = "5"
                               fillUpEmptyRows = "TRUE"
                               table           = "<%= it_hist %>"
                               width           = "500" >
    <!--  to show selected columns give required field name --!>
    <htmlb:tableViewColumns>
      <htmlb:tableViewColumn columnName          = "FIELD1"
                                         title               = "COLUMN1"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD2"
                                         title               = "COLUMN2"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD3"
                                         title               = "COLUMN3"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
    <!--  to make column editable set edit property to TRUE --!>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         edit = "TRUE"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
                </htmlb:tableViewColumns>
              </htmlb:tableView>

  • How to display Rows as Columns in JSF?

    I am using dataTable component to get data for my Menu, i have one column in it which returns me the data, because its automatically adding <tr> and <td> tags to it, its showing data in tabular form.
    I want to show output Horizontally instead of Vertically the way its showing.
    Is their any way i can display Rows as Columns?
    Code:
    ==============================================
    <div class="bodyarea">
    <div id="location">
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <f:verbatim><ol></f:verbatim>
    <h:column>
    <f:verbatim><li></f:verbatim>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}"/>
    </h:outputLink>
    <f:verbatim></li></f:verbatim>
    </h:column>
    <f:verbatim></ol></f:verbatim>
    </h:dataTable>
    </div>
    </div>
    Thank you

    Table is not the html element for you, in this situation.
    I would use a dataList component (distributed with myfaces implementation).
    dataList is able to return a list of item, and using css you will be able display in a horizontal grid. (otherwise you can use layout="grid" in dataList).
    Anyway...my impression is that who made JSF was not really understanding how a html programmer like to write his code.
    Why do JSF gives us only the possibility to write list of items throught tables?
    Why do JSF prints error messages throught tables?
    Why div is not a standard component?
    This is an incredible lack...
    I see also other incredible lasks...but they don't concern html ;) .

  • How to display 3 month columns and YTD column

    Hello,
    I need a help. My report layout requires to display the data in 3 dynamic month columns and one Fiscal year Year-to-date column for a period of time. For example, ending month is FEB:
    Items : DEC : JAN : FEB : FY YTD
    A     : $10     : $11     : $12     : $100     
    B     : $1     : $2     : $3     : $10
    (Note: FY YTD is the total sum from OCT to FEB (5 months), not 3 months to be displayed)
    I tried to create a query and use Matrix with group, but the report always display five (5) month columns
    from OCT to FEB instead of displaying three (3) month columns. If the query is limited to display
    three months as desired, then the total sum will be 3 displayed months only (instead of 5 months).
    How to create a query or how to display three months and FY YTD or do anything else with Oracle Builder9i?
    Thanks,

    You could use the DECODE function and variables
    i.e. have a four column report
    in your query use somthing like
    , decode(period,:P_PERIOD1,1,0)* amount as period1
    , decode(period,:P_PERIOD2,1,0)* amount as period2
    , decode(period,:P_PERIOD3,1,0)* amount as period3
    , amount as ytd
    In your before report trigger poulate the variables with your required values

  • How to display record in hyperlink in JSP?

    Does any knows how to display the records in hyperlink? That's mean when I retrieve data from one database....two records...let's say peter and thomas....then i want the two records display in hyperlink....that's mean two records can be clicked by the user....and after the user clicked on either one of the record.....the record's value will be able to pass to the other page for use...
    Can anyone pls help me of this?Thank in advanced....

    This will pass the Value from the DB as Query Parameters to the Target JSP.
    Peter
    Thomas

  • How to display records when clicking button in alv

    I am using screen painter to create two buttons
    'classical' and 'alv'.
    When i click the first button control should move to
    corresponding classical program.Evan i got the answer
    I am not able to display the "select-options button" in the
    output as in classical report program.
    It displays all records instead of selecting particular records from select-option button.
    So how to display the select option button(i.e in the classical view program) while "clicking the classical button " .
    plz send me the coding....

    hi,
    try this.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
                     VBELN FOR V_VBELN MODIF ID G2.
    SELECTION-SCREEN END OF SCREEN 100 .
    PAI.
    module mod_name.
    case sy-ucomm.
    when 'BUTT!'.
    call selection-screen 100.
    when 'BUTT2'.
    """"your ALV logic"""".
    endcase.
    endmodule.
    if...any doubts revert back.
    Regards
    Sandeep Reddy

  • How to display records that match user input date

    hi all,
      i need to display records that match user input date (i.e., for example if the difference between user input date and record date is less than 5 years then display those records) , this is for hr bw. any exit is there to check for validation for records to be displayed based on some abap coding.
    vijay

    I just see getApplication method but "Retrieves a list of all the deployed applications."
    My scenario is: I get user, end i want to discorver how application this user i enable to see.

  • How to display table in editable mode

    hi all,
    I have displayed data using table wizard.Now i want to perform insert and delete row operations in table.but its displaying table in non-editable mode.
    can anyone tell me, what should i do to display it in editable mode.
    Thanks.

    Hi Swati,
    Please refer the link,
    How to display Table Control in Active mode
    Regards,
    Hema.
    Reward points if it is useful.

  • How to display row to columns without using pivot keyword

    hi,
    could someone help me how to dispaly rows into columns without using pivot keyword and actuall my scenario is,iam having two tables with names and sample data is shown below
    ID PROJECT MID MINAME TASKID TASKNAME
    1     PROJ1     1     AA     100     PR1_TASK1
    1     PROJ1     3     CC     102     PR1_TASK3
    1     PROJ1     4     DD     103     PR1_TASK4
    1     PROJ1     5     EE     104     PR1_TASK5
    1     PROJ1     6     FF     105     PR1_TASK6
    2     PROJ2     5     EE     114     PR2_TASK1
    2     PROJ2     6     FF     115     PR2_TASK2
    2     PROJ2     7     GG     116     PR2_TASK3
    2     PROJ2     8     HH     117     PR2_TASK4
    2     PROJ2     9     JJ     118     PR2_TASK5
    2     PROJ2     10     KK     119     PR2_TASK6
    2     PROJ2     1     AA     120     PR2_TASK7
    The output should display project and count of tasks in particular milestone as shown below
    project AA BB CC DD EE FF GG HH JJ KK
    1 2 0 1 5 3 2 0 2 1 0
    2 1 2 0 2 1 0 2 4 3 1
    Thanks in advance ,
    vvr

    WITH t1 AS
    (SELECT 1 ID,
             'PROJ1' PROJECT,
             1 MID,
             'AA' MINAME,
             100 TASKID,
             'PR1_TASK1' TASKNAME
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 3, 'CC', 102, 'PR1_TASK3'
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 4, 'DD', 103, 'PR1_TASK4'
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 5, 'EE', 104, 'PR1_TASK5'
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 6, 'FF', 105, 'PR1_TASK6'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 5, 'EE', 114, 'PR2_TASK1'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 6, 'FF', 115, 'PR2_TASK2'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 7, 'GG', 116, 'PR2_TASK3'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 8, 'HH', 117, 'PR2_TASK4'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 9, 'JJ', 118, 'PR1_TASK5'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 10, 'KK', 119, 'PR1_TASK6'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 1, 'AA', 120, 'PR1_TASK7' FROM DUAL)
    SELECT id project,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'AA'
                  AND id = t_out.id),
               0) AA,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'BB'
                  AND id = t_out.id),
               0) BB,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'CC'
                  AND id = t_out.id),
               0) CC,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'DD'
                  AND id = t_out.id),
               0) DD,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'EE'
                  AND id = t_out.id),
               0) EE,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'FF'
                  AND id = t_out.id),
               0) FF,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'GG'
                  AND id = t_out.id),
               0) GG,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'HH'
                  AND id = t_out.id),
               0) HH,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'JJ'
                  AND id = t_out.id),
               0) JJ,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'KK'
                  AND id = t_out.id),
               0) KK
      FROM (SELECT DISTINCT id FROM t1) t_out
    PROJECT     AA     BB     CC     DD     EE     FF     GG     HH     JJ     KK
    1     1     0     3     4     5     6     0     0     0     0
    2     1     0     0     0     5     6     7     8     9     10As I understand, you want MID of MINAMEs displayed ? But output is not like yours.. What is exactly your requirements?

Maybe you are looking for

  • C&Q no longer works with BIOS 1.A on 790FX GD70

    Hi all, as above. Ran into problems enabling C&Q after flashing BIOS to the latest even with same settings as previous. Was previously using version 1.5. Not sure anyone else had this prob? I am using a Phenom 2 965BE and Team Xtreem 1600 4GB. The pr

  • How do you get back to Lion?

    I bought a new MacBook Air (late 2011 model "on sale") that came loaded with Lion but with a free upgrade to ML. I noticed in Lion the expected user time on battery was over 7 hours (using Mail and Safari only, with wifi on). In my haste to get up to

  • Trouble with itunes after adding new nano

    I've had an ipod mini for some time and had no troubles. I just got a new 8gb nano and installed it (The latest version of itunes was already installed and working with my old mini). Itunes recognises both ipods (I gave them seperate names) and I hav

  • AJVOAF: Present record is getting is vanished when going for next record

    Dear Friends, In a table region i have 3 LOVs -- Material ,Subinventory and Locator ( I have made Subinventory and Locator LOVs as read only....as per Requirement) when material lov is clicked it displays material,subventory and locator. (After Mater

  • See disk in Finder but can not connect

    I see the Time Capsule in Finder in the Shared section, but when I click on it it says "connection failed" What could be wrong? Message was edited by: Christer Hiort1