Pivoting of three columns

Hi Team,
I am facing an issue with pivoting of multiple columns. Here is my scenario. I have given an example for 5 transactions but there can be 50 maximum transactions, so by default there should be 50 columns for each of the column (pymnt_type,transaction amt,
transaction date)
--Input
IF OBJECT_ID('tempdb..#tmp1') IS NOT NULL DROP TABLE #tmp1
Create table #tmp1
accntid BIGINT,
pymnt_type Varchar(20),
TransactionAmt decimal(10,2),
TransactionDate datetime
Insert into #tmp1 Values(1,'CHCK',100,'10/15/2012 11:18:08 AM')
Insert into #tmp1 Values(1,'CASH',200,'10/15/2012 11:18:11 AM')
Insert into #tmp1 Values(1,'CHCK',300,'10/15/2012 11:18:11 AM')
Insert into #tmp1 Values(1,'amazing12345',20,'10/31/2012')
Insert into #tmp1 Values(1,'CHCK',-100,'1/31/2013 12:21:47 PM')
Insert into #tmp1 Values(2,'CHCK',100,'10/15/2012 11:18:08 AM')
Insert into #tmp1 Values(2,'CHCK',200,'10/15/2012 11:18:11 AM')
Insert into #tmp1 Values(2,'CHCK',300,'10/15/2012 11:18:11 AM')
Insert into #tmp1 Values(3,'amazing12345',-3.33,'1/31/2013 12:21:47 PM')
Insert into #tmp1 Values(3,'CHCK',-0.13,'1/31/2013 12:34:17 PM')
Insert into #tmp1 Values(3,'CHCK',-300,'1/31/2013 12:41:35 PM')
Insert into #tmp1 Values(3,'CHCK',-0.2,'1/31/2013 12:41:35 PM')
select *from #tmp1
--expected Ouput shows only 5 occurrance but it can maximum 50 transactions so by default it should 50 (*3 pymnt_type,Trans amount, trans date)
Select 1 accntId,'CHCK' Pymnt_type1,100 TransactionAmt1,'10/15/2012 11:18:08 AM' TransactionDate1,'CASH' Pymnt_type2,200 TransactionAmt2,'10/15/2012 11:18:11 AM'TransactionDate2,'CHCK' Pymnt_type3,300 TransactionAmt3,'10/15/2012 11:18:11 AM' TransactionDate3,'amazing12345' Pymnt_type4,20 TransactionAmt4,'10/31/2012' TransactionDate4,'CHCK' Pymnt_type5,-100 TransactionAmt5,'1/31/2013 12:21:47 PM'TransactionDate5 Union all
Select 2,'CHCK',100,'10/15/2012 11:18:08 AM','CHCK',200,'10/15/2012 11:18:11 AM','CHCK',300,'10/15/2012 11:18:11 AM','',null,'','',null,'' Union all
Select 3,'amazing12345',-3.33,'1/31/2013 12:21:47 PM','CHCK',-0.13,'1/31/2013 12:34:17 PM','CHCK',-300,'1/31/2013 12:41:35 PM','CHCK',-0.2,'1/31/2013 12:41:35 PM','',null,''
Thanks,Eshwar.
Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.

Try this,
;with cte as (
select *,
'Pymnt_type' + cast(rn as varchar) PayCol,
'TransactionAmt' + cast(rn as varchar) TransCol,
'TransactionDate' + cast(rn as varchar) TransDCol
from (select *,row_number() over (partition by accntid order by accntid) rn from #tmp1) x
),cte1 as (
select * from (select accntid,pymnt_type,paycol from cte) x
pivot(max(pymnt_type) for payCol in (Pymnt_type1,Pymnt_type2,Pymnt_type3,Pymnt_type4,Pymnt_type5)) pvt
),cte2 as (
select * from (select accntid,TransactionAmt,transcol from cte) x
pivot(max(TransactionAmt) for transCol in (TransactionAmt1,TransactionAmt2,TransactionAmt3,TransactionAmt4,TransactionAmt5)) pvt2
),cte3 as (
select * from (select accntid,TransactionDate,transdcol from cte) x
pivot(max(TransactionDate) for transDCol in (TransactionDAte1,TransactionDAte2,TransactionDAte3,TransactionDAte4,TransactionDAte5)) pvt3
select a.accntid,a.Pymnt_type1,a.Pymnt_type2,a.Pymnt_type3,a.Pymnt_type4,a.Pymnt_type5,
b.TransactionAmt1,b.TransactionAmt2,b.TransactionAmt3,b.TransactionAmt4,b.TransactionAmt5,
c.TransactionDAte1,c.TransactionDAte2,c.TransactionDAte3,c.TransactionDAte4,c.TransactionDAte5
from cte1 a
inner join cte2 b on a.accntid = b.accntid
inner join cte3 c on a.accntid = c.accntid
Regards, RSingh

Similar Messages

  • Displaying 20 checkboxes in three columns

    In order to display a database item (table 1) item as check box.
    the values of chexk boxes are the results of another table with 20 records (table2), this I will have 20 check box in my form.
    I proceed like the following :
    I created a region with type is SQL Query ,
    the query is :
    select x.name, x.code
    from (select wwv_flow_item.display_and_save(1, table2.name) as name, htmldb_item.checkbox (2, table2.code, null, decode (table1.code_..., null, 0, table2.code)) as code
    from table2 table2 left outer join table1 table1
    on table2.code = table1.code_..and table1.code_ = :page_CODE) x
    ANYWAY, the I have my result, BUT ,
    because I have 20 cheeck boxex, I want to display them
    in a way that they appear in three columns.
    How can I change my query or how can I do it???????
    NOTE : using Lists is not a solution for me!!!!
    Thanks for any Help!

    First "392451", asking Raj the same question twice within a span of 16 hours will probably not get your question answered any faster. He is only one man and has a lot of questions coming in, not to mention other job responsibilities. Second, he's on the West coast, so is not up yet.
    Now on to your answer. I've used this phrase before, and it definitely applies here: This is not an HTML DB 101 answer. You asked a challenging question (and a good one at that), so the answer may challenge you a bit too. I'll use the emp table which has 14 rows for this example, but this should work for any table.
    First, lets get the empno and ename columns to use for our checkboxes. I'm going to create 2 additional columns, col_num and grp_by to use in the next step. The text description of "col_num" from the inside-out is: take the rownum, now divide it by 3 and give me the remainder (mod(n,3)) which will return 0,1, or 2, then replace any of the 0's with 3's so it will return 1,2 or 3. We will use these numbers for our 3 columns in the next step.
    The grp_by column is simply the rownum divided by 3, rounded up to the next highest integer. The results of rownum divided by 3 for the first 3 rows are .33, .66, and 1. When you apply ceil(n) to these, they all become 1. This will give us a column to group by in the final step.
    All of these queries can be run in SQL Workshop, assuming the schema you run it as has access to the emp table.
    OK, let's start with the first query:
    select empno,ename,
           replace(mod(rownum,3),0,3) col_num /* alias to col_num */,
           ceil(rownum/3) grp_by /* alias to grp_by */
          from(
                select empno,ename
                  from emp
                 order by ename)
         EMPNO ENAME      COL_NUM                                      GRP_BY
          7876 ADAMS      1                                                 1
          7499 ALLEN      2                                                 1
          7698 BLAKE      3                                                 1
          7782 CLARK      1                                                 2
          7902 FORD       2                                                 2
          7900 JAMES      3                                                 2
          7566 JONES      1                                                 3
          7839 KING       2                                                 3
          7654 MARTIN     3                                                 3
          7934 MILLER     1                                                 4
          7788 SCOTT      2                                                 4
          7369 SMITH      3                                                 4
          7844 TURNER     1                                                 5
          7521 WARD       2                                                 5Now, let's pivot the rows to columns. Any row with a value of col_num = 1 will be in the first column, col_num=2 will be in the second column, etc...
    select decode(col_num,1,empno||'-'||ename) col1,
           decode(col_num,2,empno||'-'||ename) col2,
           decode(col_num,3,empno||'-'||ename) col3
      from(
        select empno,ename,
               replace(mod(rownum,3),0,3) col_num /* alias to col_num */,
               ceil(rownum/3) grp_by /* alias to grp_by */
              from(
                    select empno,ename
                      from emp
                     order by ename))
    COL1         COL2        COL3
    7876-ADAMS 
                 7499-ALLEN
                             7698-BLAKE
    7782-CLARK 
                 7902-FORD
                             7900-JAMES
    7566-JONES 
                 7839-KING
                             7654-MARTIN
    7934-MILLER
                 7788-SCOTT
                             7369-SMITH
    7844-TURNER
                 7521-WARDNow, we need to "compress" our results so the empty gaps are filled in. This is where the grp_by column comes in. I'll add a max() around the the_col1 etc column so I can use a group by on the query. I will then group by the grp_by column:
    select max(decode(col_num,1,empno||'-'||ename)) col1,
           max(decode(col_num,2,empno||'-'||ename)) col2,
           max(decode(col_num,3,empno||'-'||ename)) col3
      from(
        select empno,ename,
               replace(mod(rownum,3),0,3) col_num /* alias to col_num */,
               ceil(rownum/3) grp_by /* alias to grp_by */
              from(
                    select empno,ename
                      from emp
                     order by ename))
    group by grp_by
    COL1         COL2          COL3
    7876-ADAMS   7499-ALLEN    7698-BLAKE
    7782-CLARK   7902-FORD     7900-JAMES
    7566-JONES   7839-KING     7654-MARTIN
    7934-MILLER  7788-SCOTT    7369-SMITH
    7844-TURNER  7521-WARD    Now, simply replace the empno concatenated to ename with a call to htmldb_item.checkbox. Use the "col_num" column for the value p_idx,and the empno column for the value of p_value. Then concatenate in initcap(ename) so the checkbox has a label:
    select max(decode(col_num,1,htmldb_item.checkbox(col_num,empno)||initcap(ename))) col1,
           max(decode(col_num,2,htmldb_item.checkbox(col_num,empno)||initcap(ename))) col2,
           max(decode(col_num,3,htmldb_item.checkbox(col_num,empno)||initcap(ename))) col3
      from(
        select empno,ename,
               replace(mod(rownum,3),0,3) col_num /* alias to col_num */,
               ceil(rownum/3) grp_by /* alias to grp_by */
              from(
                    select empno,ename
                      from emp
                     order by ename))
    group by grp_by
    (Can't display the results here.  Try in SQL Workshop.)Good luck,
    Tyler

  • PIVOT with multiple columns to add and multiple levels of grouping

    Hi friends,
    I got a table with the columns in the form of:
    CRITERIA_A,
    CRITERIA_B,
    CRITERIA_C,
    AMOUNT_A,
    AMOUNT_B,
    AMOUNT_C,
    AMOUNT_D
    Any way to design a pivot to present the table reflecting:
    Sums of Amount_A, Amount_B, Amount_C, Amount_D
    For Rows reflecting grouping levels on:
    Criteria_B, Criteria_C
    and Columns breakup for:
    Criteria_A?
    An example like:
    Criteria_A1
    Criteria_A2
    Criteria_A3
    Criteria_A4
    Row Labels
    Sum of Amount_A
    Sum of Amount_B
    Sum of Amount_C
    Sum of Amount_D
    Sum of Amount_A
    Sum of Amount_B
    Sum of Amount_C
    Sum of Amount_D
    Sum of Amount_A
    Sum of Amount_B
    Sum of Amount_C
    Sum of Amount_D
    Sum of Amount_A
    Criteria_B3
    94
    107
    36
    127
    84
    132
    41
    176
    24
    16
    67
    29
    38
    Criteria_C1
    24
    25
    5
    49
    14
    66
    5
    49
    24
    16
    67
    29
    Criteria_C2
    70
    82
    31
    78
    38
    Criteria_C3
    38
    41
    31
    78
    Criteria_C4
    32
    25
    5
    49
    Criteria_B1
    56
    142
    78
    26
    32
    25
    67
    8
    24
    Criteria_C2
    24
    66
    26
    8
    32
    25
    67
    8
    Criteria_C3
    32
    76
    52
    18
    Criteria_C4
    24
    Criteria_B2
    162
    309
    264
    81
    132
    230
    155
    124
    14
    25
    52
    8
    38
    Criteria_C1
    38
    76
    26
    8
    62
    98
    98
    66
    14
    25
    52
    8
    38
    Criteria_C2
    86
    157
    186
    44
    70
    132
    57
    58
    Criteria_C3
    38
    76
    52
    29
    Criteria_B4
    100
    148
    130
    116
    56
    142
    93
    57
    46
    Criteria_C1
    24
    66
    67
    49
    32
    Criteria_C2
    32
    76
    26
    8
    14
    Criteria_C3
    76
    82
    78
    67
    Criteria_C4
    24
    66
    52
    49
    Grand Total
    312
    558
    378
    234
    348
    535
    393
    424
    94
    183
    212
    94
    146
    Thanx in advance, Best Regards, Faraz A Qureshi

    Sounds like this to me if in T-SQL query
    (best guess based on what you posted)
    SELECT
    CRITERIA_B,
    CRITERIA_C,
    SUM(CASE WHEN CRITERIA_A = 'Critera_A1' THEN AMOUNT_A ELSE 0 END) AS CRITERIA_A1_AMOUNT_A,
    SUM(CASE WHEN CRITERIA_A = 'Critera_A1' THEN AMOUNT_B ELSE 0 END) AS CRITERIA_A1_AMOUNT_B,
    SUM(CASE WHEN CRITERIA_A = 'Critera_A1' THEN AMOUNT_C ELSE 0 END) AS CRITERIA_A1_AMOUNT_C,
    SUM(CASE WHEN CRITERIA_A = 'Critera_A2' THEN AMOUNT_A ELSE 0 END) AS CRITERIA_A2_AMOUNT_A,
    SUM(CASE WHEN CRITERIA_A = 'Critera_A2' THEN AMOUNT_B ELSE 0 END) AS CRITERIA_A2_AMOUNT_B,
    SUM(CASE WHEN CRITERIA_A = 'Critera_A2' THEN AMOUNT_C ELSE 0 END) AS CRITERIA_A2_AMOUNT_C,
    SUM(CASE WHEN CRITERIA_A = 'Critera_AN' THEN AMOUNT_A ELSE 0 END) AS CRITERIA_AN_AMOUNT_A,
    SUM(CASE WHEN CRITERIA_A = 'Critera_AN' THEN AMOUNT_B ELSE 0 END) AS CRITERIA_AN_AMOUNT_B,
    SUM(CASE WHEN CRITERIA_A = 'Critera_AN' THEN AMOUNT_C ELSE 0 END) AS CRITERIA_AN_AMOUNT_C,
    FROM Table
    GROUP BY CRITERIA_B,
    CRITERIA_C
    to make it dynamic see
    http://beyondrelational.com/modules/2/blogs/70/posts/10791/dynamic-crosstab-with-multiple-pivot-columns.aspx
    However it would be much easier to build this in SSRS reports using matrix if you can use it.
    In that case just bring data as is
    then add a matrix to report
    Add column grouping on Criteria A and Row grouping on Criteria B and then Criteria C .
    In data portion add three columns with expressions as
    =SUM(Fields!Amount_A.Value)
    =SUM(Fields!Amount_B.Value)
    =SUM(Fields!Amount_C.Value)
    then you will get exact format  what you're asking for
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Radio button in three column in a single selection-screen

    Hi,
    I am trying to create radio buttons with three column within a single selection-screen.
    I.e.
    Column 1:
    radio1
    Column2:
    radio2
    radio3
    column3:
    radio4
    radio5
    radio6
    Also I wish to give three names(as headers) to each columns.Is is possible?If yes how?

    Hi,
    write as :
    SELECTION-SCREEN COMMENT /1(50) text-001.
    PARAMETERS: r1 RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN COMMENT /1(30) text-002.
    PARAMETERS: r2 RADIOBUTTON GROUP rad1,
                r3 RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN COMMENT /1(30) text-003.
    PARAMETERS: r4 RADIOBUTTON GROUP rad1,
                             r5 RADIOBUTTON GROUP rad1,
                             r6 RADIOBUTTON GROUP rad1.
    Regards,
    Srini.

  • How to add three columns under a column of Column Structure in BEx Query ??

    Hi all,
        I have created a Structure for Taxes (with 10 rows) under Rows and another Structure for Company under Columns and it has 3 columns like Company A, B & C. Now I want to have three columns (Actual, Forecast & Total) under each company A, B & C. It means it will have 9 columns under these 3 companies.
      The ACTUAL should calculated as:
              Version = 100 and
              Months = Plan Begin Month - 1.
      If the Plan Begin Month is 4 (April) then ACTUAL should be calculated for first 3 (4 - 1) months only.
       The FORECAST should calculated as:
              Version = 699 and
              Months = From 4 (April) to 12 (December).
       'Plan Begin Month' will be entered on the selection screen.
       How can I design this query, PLEASE ?
        Thanks in advance.
    Regards,
    Venkat.

    Hi Ravi,
        Thanks for your quick response.
        The ACTUAL should calculated as:
              Version = 100 and
              Months = Plan Begin Month - 1.
              If the Plan Begin Month is 4 (April) then ACTUAL should be calculated for first 3 (4 - 1) months only.
       The FORECAST should calculated as:
              Version = 699 and
              Months = From 4 (April) to 12 (December).
          I am unable to create the Restricted Key Figure with Version.
         How can I design it, PLEASE ?
    Thanks,
    Venkat.

  • How do I build a model calendar page with three columns and two or three lines per day?

    I am trying to build a Page that has three columns with lines in each column that will be numbered according to each month. Then each month I plan to type in the birth dates, anniversaries, special occasions of my family. There will be over 120 entries.Thus far when I take a blank page from Pages and begin to type in the event, it remove the underline I had put in. I imagine I should be able to build one model page and then replicate it as I go from month to month. Thus far I have been unsuccessful. Any help will be sincerely appreciated.
    Ken Melley

    You could use a Table to set up your information in Pages 5.2, unfortunately it has a bug that makes the table moire or less unusable after a few pages.
    Contacts stores all your Address Book information. NJust add all the name, telephone number, address etc and there is an additional field for birthdays, anniversaries etc. Anything else you can put in the notes:
    http://computers.tutsplus.com/tutorials/contacts-101-a-beginners-guide-to-contac ts-on-os-x--mac-51751
    Calendar lets you run separate sets of dates in a desktop calendar, which can include birthdays, anniversaries or any single or recurring events. Any names you use here will be cross referenced to Contacts.
    http://www.macworld.com/article/2057229/get-to-know-os-x-mavericks-calendar.html
    Peter

  • How do I set up a two or three column schedule in iCal? Looking to have multiple person listing appointment times.

    How do I set up a two or three column schedule in iCal? Looking to have multiple person listing appointment times.

    How do I set up a two or three column schedule in iCal? Looking to have multiple person listing appointment times.

  • Help with "clearing" in three column format

    The code is pasted in below of a three column page I have created.  However, the background color in the sidebars does not reach to the footer it follows the content.  I know that I need to "clear" the columns but as a newbie I'm not sure how to do so.  Any help would be appreciated.
    Thanks!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body  {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background: #CCC;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    .thrColLiqHdr #container {
    width: 80%;  /* this will create a container 80% of the browser width */
    background: #FFFFFF;
    margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
    border: 1px solid #000000;
    text-align: left; /* this overrides the text-align: center on the body element. */
    .thrColLiqHdr #header {
    background: #DDDDDD;
    padding: 0 10px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
    .thrColLiqHdr #header h1 {
    margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
    padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    /* Tips for sidebars:
    1. Since we are working in percentages, it's best not to use side padding on the sidebars. It will be added to the width for standards compliant browsers creating an unknown actual width.
    2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".thrColLiqHdr #sidebar1 p" rule.
    3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns.
    .thrColLiqHdr #sidebar1 {
    float: left; /* this element must precede in the source order any element you would like it be positioned next to */
    width: 30%; /* since this element is floated, a width must be given */
    background: #3399FF; /* the background color will be displayed for the length of the content in the column, but no further */
    padding: 15px 0; /* top and bottom padding create visual space within this div  */
    .thrColLiqHdr #sidebar2 {
    float: right; /* this element must precede in the source order any element you would like it be positioned next to */
    width: 30%; /* since this element is floated, a width must be given */
    background: #3399FF; /* the background color will be displayed for the length of the content in the column, but no further */
    padding: 15px 0; /* top and bottom padding create visual space within this div */
    .thrColLiqHdr #sidebar1 p, .thrColLiqHdr #sidebar1 h3, .thrColLiqHdr #sidebar2 p, .thrColLiqHdr #sidebar2 h3 {
    margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
    margin-right: 10px;
    /* Tips for mainContent:
    1. the space between the mainContent and sidebars is created with the left and right margins on the mainContent div.
    2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 300px or smaller (this includes images).
    3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs.
    .thrColLiqHdr #mainContent {
    margin: 0 24% 0 23.5%; /* the right and left margins on this div element creates the two outer columns on the sides of the page. No matter how much content the sidebar divs contain, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the sidebar spaces when the content in each sidebar ends. */
    .thrColLiqHdr #footer {
    padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
    background:#DDDDDD;
    .thrColLiqHdr #footer p {
    margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    /* Miscellaneous classes for reuse */
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page The floated element must precede the element it should be next to on the page. */
    float: left;
    margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain its child floats */
    clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    a:link {
    text-decoration: none;
    color: #000;
    a:visited {
    text-decoration: none;
    color: #000;
    a:hover {
    text-decoration: none;
    a:active {
    text-decoration: none;
    -->
    </style><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .thrColLiqHdr #sidebar2, .thrColLiqHdr #sidebar1 { padding-top: 30px; }
    .thrColLiqHdr #mainContent { zoom: 1; padding-top: 15px; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]--></head>
    <body class="thrColLiqHdr">
    <div id="container">
    <div id="header">
        <h1>Header</h1>
      <!-- end #header --></div>
      <div id="sidebar1">
    <h3>Today's Top Health News</h3>
        <p>Vitmains C and E cleared in melanoma scare. </p>
    <p>Older men often binge drink, too</p>
    <p>Short kids are psychologically OK</p>
    <p>New drug for schizophrenia and bipolar disorder approved</p>
    <p>Mediterrenean Diet plus exercise lowers risk of Alzheimer's Disease</p>
    <p>Not enough sleep may raise the risk of diabetes</p>
      <!-- end #sidebar1 --></div>
      <div id="sidebar2">
        <h3>Podcasts: In-depth, awarding winning Radio Health Journal Reporting</h3>
        <p><img src="../graphics/I-am-safe-now.jpg" width="106" height="80" align="left" />
    <p>Perinatal Hospice: Giving meaning and easing grief when birth to death is measured in hours </p>
    <p>Medical Mystery Shoppers: Fake patient who keep healthcare quality high</p>
    <p>Pediatric Live Transplants: Children can receive a slice from a living adult donor</p>
    <p>The Selling of healthcare reform: Why revved up rhetoric matters more than facts</p>
    <p>Early Alzheimer's diagnosis: The benefits of early treatment</p>
    <p>Dementia drugs: Are medications too common in nursing homes?</p>
    <p>Pregorexia: Anorexia while pregnant-more common than we think</p>
    <p>Mop men: People who clean up after unexpected death</p>
    <p>Gout: The return of the "disease of kings"</p>
    <p>Prevention and healthcare reform: How much money can prevention really save?</p>
      <!-- end #sidebar2 --></div>
      <div id="mainContent">
        <h1> Featured Content </h1>
        <p><a href="http://speakaboutbipolardepression.com/">The economy is leadiny many Americans to feel additional stress.  This is particularly concerning for the more than 8 million Americans with bipolar disorder.</a></p>
        <p>As modern medicine extends life expectancy, prevelance of Alzheimer's Disease in the U.S. is expected to skyrocket from about 5 million to 16 million in 2050.  Understanding risk factors is more important than ever. </p>
        <p>You might thing a blood transfusion ordered by a physician would be safe and effective.  But a new analysis by an international panel sbows most transfusions have little benefit.  In fact, they may be dangerous.</p>
        <h2>Information about our program's guests </h2>
        <p>Developing A Brain Eraser: Dr. Andre Fenton</p>
    <p>Too sexy, Too soon: Kids, the media, and sex: Dr. Diane Levin, author of "So Sexy So Soon: The new sexualized childhood and what parents can do to protect their kids"</p>
    <p>Everything You Always Wanted To Know About...Death: Harold Schechter, author of "The Whole Death Catalog: A Lively Guide To The Bitter End"</p>
    <p>Borderline Personality Disorder: Randi Kreger, cofounder of BPDcentral.com</p>
    <!-- end #mainContent --></div>
    <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />
      <div id="footer">
        <p>Footer</p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    </html>

    Are you posting to the right forum? This is a Designer form where we are working with PDF forms. This looks like HTML!
    Paul

  • Deleting duplicate rows based on three columns in Oracle 8i

    Hi all,
    The database we use is Oracle 8i.
    The query below raises the too_many_rows exception when I launch an application. So I want to delete the duplicated rows :
    select polarisation_1, polarisation_2
    into v_pol1_tech, v_pol2_tech
    from v_cfh_lien_element
    where nom_lien = p_nom_lien
    AND num_canal_1 = p_num_canal_1
    AND freq_emise_1 = p_freq_emise_1;
    Notice that with many possible values of the parameters p_nom_lien, p_num_canal_1 and p_freq_emise_1 then the exception is raised.
    So how to delete generally the duplicated rows based on the three columns "nom_lien" , "num_canal_1" and "freq_emise_1" ?
    Thank you very much indeed.

    Check the other thread with same question deleting duplicate rows based on three columns in Oracle 8i

  • Problem with displaying same field in three columns

    Hi
    I am using reports developer 11g and I have created a report which displays only one field (column), which is id_number as output but I have a problem now.
    I would like to display the id_number in three columns on one page to save paper, that is, I want to show the first 20 (1 - 20) id_numbers in one column going down, then display the next 20 id_numbers (21 - 40) on the second column on the same page and the next 20 (41 - 60) on the third column still on the same page. If there are more than 60 id_numbers, they should be printed on the next page again in three columns, and so on until all the id_numbers are displayed. How can I achieve this? Could you please assist me?
    Thanks.

    Andreas, I think I am missing something here. I have done what you have said but still the id_numbers are all being displayed
    in the first column and jumps on to the next page without displaying the id_numbers across the page in columns.
    My data model contains a group with not only the id_number but has other fields which I am not displaying.
    I am only using the other fields just to use them in conditions to select only id_numbers which meet a certain criteria which I then display in the report.
    I have created a repeating frame for that group and changed the orientation property to Down/Across. Within that frame, I have a field for the id_number
    which I want displayed in three columns, running across the page as I have already told you. Please help.
    Thanks.

  • Photo Gallery combined with three column CSS

    Hi, I am trying to implement your photo gallery into our
    school site and I am having trouble with the layout. I am using a
    three-column layout created with CSS and JS, and then placing the
    photo gallery inside of this. What happens is when you pull up the
    page the three column layout does not position everything correctly
    until you resize the browser window (ever so slightly). Help, have
    been staring at CSS and JS code now for about a month and cannot
    get it to behave, any help would be greatly appreciated. Thanks.
    HSPVA Photo
    Gallery

    "kjuliff" <[email protected]> wrote in message
    news:eqij22$are$[email protected]..
    >I can reproduce your problem, gnd4evr&evr. I have XP
    an IE7 and FF2.
    >It's fine
    > in FF2 but not in IE7.
    >
    > I have a similar problem, and I think it's related. This
    problem
    > really needs
    > addressing!
    >
    > Go to
    http://www.coolabah.com/spry/demos/gallery/
    and look at the
    > bottom of
    > the page (in either IE or FF). You will see a google
    adsense div.
    > Although it
    > is specified in it's div tab as being 15 px in height,
    it takes up
    > much more
    > than that.
    >
    > I HAD wanted to have these google links at the top of my
    gallery, but
    > cannot
    > as I cannot force the div to be only 15px in height.
    >
    > I posted this problem a few weeks ago but no one
    answered.
    Your Google ads are in an iframe. This rule will get you
    started
    iframe {
    height: 2em !important;
    position: absolute;
    top: 650px;
    You can leave the position static if you like, and it will
    move up and
    down with your images - I found that a bit distracting,
    though. If you
    leave it static, use a top-margin to establish space between
    your image
    and the ads.
    The !important notation is required for the height,
    indicating either a
    conflict somewhere in your markup or CSS, or poor Google code
    (not
    uncommon).
    Al Sparber - PVII
    http://www.projectseven.com
    Extending Dreamweaver - Nav Systems | Galleries | Widgets
    Authors: "42nd Street: Mastering the Art of CSS Design"

  • If a footnote spreads across three columns, does it always fill the middle one?

    Not a scripting question per se, but it sure affects the script I'm writing. I'm trying to detect and address collisions between footnotes and other items on a page. I think in the world of documents I inhabit, I'm not going to run into such a long footnote, but the moment you start thinking that way one pops out of the woodwork and smacks you in the face.
    I guess the reason for my question is some sense that maybe there's a kind of column-balancing that goes on with footnotes? No of course not. I think I know the answer to my own question: Yes! But I wonder if there's a circumstance where it's not true.
    Anyone have any instances of a footnote spreading to three columns without filling the second one? For example, could keeps cause a space to appear at the top, enough to allow some story text in there?
    Wait: InDesign hates empty text columns -- is one that only has a partial footnote in it considered empty? In the case where there is only a partial footnote, myTextColumn.footnotes.length returns 0.
    Perhaps I should construct some examples to see what happens.
    Dave

    Well, it didn't take much experimentation to discover that the answer is no. The middle column in a three-column frame has zero or one line of text from the main story along with the text from the long footnote. And this without any keeps at all. It looks really ridiculous when there is just one line there, although in the case I was working with I used the default gap above the notes of zero. Let's try with a gap there ...
    Same thing happens when a gap is called for. You get one or no lines at the top of the second column, depending on the height of the frame.
    Dave

  • How to edit the "Oracle Three Column Layout" page template?

    Hello all,
    My question is very simple: how can one edit the Oracle Three Column Layout page template? I tried searching the file system for a file called "threeColumnTemplate.jspx" but I cannot seem to find it. Is it hidden into a jar file of some kind? Or at least can anyone tell me the name of the nice component located in the upper right corner that displays the loading activity?
    Thanks.

    Extract oracle-page-templates.jar with winzip & browse to location oracle/templates
    open the file threeColumnTemplate.jspx using jdeveloper.
    after you open it , you can edit the logo , save the changes & create this jar again or save it to the zip which will automatically update the jar.

  • I want to convert a series of names into a table (in either numbers or pages). The list I have has a name and then an email address in brackets, followed by a 'yes' or a 'no'. I would like to separate the list into three columns

    I want to convert a series of names into a table (in either numbers or pages). The list I have has a name and then an email address in brackets, followed by a 'yes' or a 'no'. I would like to separate the list into three columns - the first containing the name, the second containing the email address and the third containing the 'yes' or 'no'.
    Can you help me ?

    The question that needs to be answered is what is separating the columns? Is it a single tab, one or more tabs, spaces, or what?  Or is it the brackets that makes the separation between the three pieces of data?
    If it is always a single tab, that makes it really easy.  All you have to do is find/replace the brackets with nothing (as Wayne said)
    If it might be multiple tabs, you can find/replace tab-tab with a single tab and repeat that a few times until no more double-tabs are found.
    If it is one or multiple spaces, that might be difficult. I'll think about this one if this is what you have. I'll ignore this possiblility for now.
    If it is the brackets separating the three pieces of data, you would Find/Replace the left bracket with a tab then do the same with the right bracket.

  • How to merge three columns values to single row values in sql server 2008

    Hi Frds.....
    I have three quantity in my table.
    Quantity1,quantity2,quantity3
    this three quantity have different values
    ex:
    quantity1 = 1000,quantity2=2000,quantity3=3000
    the three column combine 2 display in single row values. this values display in one by one.
    ex: quantity
         1000
         2000
         3000

    You will need to use the UNPIVOT operator:
    DECLARE @example TABLE
    Id int NOT NULL IDENTITY(1,1),
    Quantity1 int,
    Quantity2 int,
    Quantity3 int
    INSERT INTO @example VALUES (1000, 2000, 3000), (4000, 5000, 6000);
    SELECT * FROM @example;
    SELECT Id, Quantity, QuantityType
    FROM @example
    UNPIVOT
    Quantity FOR QuantityType IN (Quantity1, Quantity2, Quantity3)
    ) AS u;
    Output:
    (2 row(s) affected)
    Id Quantity1 Quantity2 Quantity3
    1 1000 2000 3000
    2 4000 5000 6000
    (2 row(s) affected)
    Id Quantity QuantityType
    1 1000 Quantity1
    1 2000 Quantity2
    1 3000 Quantity3
    2 4000 Quantity1
    2 5000 Quantity2
    2 6000 Quantity3
    (6 row(s) affected)

Maybe you are looking for

  • Problem with Business object attributes in UWL Workitem description

    Hi All, I have developed a workflow which sends the workitem for two level approvals. Once the workflow is triggered workitem sent to the respective user for approval. When user opens the workitem in inbox he can see all the data which comes from the

  • Message ID CPF7024, reason Code # 2

    Hi Guys, In our SCM production system, we use the the program given by SAP for managing the journal receivers..It deletes an old journal from the journal library and saves it to a another library, which we back off everynight... Now all of a sudden,

  • Hello i can't find com.apple.mail.plist and "mail" is not working well, thank you

    Hello, My mail.app is not working well. I read a lot messages forum an dlot of solutions for mail.app is delete "com.apple.mail.plist" but I can't find it in library/preferences, can you help me please. Thank you, Syl

  • Week to date

    Dear All, It is no problem to convert a date to get the week number: TO_CHAR(sysdate, 'YYYYIW') But what I need to do is to go the other way and generate the date of the Monday for that particular week. With a month and the TO_DATE command this would

  • How and where to file complaint against Verizon's customer service?

    I hate it that I had no one to give my business to other than Verizon in my area.  I've had Verizon in early 2000s when FiOS was first available in my area, but the speed sucks so I was better off switching back to dial-up.  Many years have passed so