To display output adjacent to each other

Hi,
I'm trying to display the following pattern
1
1 2
1 2 3
but when i tried something like this:
declare
i number;
j number;
begin
for i in 1..3 loop
for j in 1..i loop
dbms_output.put_line(j);
end loop;
end loop ;
end;
i'm getting the output like this:
1
1
2
1
2
3
i'm trying with different ways, but couldn't achive the required pattern...could someone help me out! (in C, this 'd have been lot easier).

SQL> DECLARE
  2      i NUMBER;
  3      j NUMBER;
  4  BEGIN
  5      FOR i IN 1 .. 3
  6      LOOP
  7          FOR j IN 1 .. i
  8          LOOP
  9              dbms_output.put(j);
10          END LOOP;
11          dbms_output.put_line('') ;
12      END LOOP;
13  END;
14  /
1
12
123
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • Logo and text required in the same window adjacent to each other

    Hi experts,
    Kindly provide a solution to get logo and some text adjacent to each other inside a single window using SAP SCRIPTS.

    pass th logo in to paint and add the text u want in to it.......
    and make it as a image file ...
    and use that image in ur script................
    Regards
    Anbu B

  • How to print two tables adjacent to each other?

    Hi,
    Scenario
    I have a form with a body page and two tables. The property of the body page is set to 'Flowed', 'top to bottom' as flow direction and the check box for page break is set.
    Requirement
    The two tables need to be printed adjacent to each other.
    Approach followed until now
    1. Since the body page is 'Flowed' type, the two tables are placed one below the other (Tab1 & Tab2). So I tried to set the Flow direction of the Body page to 'Western text'. But this did not solve the issue as since it is set to 'western text', only after Tab1 is rendered, table Tab2 starts printing itself, which is not desired. Both the tables should be printed at the same time.
    2. I wrapped both the tables in one sub form with 'Type' set to 'Positioned' and set the check box for page break. Now I arranged the tables adjacent to each other. But the check box for page break for both the tables were disabled and because of this if there is not enough space to print the total records of both the tables, the complete tables is shifted to another page leaving the previous page blank.
    Kindly suggest how to resolve this issue.
    Regards
    s@k

    Dear Andres,
    I tried as per you suggestion and it works fine. Thanks a lot.
    Now adding to this, I am trying to print the 'formatted text'. The tables have two columns. the first column is a normal field and the second column is table having the 'formatted text'.
    As per your suggestion, I concatenated the two tables in one table. So the final table has 2 normal fields and 2 tables.
    Final table structure:
    Column1      Column2(Table)             Blank             Column3          Column4(Table)
    Settings maintained:
    I have set the 'Body' row of the table to 'Flowed' with direction as 'Western text' (Top to bottom does not help ).
    The settings for Column 2 & 4 (tables) are maintained as:
    1. The Table is set to 'Flowed' with direction 'Top to Bottom'.
    2. The body row is 'Flowed' with direction 'Western Text'
    (The Border 'Edges' for the tables, columns is maintained as 'None')
    Issue:
    The sample data has around 10 entries in the (final)  table. When I try to print the form, if column2(table) is initial, the data in Column3 and 4 are shifted towards Left hand side.
    Kindly suggest how to resolve this issue.
    Regards
    s@k

  • How can I rasterize a spot color file without creating "border" pixels between areas that are adjacent to each other but should not be overlapping?

    We use Illustrator to create circuit layouts. For part of our process, we create an image of all of the layers using spot colors to show the printed layers overlapping each other. We then rasterize the file and send the image through a Matlab routine that performs some analysis of the circuits based on the colors of the pixels.
    In some cases, I have created images with areas next to each other, but not overlapping. When rasterizing the image, the rasterizing process appears to treat the borders as overlapping and creates a single pixel wide border between the 2 areas when there is none. This is playing havoc with our Matlab routine.
    I can manually go in and remove the rasterized border, however on some projects, this is a very lengthy process. Has anyone experienced anything like this, or have any ideas on how to prevent this?

    Would align to pixel grid help?
    Left is not aligned, Right is aligned to pixel grid

  • How to display different windows beside each other not on top of each other at bottom task bar

    When I open a new Firefox window, it stacks it on top of all the others in the task bar at the bottom. I would like them to be BESIDE each other. It used to do that. Now I have to hover over the ONLY Firefox item on the bottom task bar and read the list to find the one I want to go to. This is a waste of time and tedious.
    How can I change this?

    I think this is governed by your general Taskbar setting. Please see the attached screen shot. To get that dialog, right-click a blank area of the Taskbar and choose Properties.

  • How to split a report in several parts, displayed next to each other ?

    Hi all,
    I searched the forum, read the manuals, but couldn't find a way to do the following:
    I have a page, containing several regions. The bottommost region contains a narrow (2 small columns) report, with several tens of rows. This forces the user to always scroll the page vertically to get a complete overview.
    What I'd like to do is to split the display in sets of eg. 10 rows and display these sets horizontally next to each other. Something like this:
    xxx xxx               xxx xxx               xxx xxx
    xxx xxx               xxx xxx               xxx xxx
    xxx xxx               xxx xxx               xxx xxx
    Is this at all possible ? And if so, can you hint me how ?
    Thanks a lot in advance,
    Mark

    This thread might be helpful (but not my contributions I fear ;-)
    Re: SQL query report columns

  • VGA and HDMI ports are next to each other; any VGA cable blocks HDMI port; want 3 displays.

    The VGA & HDMI ports are right next to each other on the left side of the laptop.  I ultimately would like to connect two monitors to it, but am unable to occupy both ports because the everyday end of a VGA cable/extender is too wide. Any solutions?

    Hi, Firstly you won't get 3 displays without buying more hardware for your dv7 that why you won't be able to plug 2 ports at the same time. Regards.

  • I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button

    I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button to navigate back to my starting point the bookmarks are replaced by "page thumbnails". Is there anyway to stop this from happening?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • HP 2000 Notebook PC -- Extended display monitor and built-in screen swapping with each other.

       I have an extended display monitor connected to my notebook and every so often without any warning the displays will flicker to black screens, and then quickly swap back and forth  with each other 2 - 3 times, usually resuming the way it began.  Entire event lasts maybe 10 - 15 seconds total but during that time I have no control of my PC.  Anyone know how to stop this from occuring or what is causing it to happen?   Thanks for any assistance with this issue .
    HP 2000 Notebook PC - Product # :  D1E80UA#ABA  -  AMD Radeon HD 6310 Graphics  Windows 8.1 64-bit system.

    I'll try helping,
    If the flickering is seen in the extended display
    I think the issue may be with driver then,
    First
    Uninstall the AMD graphic driver from Device manager - Display adapter , Control panel.
    shut down laptop
    then try a hard reset
    this might help you in that-
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01684768&cc=us&dlc=en&lc=en&jumpid=reg_r1002_us...
    then,
    Tap away at the ESC key as you power on the notebook again to launch the Start-up Menu and then select F10 to enter the bios menu.
    Press F5 to load the defaults (sometimes F9, the menu at the bottom will show the correct key )
    use the arrow keys to select 'Yes' and hit enter.
    Press F10 to save the setting and again use the arrow keys to select 'Yes' and hit enter.
    Let Windows fully load - just let this complete.
    Then,
    download, saving & install the latest AMD HD Driver from your product website here:
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4158&lc=en&cc=us&dlc=en&sw_lang=&product=5360...
    Restart the system
    Check the issue.
    ++Please click KUDOS / White thumb to say thanks
    ++Please click ACCEPT AS SOLUTION to help others, find this solution faster
    **I'm a Volunteer, I do not work for HP**

  • I can't seem to access new mail on my I pad . I can only see strings of messages that are related to each other. I also have lost the ability to search for messages that are no longer on display on my I pad.

    I cannot seem to access properly any more the new e mail messages on my I pad. I can only see strings of messages that relate to each other.
    Also I cannot search for old messages that have now disappeared . The search bar has disappeared.
    Tom

    Try a reset: hold down the home button along with the power button until you see the Apple, then let go.

  • How to display items with pk/fk relationship not equal to each other

    I want to show that the values of the same field are not equal to each other
    In forms, how can I write below:
    If :blockB.chk_bx = 'N' then
    :blockA.rec_id <> :blockB.rec_id;
    also tried :blockA.rec_id != :blockB.rec_id; but get error message. Assume I cannot use the inequality sign.
    The rec_id in blockname A and B have a pk/fk relationship.
    Please help.

    I'm sorry i didn't understand your requirement.
    I want to show that the values of the same field are not equal to each otherSo you have an item in block A and an item in block B and you want to indicate that the value for these two items are different? How do you want to indicate that? Do you want to mark the field with some color? Do you want to have a checkbox next to it?
    In forms, how can I write below
    If :blockB.chk_bx = 'N' then
    :blockA.rec_id !=:blockB.rec_id;I assumed the != in the statement for its missing in your post. What do you expect the statement to do? Your statement is a comparison outside an IF or CASE-statement, maybe you want to do some
    IF :blockA.rec_id !=:blockB.rec_id THEN
      dosomestuff;
    END IF;
    The rec_id in blockname A and B have a pk/fk relationshipSo, did you connect the two block with a relation in forms? If yes, the values in the two blocks should always match.
    Perhaps cou could give some details about your requirement.

  • Rows to columns/Transpose the records Query and Display output

    hi ,
    can anyone help me query this and transpose it to this format?
    i am still a beginner in sql.
    thanks for help!
    Rows to columns/Transpose the records Query and Display output
    id     startdate     endate                    
    1111     1/2/2001     11/3/2001                    
    1111     2/5/2002     4/3/2002                    
    1111     2/6/2000     2/5/2001                    
    3333     5/2/2003     11/3/2003                    
    3333     6/2/2003     12/3/2003                    
    3333     2/6/2005     2/5/2005                    
    desired output     
    id     startdate1     endate1     startdate2     endate2     startdate3     endate3
    1111     1/2/2001     11/3/2001     2/5/2002     4/3/2002     2/6/2000     2/5/2001
    3333     5/2/2003     11/3/2003     6/2/2003     12/3/2003     2/6/2005     2/5/2005

    Have you only 3 dates for each id ?
    So, try :
    SQL> l
      1  with tbl as
      2  (select 1111 as id, to_date('01/02/2001','DD/MM/YYYY') startdate, to_date('11/03/2001','DD/MM/YYYY') enddate from dual union all
      3  select 1111 as id, to_date('02/05/2002','DD/MM/YYYY') startdate, to_date('04/03/2002','DD/MM/YYYY') enddate from dual union all
      4  select 1111 as id, to_date('02/06/2000','DD/MM/YYYY') startdate, to_date('02/05/2001','DD/MM/YYYY') enddate from dual union all
      5  select 3333 as id, to_date('05/02/2003','DD/MM/YYYY') startdate, to_date('11/03/2003','DD/MM/YYYY') enddate from dual union all
      6  select 3333 as id, to_date('06/02/2003','DD/MM/YYYY') startdate, to_date('12/03/2003','DD/MM/YYYY') enddate from dual union all
      7  select 3333 as id, to_date('02/06/2005','DD/MM/YYYY') startdate, to_date('02/05/2005','DD/MM/YYYY') enddate from dual )
      8  select id, max(decode(dr,1,startdate)) start1,
      9             max(decode(dr,1,enddate)) end1,
    10             max(decode(dr,2,startdate)) start2,
    11             max(decode(dr,2,enddate)) end2,
    12             max(decode(dr,3,startdate)) start3,
    13             max(decode(dr,3,enddate)) end3
    14  from (select id, startdate,enddate, dense_rank() over (partition by id order by startdate) dr from tbl)
    15* group by id
    SQL> /
                                                    ID START1   END1     START2   END2     START3   END3
                                                  1111 02/06/00 02/05/01 01/02/01 11/03/01 02/05/02 04/03/02
                                                  3333 05/02/03 11/03/03 06/02/03 12/03/03 02/06/05 02/05/05
    SQL> HTH,
    Nicolas.

  • How to display output only sort format in alv

    Hi Experts,
    I have one problem in alv output display. I'm developing alv report for orders raised during the period.I want to display each order wise value(netwr) and order quatity (kwmeng) . i set 8 radio buttons one radio btn click then i want output ex.in grid display click on sort then each order wise calculate the value and quantity . that particular data to display when click on radio button.
    ex:click on sort in grid display.
    (branch) (order no)     (quantity)   (value)                        (BSTNK)
    AMUM     0000003354     2             10                                    3,271
    AMUM     0000003354     1              10                                    6,542
                                                       (above qty sum 2+1=3)  
    (SUM) =   AMUM       0000003354            3                       20            9,813
    HIP2         0000003362     2           5     17,810
    HIP2             0000003362     1          5     23,075
    (sum) = HIP2          0000003362                 10           40,885
    i display output in alv griddisplay.client asking one rb put in selection screen i want output like above only sum col.
    when i click one radio button output is come like (sum) above.
    Please help me.
    Thanks & Regards,
    Balakrishna Gajula

    hi you need to use sortinfo for your requirement.
    ie see the below code.
    "declare sortinfo at data declaration
    data:   wa_sort     type slis_sortinfo_alv,      "''' add this
                layout      type slis_layout_alv.          "add this
    ""make the below changes in your fieldcat
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'Td - Rvdt'.
      wa_fieldcat-fieldname = 'QUANTITY'.
      wa_fieldcat-do_sum    = 'X'.          """"""add this to your  *QUANTITY field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'temp''.
      wa_fieldcat-fieldname = 'VALUE'.
      wa_fieldcat-do_sum    = 'X'.             """"""add this to your  *VALUE field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    """"" you need to add this after workarea of fieldcat
      wa_sort-fieldname =  'BRANCH'.  " Here Branch indicates the fieldname
      wa_sort-subtot    = 'X'.
      append wa_sort to it_sort.
      clear wa_sort.
      wa_sort-fieldname = 'ORDERNO'.
      append wa_sort to it_sort.
      clear wa_sort.
    " in your alv fm add sortinfo
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-cprog
          is_layout          = layout
          it_fieldcat        = it_fieldcat
          it_sort            = it_sort                   """""""""add this
        tables
          t_outtab           = final                   " your internal table name
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    This solves your purpose.
    Regards,
    koolspy.

  • How to get multiple output formats for each execution of the report?

    Hi,
    Is it possible to get multiple output formats for each execution of the report? If so can you provide some details?
    Thanks

    In Reports 6i, Reports Distribution was introduced. This allows you to run the report once and output to a number of destinations with a different format. It also allows you to distribute individual sections within a report to different destinations in different formats.
    The Destinations for a Report to distribute to are defined either in a distribution file and passed on the command line or inside of the report definition.
    To add a destination to the the report definition, bring up the property palette against the report object and then select the "Distribution" property under the "Report" node. This will bring up a dialog that allows you to create a distribution list. You can then test this list by selecting "file->distribute" from the menu.
    To run a report that is to be distributed through rwrun60, you need to add "distribute=yes" to the command line. It will pick up the destinations from the report definition. If you add "destination=<filename>" then it will pick up the destinations from the specified "<filename>" and ignore the destinations in the report definition.
    Note: if "distribute=yes" is specified on the command line then the destype/desname/desformat parameters will be used to format the report (ie: which printer/display to use during formatting for sizing objects) but will be ignored when the report is sent to the destinations.

  • On some pages the text from more than one paragraph stack up on top of each other, like writing something then writing something else on top of it.

    On some pages the text from more than one paragraph stack up on top of each other, like writing something then writing something else over the top of it. Some pages will run text and pictures together, like a car rear-ending another or a train pile up. Other pages will cut an image or text short, i.e. it will display a portion of the top of the image or text but not the rest. This happens on Amazon for example, the section where it says "Customers who looked at this also looked at" will allow only a certain amount of the upper portion of the description immediately below the picture of the product but below that section everything is fine until I get to another section displaying more products and their descriptions and then it cuts the bottom portions off again. I've noticed this behavior mostly in the sections with product photos, the text sections seem okay. YouTube also displays this behavior. It's even doing it on this page right now. Below this box I can read "The more information you can provide the better chance your question will be answered " , but directly below that in the next sentence I can see the start of it with "Troublshootin" and the "Automatically Add" in a green field covering the "g". The next clear text is "A window will open in the top corner. Click Allow, and then click Install. If the automated way doesn't work, try these manual steps." I tried turning of pre-fetching, clearing history, cookies, and cache, scanning for malware with Avast and Windows Defender all to no avail. It began when I upgraded from dial up to DSL via AT&T Uverse. I have a Motorola NVG510 modem. The modem was replaced an hour ago along with new dedicated lines and DSL/Phone splitter from the box by an AT&T technician to make sure my incoming lines were up to par. He ran a connection test and verified everything is up to standards. IE does not display this behavior. I am running Firefox20.0.1 and all previous versions have acted the same way since I upgraded to DSL about 3 months ago.

    If you have increased the minimum font size then try the default setting "none" in case the current setting is causing problems.
    *Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    Make sure that you allow websites to choose their fonts.
    *Tools > Options > Content : Fonts & Colors > Advanced: [X] "Allow pages to choose their own fonts, instead of my selections above"
    It is better not to increase the minimum font size, but use an extension to set the default page zoom to prevent issues with text not being displayed properly.
    You can use an extension to set a default font size and page zoom on web pages.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

Maybe you are looking for

  • Can't convert Word 2000 file to pdf

    Hello: I have Acrobat 9 Standard (v. 9.3.4). I try to convert (Create menu) a Word 2000 file, but get the error message "The document or path is not valid." Still, the doc file opens, and the conversion seems to take place, but when completed, Acroba

  • Field name not displyed

    hi frends, i am developing a report in ABAP in ALV view. but when i run the report only the first two column names are coming according to my code.rest column names are same. like the in following format PR NO      PR DATE       QUANTITY      QUANTIT

  • Could threads of a same process run on different CPU in the same time ?

    Hello, probably stupid question..., but I would like to understand if several threads inside a same process can run in the same time on separate CPU. If the response is positive, how can I bind a thread on differant CPU using C API ? Also what is the

  • Itunes install fails on windows vista

    I had done an update to iTunes some time ago. It failed. I tried all the methods to fix it and in the end removed iTunes, Quicktime, etc. I have removed the programs. deleted the directories and cleaned the registries of the misc entries (using RegCu

  • GOTO option in WAD 7.0

    Hi,      We had created the pie chart on the customer sales query in the WAD 7.0 and by using RRI we are opening the other WAD template(product details) by clicking on the goto option on the chart.while assigning in RRI we have not taken any in pie c