title: Combine 2 or more rows having characters and others having currency
body: <p>I have an output like this by a query:</p>
  
  <pre><code>ID      customer_name_Now    customer_name_Before       MOVEMENT
  123451  Rustle Bock ltd      N                          £2,121
  123451  N                    Rustle Bock ltd           -£25,666,899
  123452  Little Garage Ltd    N                          £6,987
  123453  N                    The Big Shop               £15,850
  </code></pre>
  
  <p>Story is that, I have 2 months of data. In both months the customer may or may not have movements depending if it was our customer last month or if its a customer now. Many cases it is customer in both months, hence I get 2 rows like the above. </p>
  
  <p>The ideal output should be :</p>
  
  <pre><code>ID      customer_name_Now   customer_name_Before      MOVEMENT
  123451  Rustle Bock ltd     Rustle Bock ltd          -£25,664,778
  123452  Little Garage Ltd   N                         £6,987
  123453  N                   The Big Shop              £15,850
  </code></pre>
  
  <p>So movements should sum to give me the actual movement in months and the names of customer should be in both columns given the customer has relation in both months.</p>
  
  <p>@DMK the query I used to get the initial output is:</p>
  
  <pre><code>select /*+ NO_REWRITE */
  customer_id,
  customer_name_now,
  customer_name_before,
  movement
  
  from
      (select /*+ NO_REWRITE */
      main.customer_id,
      main.customer_name_now,
      main.customer_name_before,
      main.limits_before,
      main.limits_now,
      sum(main.limits_now-main.limits_before) as movement
  
      from
          (select /*+ NO_REWRITE */
          customer_id,
          (customer_name_before) as customer_name_before,
          (customer_name_now) as customer_name_now,
          sum(limits_current) as limits_now,
          sum(limits_previous) as limits_before
  
          from
               (select /*+ NO_REWRITE */
               sub.customer_id,
               sub.customer_name_now,
               sub.customer_name_before,
               sub.limits_current,
               sub.limits_previous
               from
                   (select /*+ NO_REWRITE */
                   T2.customer_ID,
                   (T2.customer_name) customer_name_now,
                   'N' customer_name_before,
  
                   sum(T26.AGREED_LIMIT) limits_current,
                   0 limits_previous
                   from 
  
                   DWH_customer_HISTORY T2,
                   DWH_TIME_DIM T25,
                   DWH_FACILITY_MONTHLY T2
                   where  
                   ---some internal filters are applied here, i habe ot shown coz of security reasons----
                   and 
                   T25.MONTH_END = '2012-11-30' and 
  
                   group by 
                   T2.customer_ID,
                   T2.customer_name,
                   ) sub
  
               union all
  
               select /*+ NO_REWRITE */
               sub.customer_id,
               sub.customer_name_now,
               sub.customer_name_before,
               sub.limits_current,
               sub.limits_previous
               from
                   (select /*+ NO_REWRITE */
                   T2.customer_ID,
                   'N' as customer_name_now,
                   (T2.customer_name)customer_name_before,
  
                   0 limits_current,
                   sum(T2.AGREED_LIMIT) limits_previous,
  
                  from 
                  DWH_customer_HISTORY T2,
                  DWH_TIME_DIM T25,
                  DWH_FACILITY_MONTHLY T2
                  where  
                  ---some internal filters are applied here, i habe ot shown coz of security reasons----
                  and 
                  T25.MONTH_END = '2012-10-31'
                  group by 
                  T2.customer_ID,
                  T2.customer_name,) sub
              ) un
          group by
          customer_id,
          customer_name_now,
          customer_name_before,) main
  
      group by 
      main.customer_id,
      main.customer_name_now,
      main.customer_name_before,
      main.limits_before,
      main.limits_now)
  </code></pre>