Merge two resultsets into one column

Hi Guys,
I have two SQL statements. The first returns 12 columns and the second returns 2 columns but both return the same number of rows. I can't seem to merge both the queries into a common query as the WHERE clauses in both are different. I have to dump the output into a table i created. The table has 14 columns. One column in both queries act as primary key and they help form the relationship between the resultsets. The column name is SUBSCR_CODE. Below you will find my SQL queries and the CREATE TABLE statement. Please could someone tell me how to achieve this.
SELECT o.subscr_code,
SUM(NVL(m.remain_capital,0)),
SUM(NVL(m.remain_interest,0)),
SUM(NVL(m.remain_debtor_fee,0)),
SUM(NVL(s.remain_debtor_fee,0)),
SUM(NVL(m.remain_costs_to_client,0)),
SUM(NVL(m.remain_debtor_outlay,0)),
SUM(NVL(s.remain_debtor_outlay,0)),
SUM(NVL(m.debtor_exp_outlay,0)),
SUM(NVL(s.debtor_exp_outlay,0)),
SUM(NVL(m.vatbase_debtor_fee,0)),
SUM(NVL(s.vatbase_debtor_fee,0)),
NULL
FROM kkrpt1 o,
maincase m,
subcase s
WHERE o.maincase_id = m.maincase_id
AND m.maincase_id = s.mc_maincase_id
AND s.claim_type IN (6,7,8,9,10,11,13)
AND s.subcase_no = 0
AND m.closing_date IS NULL
AND s.closing_date IS NULL
GROUP BY subscr_code;
SELECT o.subscr_code,
SUM(NVL(a.remain_interest,0))
FROM kkrpt1 o,
amount a,
maincase m,
subcase s
WHERE o.maincase_id = a.mc_maincase_id
AND o.maincase_id = m.maincase_id
AND m.maincase_id = s.mc_maincase_id
AND s.claim_type IN (6,7,8,9,
10,11,13)
AND s.subcase_no = 0
AND m.closing_date IS NULL
AND s.closing_date IS NULL
AND a.amount_type = 41
GROUP BY subscr_code;
CREATE TABLE kk_ajot_14 (
subscr_code VARCHAR2(5),
remain_capital_sum NUMBER,
remain_inerest_sum_1 NUMBER,
remain_debtor_fee_sum_1 NUMBER,
remain_debtor_fee_sum_2 NUMBER,
remain_costs_to_client NUMBER,
remain_debtor_outlay_1 NUMBER,
remain_debtor_outlay_2 NUMBER,
remain_debtor_exp_outlay_1 NUMBER,
remain_debtor_exp_outlay_2 NUMBER,
vatbase_debtor_fee_1 NUMBER,
vatbase_debtor_fee_2 NUMBER,
remain_inerest_sum_2 NUMBER);

No need to create table
with
sql_1 as
(<first sql here>
sql_2
(<second sql here>
select a.*,b.*
  from sql_1 a,sql_2 b
where a.subscr_code = b.subscr_codeRegards
Etbin

Similar Messages

  • Merging two cubes into one

    Is it possible to merge two cubes into one , if so how ??

    Hi
    Can u please check how we merge two cubes with 1st with 8 dimension ,
    and in other 7 dimensions, both has the same dimension.
    but in these cube when they r doing the demand planning, they r doing on different levels.
    We have one option of merging the cubes but planning across the two cubes
    or
    same cube with alternate hierarchy.
    what all things i have take in to consider while doing this.
    Please reply

  • How do I merge two accounts into one account that contains all the files from both?

    When I was running my MacBook Pro under Snow Leopard, I had one account for business that was encripted and another account that was unencripted for personal.  Now, under Lion, the whole disc gets encripted so I don't really need two acounts.  How do I merge the accounts together into one account and retain all the files from both?
    Thanks,
    Dave

    Somethinkg like these?

  • Merging different values into one column

    Hi all,
    If my report has two columns A and B. For one value of A, there are multiple values coming from database for B.
    So, report displays them like this:
    A     B
    1     x
    1     y
    1     z
    Is it possible somehow that i can merge all possible values of B in one row instead of many. i.e. report should look like this:
    A     B
    1     x,y,z
    Please reply with your suggestions.

    Hi,
    It is possible that can merge all B column values in one row.
    Steps:-
    1. First you create an object for B using @aggregate_Aware() function like
    @Aggregate_Aware(TableName.B,TableName.B)+', '
    Object qualification should be measure. Here B is the column name.
    2. In WebI report drag and drop A and B objects
    3. Run the report
    Now you will get the result.
    Edited by: Swarna K on Mar 11, 2011 5:27 AM
    Edited by: Swarna K on Mar 11, 2011 7:20 AM

  • Satellite L40-18Z: How to merge two partitions into one partition?

    Hello,
    I have a satellite L40 with a hard disk drive partitioned into two ( C and E ), one having 37GB capacity the other almonst 36 GB.
    The C drive is almost full and the E drive almost empty. I would like to take away the partition and have just one drive, is this possible.
    Any advice would be gratefully received. I am not a techi so be kind.
    Regards
    Peter

    Hi
    Of course this is possible
    You can do this in disk management.
    Just click right on My Computer -> Manage
    Here choose disk management.
    Now you have to delete the E partition. Then the free space could be added to the C partition.
    But note; before you would do this, create the recovery disk (if you didnt this in the past.)

  • Merging of  two rows into one

    HI,
    Would you help me to write aquery such that merges two data into one,
    for example,
    Take a table Student
    Its content are
    Roll no Name
    1 Rahul
    2 Shyam
    We reqiure a query such that we get out put as
    Rahul;Shyam

    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php

  • Data in two different coulmns merge into one column

    I am using following script to create external table with data.
    CREATE TABLE external_class(
    item_no varchar2(255),
    max_range varchar2(255)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DATALOAD
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
    (item_no,max_range)
    LOCATION ('class_newc.txt')
    REJECT LIMIT UNLIMITED;
    Problem is that its merge both columns into one column.
    I want two seperate columns.
    Data is in microsoft excel spread sheet.
    I saved as txt(TAB DELIMITED) txt
    Data appears in clas.txt file as below:
    "400     "     4177.64
    "404     "     5574.64
    "406     "     5333
    "408     "     
    "409     "     
    "450     "     10.83
    "478     "     
    "482     "     4820
    I ran the above script to create table.
    Table Created
    SQL> desc external_class;
    Name Null? Type
    ITEM_NO VARCHAR2(255)
    MAX_RANGE VARCHAR2(255)
    SQL> select count(*) from external_class;
    COUNT(*)
    3036
    but with
    select * from external_class;
    ITEM_NO MAX_RANGE
    "400"4177.64
    "404"5574.64
    "406"5333
    "408"
    "409"
    "450"10.83
    "478"
    "482"4820

    thanks its work.
    Actually I created other file as below
    Item_no-----max_range
    400     4177.64
    404     5574.64
    406     5333
    408     
    409     
    450     10.83
    and use creation script as below:
    CREATE TABLE external_class(
    item_no varchar2(255),
    max_range varchar2(255)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DATALOAD
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    fields terminated by whitespace
    MISSING FIELD VALUES ARE NULL
    (item_no,max_range)
    LOCATION ('class_newa.txt')
    REJECT LIMIT UNLIMITED;

  • List aggregate two rows into one

    query :
    select kod_negeri.NAMA kod_negeri_nama,
    hakmilik.id_hakmilik,
    MOHON.PENYERAH_NAMA,
    MOHON.PENYERAH_ALAMAT1, MOHON.PENYERAH_ALAMAT2, MOHON.PENYERAH_ALAMAT3,
    MOHON.PENYERAH_ALAMAT4, MOHON.PENYERAH_POSKOD, MOHON.PENYERAH_KOD_NEGERI,
    MOHON.PENYERAH_NO_RUJ, MOHON.ID_MOHON, HAKMILIK.KOD_HAKMILIK, HAKMILIK.NO_HAKMILIK,
    KOD_LOT.NAMA, HAKMILIK.NO_LOT, KOD_BPM.NAMA, KOD_DAERAH.NAMA,
      LELONG.TMPT, LELONG.DIMASUK, PGUNA.NAMA,
      PIHAK.ALAMAT1, pihak.NAMA ven,
    PIHAK.ALAMAT2, PIHAK.ALAMAT3, PIHAK.ALAMAT4, PIHAK.POSKOD,
    mohon.id_mohon ,
    pguna.NAMA pguna_nama,
    pguna.JAWATAN,
    kod_daerah.NAMA kod_daerah_nama,
    to_char(enkuiri.TRH_enkuiri,'DD')||' '|| to_char(enkuiri.TRH_enkuiri,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (enkuiri.TRH_enkuiri, 'YYYY') trh_enkuiri,
    to_char(lelong.TRH_lelong,'DD')||' '|| to_char(lelong.trh_lelong,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (lelong.TRH_lelong, 'YYYY') trh_le,
    to_char(lelong.trh_lelong, 'Day') day,
    to_char(lelong.TRH_lelong,'HH12:MI ')  hour,
    DECODE(SUBSTR(to_char(lelong.TRH_lelong,'HH12:MI AM'),-2,2),'AM','Petang','pagi')  noon,
    enkuiri.cara_lelong,
    lelong.TMPT,
    lelong.HARGA_RIZAB,
    enkuiri.harga_rizab,
    initcap(pihak.NAMA) pihak_nama,
    initcap(lelong.EJA_RIZAB) er,
    'RM'||enkuiri.TUNGGAK_AMAUN,
    lelong.DEPOSIT,
    convert_number_words(lelong.DEPOSIT) as converted_form,
    to_char(lelong.TRH_AKHIR_BYR,'DD')||' '|| to_char(lelong.TRH_AKHIR_BYR,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (lelong.TRH_AKHIR_BYR, 'YYYY') TRH_AKHIR_BYR,
    to_char(sysdate,'DD') ||' '|| to_char(sysdate,'MONTH','nls_date_language=malay') ||' '||to_char(sysdate,'yyyy') sysd,
    kod_bpm.NAMA kod_bpm_nama,
    kod_lot.NAMA kod_lot_nama,
    hakmilik.NO_LOT,
    hakmilik.KOD_HAKMILIK,
    hakmilik.NO_HAKMILIK
    from
    mohon ,
    mohon_hakmilik ,
    lelong ,
    pguna ,
    pihak ,
    kod_daerah ,
    enkuiri ,
    kod_bpm ,
    hakmilik ,
    kod_lot ,
    kod_negeri,
    mohon_fasa ,
    kod_hakmilik
    WHERE mohon.id_mohon = mohon_hakmilik.id_mohon and
    mohon_hakmilik.id_hakmilik = hakmilik.id_hakmilik and
    hakmilik.kod_hakmilik = kod_hakmilik.kod(+) and
    hakmilik.kod_lot  = kod_lot.kod(+) and
    hakmilik.kod_bpm = kod_bpm.kod(+) and
    hakmilik.kod_daerah = kod_daerah.kod(+) and
    mohon.id_mohon = enkuiri.id_mohon and 
    lelong.id_pihak = pihak.id_pihak and
    lelong.id_mh = mohon_hakmilik.id_mh and
    pihak.kod_negeri = kod_negeri.kod(+) and
    mohon.id_mohon = mohon_fasa.id_mohon and
    mohon_fasa.id_aliran ='semakan' and
    mohon_fasa.id_pguna = pguna.id_pguna and
    mohon.id_mohon = :p_id_mohon
    and enkuiri.KOD_STS='AK'
    and mohon.id_mohon ='0405AUC2010007436'KOD_NEGERI_NAMA,ID_HAKMILIK,PENYERAH_NAMA,PENYERAH_ALAMAT1,PENYERAH_ALAMAT2,PENYERAH_ALAMAT3,PENYERAH_ALAMAT4,PENYERAH_POSKOD,PENYERAH_KOD_NEGERI,PENYERAH_NO_RUJ,ID_MOHON,KOD_HAKMILIK,NO_HAKMILIK,NAMA,NO_LOT,NAMA_1,NAMA_2,TMPT,DIMASUK,NAMA_3,ALAMAT1,VEN,ALAMAT2,ALAMAT3,ALAMAT4,POSKOD,ID_MOHON_1,PGUNA_NAMA,JAWATAN,KOD_DAERAH_NAMA,TRH_ENKUIRI,TRH_LE,DAY,HOUR,NOON,CARA_LELONG,TMPT_1,HARGA_RIZAB,HARGA_RIZAB_1,PIHAK_NAMA,ER,'RM'||ENKUIRI.TUNGGAK_AMAUN,DEPOSIT,CONVERTED_FORM,TRH_AKHIR_BYR,SYSD,KOD_BPM_NAMA,KOD_LOT_NAMA,NO_LOT_1,KOD_HAKMILIK_1,NO_HAKMILIK_1
    Johor,050503PM00000151,HAMZAH DAUD DAROS & SITI NOR,NO 12 1ST FLOOR & 2ND FLOOR,JLN SRI RAHANG,TMN SRI RAHANG,SEREMBAN,58000,05,12345,0405AUC2010007436,PM,151,Lot,6309,Mukim Lenggeng,Seremban,PTG MELAKA,pptlelong1,Puan Nur Faizati,ASDFSAF,AHMAD,DSFDS,FDSFSDF,DSFSDF,12345,0405AUC2010007436,Puan Nur Faizati,Penolong Pegawai Tanah Lelong (PTD),Seremban,08 DISEMBER 2010,27 JANUARI 2011,Thursday ,02:00 ,pagi,A,PTG MELAKA,,,Ahmad,,RM234,,,24 MEI 2011,10 FEBRUARI 2011,Mukim Lenggeng,Lot,6309,PM,151
    ,050540HSD00022923,HAMZAH DAUD DAROS & SITI NOR,NO 12 1ST FLOOR & 2ND FLOOR,JLN SRI RAHANG,TMN SRI RAHANG,SEREMBAN,58000,05,12345,0405AUC2010007436,HSD,22923,Lot,0009838,Mukim Jimah,Seremban,PTG MELAKA,pptlelong1,Puan Nur Faizati,no2,Ali Bin Abudillah,jalan 3,taman permata,lorong mentari,32333,0405AUC2010007436,Puan Nur Faizati,Penolong Pegawai Tanah Lelong (PTD),Seremban,08 DISEMBER 2010,27 JANUARI 2011,Thursday ,02:00 ,pagi,A,PTG MELAKA,,,Ali Bin Abudillah,,RM234,,,24 MEI 2011,10 FEBRUARI 2011,Mukim Jimah,Lot,0009838,HSD,22923
    KOD_NEGERI_NAMA,ID_HAKMILIK,PENYERAH_NAMA,PENYERAH_ALAMAT1,PENYERAH_ALAMAT2,PENYERAH_ALAMAT3,PENYERAH_ALAMAT4,PENYERAH_POSKOD,PENYERAH_KOD_NEGERI,PENYERAH_NO_RUJ,ID_MOHON,KOD_HAKMILIK,NO_HAKMILIK,NAMA,NO_LOT,NAMA_1,NAMA_2,TMPT,DIMASUK,NAMA_3,ALAMAT1,VEN,ALAMAT2,ALAMAT3,ALAMAT4,POSKOD,ID_MOHON_1,PGUNA_NAMA,JAWATAN,KOD_DAERAH_NAMA,TRH_ENKUIRI,TRH_LE,DAY,HOUR,NOON,CARA_LELONG,TMPT_1,HARGA_RIZAB,HARGA_RIZAB_1,PIHAK_NAMA,ER,'RM'||ENKUIRI.TUNGGAK_AMAUN,DEPOSIT,CONVERTED_FORM,TRH_AKHIR_BYR,SYSD,KOD_BPM_NAMA,KOD_LOT_NAMA,NO_LOT_1,KOD_HAKMILIK_1,NO_HAKMILIK_1
    Johor,050503PM00000151,HAMZAH DAUD DAROS & SITI NOR,NO 12 1ST FLOOR & 2ND FLOOR,JLN SRI RAHANG,TMN SRI RAHANG,SEREMBAN,58000,05,12345,0405AUC2010007436,PM and HSD,151 and 22923,Lot,6309,Mukim Lenggeng,Seremban,PTG MELAKA,pptlelong1,Puan Nur Faizati,ASDFSAF,AHMAD,DSFDS,FDSFSDF,DSFSDF,12345,0405AUC2010007436,Puan Nur Faizati,Penolong Pegawai Tanah Lelong (PTD),Seremban,08 DISEMBER 2010,27 JANUARI 2011,Thursday ,02:00 ,pagi,A,PTG MELAKA,,,Ahmad,,RM234,,,24 MEI 2011,10 FEBRUARI 2011,Mukim Lenggeng,Lot,6309,PM,151
    that means i need to list aggregate the two rows into one how to make the changes for the above query in order to do so .
    Edited by: user9093689 on Feb 9, 2011 10:03 PM

    user9093689 wrote:
    now need to bother abt this that line converts date into malay language
    to_char(enkuiri.TRH_enkuiri,'DD')||' '|| to_char(enkuiri.TRH_enkuiri,'MONTH','nls_date_language=malay') ||' '||TO_CHAR (enkuiri.TRH_enkuiri, 'YYYY') trh_enkuiri,iam retriving two rows of output, wat i need is to display one row and the second row values which are not similar should be added to the first row
    for example for column
    kod_hakmilik two rows values are
    PM
    HSD
    but they should be display as
    PM and HSD
    finally my aim is to retrieve only one row as output.
    i dont how exactly the term listaggr . how ever it may be whether using groupby or any other but the output should be as aboveWhat version of Oracle are you on?
    Look up the LISTAGG() function in the documentation for your version (assuming it is there) and see if it can do what you want

  • Is it possible to paste two images into one layer?

    I'm having some issues pasting two images into one layer. Every time I paste the second image, it automatically creates a new layer...is there anyway to prevent that from happening? I'm making an animation on photoshop and I want there to be more than image in some of the frames. Please let me know if you have any suggestions! Thanks!

    You can merge the two layers together once they're position. Select the top layer and choose merge down or select both and choose merge layers (from the layers menu).
    http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-78b2a.html

  • How to Combine two queries into One

    Hi Gurus,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    I have following two queries. How I can convert these two queries into one with the same result ?
    Q1
    SELECT id,vdate,vendorname,venddate,vid
    FROM VENDOR
    WHERE processid=32
    AND venddate is null
    AND vid in(select vid from view_vid where type='PDX')
    AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=55)
    AND (id,vdate) in (select id,vidate from market_data where marketed_date is null)
    AND id not in (select id from location)
    Q2
    SELECT id,vdate,vendorname,venddate,vid
    FROM VENDOR
    WHERE processid=20
    AND venddate is null
    AND vid in(select vid from view_vid where type='PBX')
    AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=40)
    AND (id,vdate) in (select id,vidate from market_data where region_date is null)
    AND id not in (select id from location)
    I can UNION these two queries, but, is there any way I can write a single query with which gives me same result as above two queries?
    Any help would be highly appreciated
    Thanks in advance

    Hi,
    You can do something like this, which will be more efficient than a UNION:
    SELECT  id, vdate, vendorname, venddate, vid
    FROM  vendor
    WHERE  (   (    -- Conditions that apply only to q1
                               processid = 32
                AND  vid       IN (SELECT vid FROM view_vid WHERE type = 'PDX')
                AND (id,vdate) NOT IN ( SELECT id, vdate
                                        FROM   vkfl_is
                                        WHERE  task_id = 55
                AND (id,vdate) IN ( SELECT id, vidate
                                    FROM   market_data
                                    WHERE  marketed_date IS NULL
            OR  (  -- Conditions that apply only to q2
                     processid = 20
                AND  vid       IN (SELECT vid FROM view_vid WHERE type = 'PBX')
                AND (id,vdate) NOT IN ( SELECT id, vdate
                                        FROM   vkfl_is
                                        WHERE  task_id = 40
                AND (id,vdate) IN ( SELECT  id, vidate
                                    FROM  market_data
                                    WHERE  region_date IS NULL
                   -- The remaining conditions apply to both q1 and q2
    AND     venddate   IS NULL
    AND     id         NOT IN (SELECT id FROM location)
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Can we concatenate 2 columns of datafile into one column in sql loader

    Hi,
    Can we concatenate 2 columns of datafile into one column in sql loader?
    like
    Suppose there are two field in data file
    column1 - lastname value tiger
    column2 - firstname value scott
    Required result
    sould be concatenate of the two field into one database coulmn
    like name and value should be scott tiger.
    Thanks

    Or try this...
    My input file
    1,KARTHICK,PATTABIRAMAN,SOFTWARE
    2,VIJAY,RENGANATHAN,FINANCE
    3,VIMAL,KANTH,SALESAnd my control file.
    LOAD DATA
    INFILE 'EmpDetail.txt'
    BADFILE 'EmpDetail.bad'
    DISCARDFILE 'EmpDetail.dsc'
    INTO TABLE "EMPDETAIL"
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS     
      (NO,
      NAME1 BOUNDFILLER,
      NAME ":NAME1||' '||:NAME",
      DEPT) My table is.
    SQL> create table empdetail(no integer, name varchar2(50), dept varchar2(50))
      2  /
    Table created.Then i loaded the data.
    D:\karthick\Akiva\Look up\Akiva\Address Look Up>sqlldr sysadm/sysadm@akivanew empdetail.ctl
    SQL*Loader: Release 9.2.0.1.0 - Production on Mon Sep 15 12:23:42 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Commit point reached - logical record count 2
    Commit point reached - logical record count 3And the output is
    SQL> select * from empdetail
      2  /
            NO NAME                                               DEPT
             1 KARTHICK PATTABIRAMAN                              SOFTWARE
             2 VIJAY RENGANATHAN                                  FINANCE
             3 VIMAL KANTH                                        SALESThanks,
    Karthick.

  • Sql loader - mutiple values into one column

    Hi,
    Is it possible to load multiple fields into one column. Eg, my table structure has two columns COL1, COL2 and my data file is comma delimted with 3 fields A,B,C.
    How could i use sql loader to achieve (without the use of temp tables)
    COL1 = A
    COL2 = BC
    Thanks

    I don't understand why you can't modify the input fille.
    But anyway, i have 2 ways to help you
    1. Make new inputfile online using pipe and awk(or something your are familiar with) and use it as new input file.
    This is a traditional and powerful method in Unix environment.
    For instance:
    oracle> $ mknod pipe.dat p
    oracle> cat input.dat | awk '{print ...}' > pipe.dat &
    oracle> sqlldr ctl=.. data=pipe.dat
    Using this method, you don't need to modify original input file physically, but by some magical trick you can modify it on the fly.
    2. Use before trigger
    For instance:
    create table load(a int, b int, c int, d int);
    create or replace trigger load_trigger
    before insert on load
    for each row
    begin
    :new.d := :new.b + :new.c;
    :new.b := null;
    :new.c := null;
    end;
    load data
    infile *
    append
    into table load
    fields terminated by "," optionally enclosed by '"'
    (a, b, c)
    begindata
    1, 1, 1
    2, 2, 2
    3, 3, 3
    4, 4, 4
    sqlldr userid=... ctl=load.ctl
    SQL> select * from load;
    A B C D
    1 2
    2 4
    3 6
    4 8
    You won't like the existence of unnecessary columns(B, C) but don't have choice. ^^;
    I think there is another simple way provided by SQL*Loader. But i've never tried it myself. Read following doc and try it yourself:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch06.htm#1008153

  • Select multiple column into one column

    Hi..!!!
    Is it possible to select 4 columns in to 1 columns?
    I've major1, major 2, major 3, major 4 and i want to retrieve all the columns into one column called "Majors".
    Is it possible? if yes then how?
    Help me out.
    Thanks,
    Himadri

    If you had given a proper example this thread would have been over in two posts. What you are looking for is often described as an UNPIVOT.
    I tend to use a collection type for this, e.g.
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> CREATE OR REPLACE TYPE varchar2_table AS TABLE OF VARCHAR2 (4000);
      2  /
    Type created.
    SQL> SELECT empno, column_value
      2  FROM   emp, TABLE (varchar2_table (ename, job));
         EMPNO COLUMN_VALUE
          7369 SMITH
          7369 CLERK
          7499 ALLEN
          7499 SALESMAN
          7521 WARD
          7521 SALESMAN
          7566 JONES
          7566 MANAGER
          7654 MARTIN
          7654 SALESMAN
          7698 BLAKE
    (snipped)
    28 rows selected.
    SQL>

  • Merged two libraries. new one is smaller than the largest one!

    I merged two iPhoto libraries using iPhoto Library Manager. One library had 6299 pics and the other had 178. The new one has 6474 pics (short of 3 photographs). The deal is that my library with 6299 is 33gb and my new library with 6474 pics is 31 gbs!
    have i lost something crucial?
    Neerav

    You merged two libraries into a third, new one? Most likely there's no caches developed yet. Sync with a phone or iPod and see what happens then.

  • How to turn two users into one?

    Hey there!
    As I selled my MBP last month I copied all its datas to my iMac via migration assistant and created a new user for it. So I have now two accounts with different photos, documents etc.
    My problem now is how to turn these two users into one?
    I want all my photos appear in Aperture of my first user, I want all my documents appear in "Documents" of the first user and so on..
    Is it able? If yes, how could I realize it?
    Thanks for your support!
    René
    PS: 2 Users on iMac -> 1 User on iMac.

    Thanks for your help at first.
    But you usually can't "merge" two "normal" user accounts successfully.  If both accounts have data for the same application, it will be very difficult or impossible to merge them by copying files & folders.
    I cannot merge them.. So there is the question how to copy all medias from Aperture to my other Aperture medias?
    Can I export my whole medias and import in at the other users Aperture? And how? #
    Edit: I dont want to have two different libraries at all.. I want them to be together in just one..

Maybe you are looking for

  • How do i parse an xml with a string?

    I got a string (ex. "<testing><testing1>bla</testing1></testing>") and i would like to temparory store in XmlDocument so that i can retrieve the value. I am new in using xml... Can you all pls help? urgent thanks

  • HR data extraction issue

    Hi friends, I am extracting the Time Management data. I am loading data to the DSO from the following two data sources. 0HR_PT_1 AND 0HR_PT_2, When i Load the data for planned time 0HR_PT_1 i am getting two entries per record one each for DAY and HOU

  • Sky phone security - shooting itself in the foot?

    I just had a call from Sky (?), but it didn't go well. I made a call recently about some tech issue with my box, and this was a supposed follow up call. For a start, the caller ID came up as 'unknown'. Then, the girl wanted ME to verify who I was. No

  • How do I download camera and lens profiles?

    I am new to CC. How do I download camera and lens profiles and install them in Photoshop and LR5?

  • Broker Commission for Export

    Hello: We have a need to pay commission to export broker based on value of sales order. Is it possible to create a shipment cost document where I accrue freight for a carrier and also accrue commission for an export broker based on sales order value?