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

Similar Messages

  • 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

  • How to remove these icons in the red box, and Merge the two rows into 1?

    1. How may one remove these icons in the red box?
    2. How may one coalesce/merge the two bottom rows into one row?
    I'm running a French version of Adobe Acrobat XI version 11.0.0.

    I'm working in AA9, but it may be the same.
    The icons are in Tool Groups. The Groups are seperated by the verticle bars.
    Right Click within a toolbar group to avail options for enabling and disabling tools within a Group.
    The bars themselves can be selected with the mouse and dragged to re-order the groups.

  • Merging (Joining) two tables into one

    Is it possible to merge two adjacent tables into one table in Pages? Also, how can you split one table into multiple tables?

    If we use the exact meaning of the words, the response is no and no.
    If we play a bit with the meanings we may do the trick.
    (1) I create a table with 6 columns and 5 rows.
    (2) select cells D1 …F5, copy, paste in the document but out of the table. We get the right half of the table.
    From the tool bar, reduce the number of columns of table 1 fom 6 to 3. Bingo we have the two halves of the original table.
    (3)Select the first half and increase the number of rows from 5 to 10
    (4) copy the entire second half, select cell D1 in the enlarged table, paste.
    Bingo, we have the merged table.
    For sure, a merge and a split tables features would be welcome but as the table tool is the one used in the spreadsheet, I would be surprised if these features where introduced one day.
    _Go to "Provide Pages Feedback" in the "Pages" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'11
    Yvan KOENIG (VALLAURIS, France) jeudi 22 avril 2010 17:28:48

  • Concatenate two rows into one drop down? Not order them though

    Ok I have two rows:
    Group
    Original Performance NorGrip
    Gold Blank Disc
    Gold Blank Disc
    Truckbed Liner Kit
    Then I have another one:
    Attribute
    Grade
    Grade
    Dimensions
    However, I don't want them combined on top of one another.
    I want it so a person can select like so:
    Original Performance NorGrip Grade
    Gold Blank Disc Grade
    Gold Blank Disc Dimensions
    Truckbed Liner Kit (no value in the other column)
    The truckbed liner kit has no attribute value in the column so I would rather the option not show at all... So as long as the attribute column is filed, combine the two and show it in a validation list..
    I know how to create lists and then make them validation lists, but this is stumping me..

    From your example and description, I'm not sure I understand what you are starting with. Do you have a grid (group, etc across the top; attribute etc in rows, with som marker that shows which combinations are valid and which arent? Or do you have two rows
    (or columns) that /only/ contain the valid combinations?
    If you have them in two rows (or columns) containing only the valid combinations, then you can insert a third row (or column) as a helper column and just concatenate the two values, like A3 =A1 & " " & A2
    Then either use that range to feed your validation list on the same page, or turn it into a named range and feed a validation list on another sheet.

  • How to club two rows into one

    hi
    Can we club two rows of a SQL statement into one , that is some column results from one row and other column result from second row, but the row must remain same .
    thanks
    imran

    SQL> with sample as (select 'A' supplier, 1000 total, 0 branch_total from dual
      2                union all
      3  select 'A' supplier, 0 total, 500 branch_total from dual
      4                union all
      5  select 'B' supplier, 300 total, 0 branch_total from dual
      6                union all
      7  select 'B' supplier, 0 total, 120 branch_total from dual)
      8  SELECT SUPPLIER , SUM(TOTAL) , SUM(BRANCH_TOTAL) FROM SAMPLE
      9    GROUP BY SUPPLIER
    10  /
    SUPPLIER SUM(TOTAL) SUM(BRANCH_TOTAL)
    A              1000               500
    B               300               120

  • HT5621 I have 2 Apple ID , how I merge the two ID into one .

    I have 2 Apple ID . How do I merge it into one - all apps and notes etc

    You cannot merge Apple ID's, all purchases are assigned to one account and cannot be transferred to another.

  • Stepper motor 8SMC1-USBhF and power meter PM100D: how to merge the two VIs into one and make a XY graph of the current position and the power

    Hi there,
    I have a stepper motor (8SMC1-USBhF) and a power meter (PM100D). I want to measure the power while the stepper motor is moving, and obtain an XY graph with the current position on x axis and the power on y axis. So I just merged the two VIs together by copying and pasting, and created local variables for current position and readout value, and changed them to read, and then linked them to the XY graph, but apparently it doesnt work.
    So could you please instruct me how to merge them and obtain an XY graph appropriately?
    Attached are the two VIs.
    Thank you!
    Attachments:
    PM100D Simple Example.vi ‏42 KB
    StepperMotor.vi ‏97 KB

    Hello,
    The XY graph requires that each datapoint on the X axis corresponds to a datapoint on the Y axis.  To create XY data you will need to creat two arrays of X data and Y data with the same amount of elements then cluster the two arrays together to wire into the XY graph.  As an example take a look at the VI snippet below.  Is there a specific error being thrown?
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • How to combine data from two rows into one row

    I have the following sets of data. I want to find all the duplicate sets of field values. in the data below there is only one duplicate set: brenda, analyst, green.
    DocID and Doc Seq combine to form the set key. FieldID I believe are consistent in that 1 is always name, 2 is job, 3 is favorite color etc. but there are up to 20 field IDs.
    To tell you the truth, my client is a bit sketchy about the data and the values. I would like collapse the sets by getting all the field values into a single row. They could be in the same column, or in their own columns. This way I can then look for whatever
    dups my customer seems to think that he has.
    the first image is what i want (either in same column or in different columns. but they have to be in the order of the FieldID), the second is what i have. THANKS

    CREATE TABLE #t (
    c1 INT NOT NULL PRIMARY KEY,
    c2 VARCHAR(50) NOT NULL
    GO
    INSERT INTO #t(c1, c2) VALUES(1, 'P1,P2,P3')
    INSERT INTO #t(c1, c2) VALUES(2, 'P2,P3')
    GO
    -- Generate set of numbers
    -- Idea from Itzik Ben-Gan
    ;WITH
    L0 AS (SELECT 1 AS n UNION ALL SELECT 1),
    L1 AS (SELECT 1 AS n FROM L0 AS a, L0 AS b),
    L2 AS (SELECT 1 AS n FROM L1 AS a, L1 AS b),
    L3 AS (SELECT 1 AS n FROM L2 AS a, L2 AS b),
    L4 AS (SELECT 1 AS n FROM L3 AS a, L3 AS b),
    Numbers AS (SELECT ROW_NUMBER() OVER(ORDER BY (SELECT 1)) AS Number FROM L4)
    SELECT
    t.c1,
    t.c2,
    SUBSTRING(',' + t.c2 + ',', Number + 1, CHARINDEX(',', ',' + t.c2 + ',', 
    Number + 1) - Number - 1) AS Item,
    ROW_NUMBER() OVER(PARTITION BY t.c1 ORDER BY n.Number) AS rn
    FROM
    #t AS t, Numbers AS n
    WHERE
    n.Number <= LEN(t.c2)
    AND SUBSTRING(',' + t.c2 + ',', n.Number, 1) = ','
    ORDER BY
    t.c1, rn
    GO
    DROP TABLE #t
    GO
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Join set of two rows into one

    Hello all,
    I have a table with 1 column and records are as below. Below I am showing only the first 4 records to give an idea.
    select cn from CSGL_AD_GROUP_OP_COMP_MEM_TEMP where rownum<5;
    CN
    CN=JZJXEEW00072305,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=ZJX_ARTCC,OU
    =FL,OU=ESA,OU=ATO,OU=LOB,DC=faa,DC=gov
    CN=JI90NTW00069990,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=I90_TRACO,OU
    =TX,OU=CSA,OU=ATO,OU=LOB,DC=faa,DC=gov
    Now the requirement is to concatenate 1st and 2nd row, next concat 3rd and 4th row, next conact 5th and 6th row and so on and put it into a new column in the same table if its possible, if not into a new table.
    How do I do this, can somebody help me.
    Thanks

    Hi,
    To start it would be nice if your create table statement is using the same name (CSGL_AD_GROUP_OP_COMP_MEM) as the insert statements (CSGL_AD_GROUP_OP_COMP_MEM2)
    with
    select * from CSGL_AD_GROUP_OP_COMP_MEM;
    KEY CN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
      1 CN=JZJXEEW00072305,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=ZJX_ARTCC,OU                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
      2 =FL,OU=ESA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
      3 CN=JI90NTW00069990,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=I90_TRACO,OU                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
      4 =TX,OU=CSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
      5 CN=JADQTTW00070657,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=ADQ_FCT,OU=A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
      6 K,OU=WSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
      7 CN=JLIHKTW00071376,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=LIH_FCT,OU=H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
      8 I,OU=WSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
      9 CN=JSLCTTW00073172,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=SLC_ATCT,OU=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    10 UT,OU=WSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    10 rows selectedYou sql should look like:
    select
      key
      ,cn
    from
      select
        key
        ,cn || lead(cn) over (order by key) cn
        ,row_number() over(order by key)rn
      from
        CSGL_AD_GROUP_OP_COMP_MEM
    where
      mod( rn, 2)= 1
    order by
      key
    KEY CN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
      1 CN=JZJXEEW00072305,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=ZJX_ARTCC,OU =FL,OU=ESA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
      3 CN=JI90NTW00069990,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=I90_TRACO,OU =TX,OU=CSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
      5 CN=JADQTTW00070657,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=ADQ_FCT,OU=A K,OU=WSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
      7 CN=JLIHKTW00071376,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=LIH_FCT,OU=H I,OU=WSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
      9 CN=JSLCTTW00073172,OU=Desktops,OU=Secured_Systems,OU=Computers,OU=SLC_ATCT,OU= UT,OU=WSA,OU=ATO,OU=LOB,DC=faa,DC=gov                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             Regards,
    Peter

  • (Merge) Compress multile rows into one

    Hello,
    I have a little problem with an sql statement.
    First I have a table storing Projects. Second I have a table storing emplyees. Multiple emps can work on one project. For this i have one row with a reference to the emp in each project. If there is an existing row in the project table i know, that this emp works for this project.
    Now I want to create a query which returns me one row per project with a X in the columns of the emp.
    Like the following (this should be the result):
    Projectname     Emp A    Emp B    Emp C
    =======================================
    Project A       X        X
    Project B       X        X        X
    Project C                X        XAs there are multiple rows in each project which are not equal, i could not use DISTINCT or GROUP BY?!
    But how can I solve this? The problem is that I have to query this in one SQL query and I could not use PL/SQL or a custom function.
    Thanks,
    Thomas
    Message was edited by:
    thomasw

    OK, I try:
    Project table:
    Column Name:      Data Type:
    pro_id                   NUMBER (10,0)
    name                    VARCHAR2(2000)
    description            VARCHAR2(2000)
    Content:
    pro_id     name      description
    ================================
    1            Test        ...
    2            Foo         ...
    3            Bar         ...
    4            Further    ...Employee table:
    Column Name:      Data Type:
    emp_name_id       NUMBER (10,0)
    emp_pro_id          NUMBER(10,0)
    Content:
    emp_name_id       em_pro_id
    ==========================
    1                         1
    2                         1
    4                         2
    1                         3
    2                         4
    3                         3
    1                         4
    4                         4Result:
    pro_id     emp1   emp2   emp3   emp4
    ===========================
    1            X                X       X
    2            X                          X
    3                             X
    4                     X               XI hope this will help!
    Thanks,
    Thomas

  • My wife and I have seperate itune accounts, but want to merge them into one account or at least merge our seperate purchases into one library.  Is this possible?

    Basic problem...my wife has her own iTunes account which she purchases music with, I have my own that i have been purchasing music with...however, married now as we have similar tastes in music and dont want to be duplicating albums etc.
    Was wondering is it possible to merge the two accounts into one account?  Or if not, that we carry on purchasing music but have one shared library.  Is this possible, any help appreciated.
    Thanks

    "Was wondering is it possible to merge the two accounts into one account? "
    No.
    Just put all of your music/apps/etc on one computer/library.  Authorize the computer for both ids. 

  • How to merge iPhoto v2 libraries into one iPhoto v11 library

    Hi,
    I just are going through a major upgrade from my iBook dual USB (500 MHz Power PC G3, OS 10.4.11) to my brand-new MacBook Pro (2.3 GHz core I5, OS 10.6.8).
    As my old iBook was running so slow, I had splitted my libraries into two using IPhoto Library Manager some years ago running with iPhoto 2. Now I need to merge these two libraries into one and then transfer it to my new computer and let iPhoto 11 upgrade the library at once.
    Based on very helpful earlier threats, I intend to follow the process below:
    Merge libraries using iPhoto Library Manager (registered version) to get one library (on my old computer)
    Copy this library into the Pictures folder of my new computer
    Open iPhoto (shift key will give me the option to select if needed) and it will automatically upgrade my library.
    So far so good - but I experience one issue I did not manage to solve. I use iPhoto Library Manager version 3.5.2 on my old computer, but after starting the merging process it tells me I need iPhoto version 4 at least; but I have version 2 only. I guess I cannot use iPhoto version 11 on my new computer as I first need to merge the libraries as old versions, as the iPhoto version 11 cannot work with the not yet upgraded libraries, can it? I have the IPhoto Library Manager registered version 3.6.8 installed on my new machine.
    Before I make a major mistake to my pictures (> 20 GB): is it possible to upgrade both old libraries separately in iPhoto v11 and then merge them in iPhoto v11?
    Many thanks for your advice!
    Best regards,
    Markus

    Rename the second iPhoto 2 library to something other that iPhoto Library and put it in the Pixtures folder next to the other library on your new MBP.  Then open it with iPhoto11 to convert.
    Once both are converted to the same version you can use iPLM to merge them into a new library.
    HOWEVER if you don't care about any metadata you might have in your last iPhoto 2 library you can use    SyncPhotos
    to import the photos in your iPhoto 2 library into your iPhoto 11 library.
    Here's how it works: 
    1 - it compares the databases and/or album.xml files of Libraries A and B. 
    2 - the files in A that are not in B are imported into B by copying the original files from A into B's Import folder.  
    3 - it then does the same for B. 
    4 - metadata is not copied. 
    It can be used to just copy from A to B and not sync both ways if desired. It will work with 2 libraries that are different versions, i.e. between an iPhoto 08 and iPhoto 09 library.
    OT

  • 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 rows into one row but into SEPARATE Columns

    Hello Gurus,
    I have searched alot on OTN and many other places, but no where I could get the solution of how can we merge rows into one row but separate column. For example
    Consider the below scenario
    "DEPARTMENT", "EMP","NAME","SUBJECT"
    "Electronics","1","Sam","LIC"
    "Electronics","2","Pam","VLSI"
    "Electronics","3","Tom","C"
    "Mech","1","Abu","Thermo"
    "Mech","4","Lina","Machines"Now, I need the output like
    Based on Department as Group By Clause
    "DEPARTMENT", "EMP1","NAME1","SUBJECT1","EMP2","NAME2","SUBJECT2","EMP3","NAME3","SUBJECT3"
    "Electronics","1","Sam","LIC","2","Pam","VLSI","3","Tom","C"
    "Mech","1","Abu","Thermo","4","Lina","Machines"
    The row data to be loaded into separate columns. Name of the column is not an issue... can be anythingIn all the forums which I went through I could find them loading into a single column, but not into respective separate columns.
    Any help would be much appreciated.
    Thanks

    848265 wrote:
    Frank,
    I saw your name nearly n number of times, as I went through many forums today... And the link which you have just posted, I went through it today afternoon.
    Could you please explain this bit taken from your dynamic pivot post.
    SELECT     DISTINCT
         ',     COUNT (CASE WHEN job = '''
    ||     job
    ||     ''' '     AS txt1
    ,     'THEN 1 END)     AS '
    ||     job
    ||     '_CNT'     AS txt2
    FROM     scott.emp
    ORDER BY     txt1;Many Thanks.You only need that when you need column aliases based on the actual data (and you explicitly said you don't need that) or when can't put an upper bound on the number of columns to be displayed. If that doesn't apply to this problem, then don't use any kind of dynamic SQL (like the code above); it makes the job much more difficult, less efficient and less robust.
    Here's what the code above is doing.
    If you were hard-coding a query that showed the number of people in each job, and you knew that the possible jobs were 'ANALYST', 'CLERK' and 'MANAGER', then you might hard-code a query like this:
    SELECT    deptno
    ,       COUNT (CASE WHEN job = 'ANALYST'  THEN 1 END)     AS analyst
    ,       COUNT (CASE WHEN job = 'CLERK'    THEN 1 END)     AS clerk
    ,       COUNT (CASE WHEN job = 'MANAGER'  THEN 1 END)     AS manager
    FROM       scott.emp
    GROUP BY  deptno
    ;If the jobs had different names, or if there were not 3 different jobs, then you would have to change the lines in the SELECT clause that start with ", COUNT ( CASE ...".
    The code you posted is from an example of dynamic SQL, where you first run a Preliminary Query . (What you posted above is, in fact, the complete preliminary query.) The output of that preliminary query is exactly the variable part of the real query, such as:
    ,       COUNT (CASE WHEN job = 'ANALYST'  THEN 1 END)     AS analyst
    ,       COUNT (CASE WHEN job = 'CLERK'    THEN 1 END)     AS clerk
    ,       COUNT (CASE WHEN job = 'MANAGER'  THEN 1 END)     AS managerYou then use this output as part of your main query. In other words, you can write something today that will generate exacrly as many columns as you need next year, with names from the data as it is next year. How? because you're not writing the full query today. The variable part will be written by the preliminary query when it runs next year.

Maybe you are looking for

  • Open items (F110 payment proposal)

    Hi All, Can someone clarify what are open items 1: invoices that are not cleared 2: credit memos 3:credit memos applied  to an invoice 4:residuals (When i run FBl5N credit memos are also shown as open items) Also when i run F110 payment proposal  it

  • Help! Kernel panic whenever I plug in my new 2TB WD My Passport

    Hello everyone, I have a 27 inch iMac that is still under AppleCare. When I plug in my 2 TB WD My Passport external drive, I get the screen that says, "You need to restart your computer. Hold down the Power button until it turns off, then press the P

  • Custom icon image for folders not showing up in dock

    I have used custom icons for years for various folders so I don't have to read through names of folders to know what's in them. With Leopard (10.5.2), the folder icons are visible up on the desktop and everywhere else; however, when I drag a folder w

  • There was an error processing a page.  A file I/O error has occurred.

    Hello, we are getting this error message when opening most of our financial statements, etc... We have tested the files on several versions of Adobe Reader, such as 9.0,  9.3.4,   10.0 This statement does however open up on some machines which are no

  • I can't get rid of the Vuze remote toolbar. I hate this program

    I failed to uninstall "Vuze" application's remote toolbar. It pops up on my firefox website with a "BING" as a search browser. I want to go back to "google" , but "Vuze" does not allows me to replace it. What could I do?