How to store all the columns values into one single column

Hi All,
this is my file layout,i am receiving the data in below format only
emp_no,c1,c2,c3,c4,c5
100 ,1 ,0 ,1 ,0,1
200 ,1 ,0 ,1 ,0,1
300 ,1 ,0 ,1 ,0,1
but i want to store that above data into my table like(from c1 to c5 columns values i want to store in period column)
emp_no,period
100 ,1
100 ,0
100 ,1
100 ,0
100 ,1
200 ,1
200 ,0
200 ,1
200 ,0
200 ,1
300 ,1
300 ,0
300 ,1
300 ,0
300 ,1
please help me

Strange but this is it
Processing ...
with original as (
     select 100 as id ,1 as v1,0 as v2,1 as v3,0 as v4,1 as v5
     from dual
     union all
     select 200 ,1 ,0 ,1 ,0,1
     from dual
     union all
     select 300 ,1 ,0 ,1 ,0,1
     from dual
select id,v1 as res_row
from original
union all
select id,v2
from original
union all
     select id,v3
     from original
union all
     select id,v4
     from original
union all
     select id,v5
     from original
                  ID                                   RES_ROW
                                   100                                      1
                                   200                                      1
                                   300                                      1
                                   100                                      0
                                   200                                      0
                                   300                                      0
                                   100                                      1
                                   200                                      1
                                   300                                      1
                                   100                                      0
                                   200                                      0
                                   300                                      0
                                   100                                      1
                                   200                                      1
                                   300                                      1
15 row(s) retrievedBye Alessandro

Similar Messages

  • How to Inscribe all the error messages into a single package ??

    Hi,
    I want to Inscribe all the error messages into a single package., and call the concern package from the exception block in every sp by passing the error code to that package, which will return the Concern error message to the calling Sp.,
    Can any one help me out how to accomplish this ., ?
    regards
    Raja

    I want to Inscribe all the error messages into a single package., Why do you want to inscribe all the messages in a package?
    I would suggest you to store them in a table instead and you can write a functin to retrive the error messages required.
    But if your requirement is for 'Package' then assuming that you store all the error messages in a table 'error_table' (say) following code may help you .
    CREATE TABLE Error_Table (
      Error_Code VARCHAR2(10),
      Error_Desc VARCHAR2(1024));Now insert your error codes and descriptions in this table.
    CREATE OR REPLACE PACKAGE pkg_Error_Handler
    AS
      FUNCTION f_Get_Error_Message(p_Error_Code  Error_Table.Error_Code%TYPE) RETURN VARCHAR2;
    END pkg_Error_Handler;/
    CREATE OR REPLACE PACKAGE BODY pkg_Error_Handler
    AS
      FUNCTION f_Get_Error_Message
           (p_Error_Code  Error_Table.Error_Code%TYPE)
      RETURN VARCHAR2
      IS
        lv_Error_msg  Error_Table.Error_desc%TYPE;
      BEGIN
        BEGIN
          SELECT Error_desc
          INTO   lv_Error_msg
          FROM   Error_Table
          WHERE  Error_Code = p_Error_Code;
        EXCEPTION
          WHEN No_Data_Found THEN
            lv_Error_msg := 'No such error code '
                            ||p_Error_Code
                            ||' defined in the system';
          WHEN OTHERS THEN
            lv_Error_msg := p_Error_Code;
        END;
        RETURN lv_Error_msg;
      END f_Get_Error_Message;
    END pkg_Error_Handler;
    /and you can call this packaged funtion from any exception block to get the error description.
    Regards,
    Abhijit.
    N.B.: Code not tested

  • When I import a text file(comma separated )into a numbers spread sheet all the data goes into one column. Why does the text not go into separate columns based on the commas.

    When I import a text file(comma separated) into a numbers spreadsheet all the data goes into one column instead of individual columns based on the comma separators.  Excel allows you to do this during the import..  Is there a way to accomplish this in numbers without opening it in Excel and the importing into Numbers.

    Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
    (I don't have an iPad, so I don't know the iOS answer.)

  • How can we include the property value into the News RSS?

    We have defined object property u201CDepartmentu201D that is used in News XML creating form. How can we include the property value into the News RSS (set value of the particular RSS XML tag)?

    We have solved the issue with NWDS

  • How to concatenate two colums into one single column

    I need some ideas to concatenate two different columns into one single column using a set of distinct values.
    For Example,
    Customer Product Number
    xyz A 1
    xyz B 2
    xyz B 1
    AAA C 7
    AAA A 1
    The result should look like this,
    Customer Value
    xyz A1 B2 B1
    AAA C7 A1
    How would I group this into once value ?
    Thanks in advance ...

    Tom's discussion of writing your own aggregate routines
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2196162600402
    starts off with a link to the 8i alternatives
    "see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:229614022562
    for 8i methods (not aggregates)"
    Unforutnately, it's a lot more work in 8i.
    Justin

  • How can I convert the volume directory into a single file installer?

    How can I convert the volume directory into a single file installer? I would like to hide all the miscillaneous files that I don't care for and be able to have the installer double click a single file and have it automatically install.

    On the second prompt screen when prompted 'What kind of self-extracting Zip file file do you want to make?'
    Are you choosing the second option (self-extracting Zip file for software installation)?
    I have a word file that I created to help me remember - is there anyway to email it to you?

  • SQL*Loader - How to combine Flat File 3 columns and put into one single column

    Receive a flat file delimited by comma. Want to combine Flat File last 3 columns and put into one single column(Table).
    e.g.
    Flat File
    100,239,30,20,30
    While inserting into table want to combine last 3 columns and insert into invoice number column.
    302030

    It is not possible to combine the last 3 columns as those columns are seperated by commas and in the SQL Loader control file you must ve specified COMMA as an delimiter. So u better have all the columns in the table plus add one more column which holds the concatenation of the 3 columns.
    Vijay

  • How to group all the reports and execute like single application ?

    Hi,
    I am trying to develop some reports in Crystal Reports XIR2 , here i have Design and Preview options that is for every report i should see , how to group all the reports and execute like single application?
    any option is there to run the report
    i mean is it possible to have a home page from there have links to each report and when i click on the link corresponding report should be shown , if it is possible , How?
    Regards,
    kathyaini

    You will want to look into Crystal Reports Server, it does exactly what you describe and more:
    http://www.businessobjects.com/product/catalog/crystalreports_server/
    Download a trial of CR Server here:
    http://www.businessobjects.com/product/freetrials.asp

  • I have added a 5 songs from a single album and in Ipod it comes as enigma album and in that one song is available and another album named enigma and another song. IT happens for 5 songs also. How to make all the 5 songs in one album name Enigma

    I have added a 5 songs from a single album and in Ipod it comes as enigma album and in that one song is available and another album named enigma and another song. IT happens for 5 songs also. How to make all the 5 songs in one album name Enigma???

    I am working on a friend of mine's 15g ipod(W/dock connector)and I am having the same trouble except it does it to all the songs. I have tried reseting it multiple times, but to no avail.
    I am not sure that this runs on windows XP, it is absolutly archaic (compared to my 5th gen. 30g video).
    Help?
    15g ipod (w/dock connector)   Windows XP  
      Windows XP  

  • Convert the all the quantity units into one Unit of measure that is 'CSE'.

    Hi all,
    I want to convert the all the quantity units into one Unit of measure that is 'CSE'.
    would anybody tell me what is the FM that converts all the quantity units into one Unit.
    Thanks in advance,
    Mythily

    Hi Mythily,
    You can check the following function module - -
    FCO_CONVERT_FROM_BASE_UNIT
    MD_CONVERT_MATERIAL_UNIT
    MS_CONVERT_UNIT_TO_TIME
    RV_CONDITION_CONVERT_UNITS
    VHUMISC_CONVERT_TO_ALTERN_UNIT
    VHUMISC_CONVERT_TO_BASEUNIT
    WALL_QUANTITY_CONVERT_UNIT
    WALL_QUANTITY_CONVERT_UNIT_RND
    WSTP_CONVERT_UNIT
    Regards
    Pinaki

  • How do I count the unique value pairs in two columns of a table?

    I have a table (Table 2) that is populated with data from an imported .csv file. On table 1 I need to count the unique value pairs in two columns of Table 2.
    Here's what I have:
    Date                                        Person
    7/10/2011                         A
    7/12/2011                         W
    7/12/2011                         X
    7/12/2011                         X
    7/12/2011                         X
    7/12/2011                         Z
    7/14/2011                         Z
    7/15/2011                 X
    7/16/2011                         Z
    I'm focusing on person "X" and can easily count how many days that person shows up but what I want is to see on how many unique days that person shows up.
    Here's the result I'm looking for (Person "X" shows up on 2 different days - 3 times on 7/12/2011 and once on 7/15/2011):
    X                    2
    I can't seem to find a function that allows me to do that. I also am not allowed to modify Table 2 so that leaves me to come up with a solution on Table 1.
    Any ideas would be greatly appreciated.

    Hi John,
    Not being allowed to modify Table 2 is a minor inconvenience. Just copy (using a formula) the necessary two columns onto Table 1.
    Yellow columns may be hidden. The procedure progresses from left to right. All formulas are entered into row 2 then filled down that column to the end of the table. The table must be as long as the list in column A of Table 2.
    A2: =Table 2::A
    Fill right to column B.
    Fill both columns down as far as needed.
    I've used actual Date and Time values in column A, formatted to show only the Date part, but the technique will work with text in these cells, provided all cells representing the same 'date' have exactly the same content.
    C2: =A&B
    This concatenates the contents of each row of columns A and B into a single text string.
    D2: =COUNTIF($C$2:C2,C)
    This counts the number of occurrences of the Date&Name string on the current row from the first regular cell in column C (C2) to the current cell.
    E2: =IF(COUNTIF($B$2:B2,B)=1,MAX($E$1:E1)+1,"")
    This constructs the index of first occurrences of each name, in the order they first occur. The index is used by LOOKUP in column F.
    F2: =IF(ROW()-1>MAX(E),"",LOOKUP(ROW()-1,$E,$B))
    This uses the index value created in E as a search-for value to extract a single copy of the names in column B. The result is a list of all distinct names in the list. Note that spelling differences will be counted as distinct names.The IF statement stops the listing when the last distinct name is extracted.
    G2: =IF(LEN(F)>0,COUNTIFS($B,"="&F,$D,"=1"),"")
    This counts the number of 'first occurrences of distinct Date & Name strings for each name on the list (ie. the number of distinct dates on which each name appears in the original list).
    All of the functions used are described, with at least one example for each, in the iWork formulas and Functions User Guide. You can download the guide, and the Numbers '09 User Guide, via the Help menu in numbers.
    Regards,
    Barry

  • How to get all the ID value dynamically in javascript

    Hi,
    Please let me know how to read all the id of the components dynamically from the *.jspx page in adf.
    i want to store all the values in the array of the javascript.
    Thanks

    jdev version -11.1.1.4
    use case:- we are capturing all value entered by the user on screen and storing it in the cookie like (key,value) pair where key is id and value is value of the component keyed-in.
    Later when there is browser close or transaction faliure we are retreiving back all the values from cookie on load of page.
    Now the point is when the screen loads back it is not getting the component id dynamically, we are storing manually the id's of the components to retrieve the value.
    But we want to read all the id of all the components dyanamically once page load and store it in javascript array variable.
    Let me know if there is any method to read all the id of the page in ADF javascript.
    Or any other alternative method.
    Please help.
    Thanks,

  • OMB Plus : how to get all the generated messages into a text file ?

    Hello,
    I wrote an OMB TCL script and I would like to know how to get all the messages generated during the exécution into a text file.
    I tried this, but it works only for a puts command :
    set DesProjet ACT_1
    set filename [ open "c:\\temp\\INFDE_010_IMPORT_REPOSITORY_$DesProjet.log" w]
    puts "test"
    Thank you for your help

    Hello Alain, you should try the OMBLOG variable. If you set it inside OMBPlus:
    set OMBLOG c:/temp/mylog.txtthen all the OWB specific commands are logged with their output. By OWB specific I mean all those that start with OMB.
    This is more than what you see in the interface, because:
    - messages inside procedures are logged; you wouldn't see them on std.output when you call a proc
    - variables are resolved, so if you issue the command
    set my_var VERY_IMPORTANT_TABLE
    OMBDROP TABLE '$v_myvar'the log will show:
    OMBDROP TABLE 'VERY_IMPORTANT_TABLE'
    Table dropped
    and you know something is wrong... so OMBLOG is very useful to intercept all manipulations on you repository.
    If what you want instead is a dump of the screen output when you execute a script, I suggest you redirect standard output from the operating system command line. Unfortunately OMBPlus doesn't support all advanced redirection and tracing features of the TCL language.
    Hope this helps, Antonio

  • How to get all the allowed values of a property?

    Hi all,
    I want to read all the allowed values of a property. I have created a new custom property and given 3 values as allowed values.
    What i want to do is programtically read all the allowed values of that particular property.
    Regards
    Rajeev

    Hi guys,
    I'm trying to do exactly the same, i need a list with all the KM properties, i'm using the very same code thar Romano putted on his post, and i'm getting this:
    InitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.#
    On this sentence:
    IConfigurationAccess icAccess =  Configuration.getInstance();
    I'm developing a  Webdynpro application on server A and i'm using the KM libraries through an EJB inside a Webservice on server B.
    Do you have any suggestions?
    Thanks in advance

  • How to delete all the PSA data in one go

    Hello Guys,
    I want to clear all the data from all the PSA tables at one shot, how can i do this??
    I have tried following things:
    1) I have gone to PSA root node and right click and then clicked on delete PSA data, but its showing me all the datasources and when i am executing that, it is deleting one by one(that i means i need to select individual datasource, which i do not want).
    2) Above specified step runs RSPSADEL1 in background , so i doubt whether it deletes psa data only or complete Table?
    3)I got the info from other posts that there is a fm which is RSATREE_PSA_DELETE_BATCH, but i need to make myself clear whether this fm deletes only data or complete Table?
    I am using sap-bw 3.5.
    Regards,
    Dolly

    Hi,
    there is one easy way to delete data from PSA .You can create a process chain have one delete data from PSA step where you need to give PSA table name and request older than (no of days before which you want to delete data ).
    Execute it and it will delete all the data before specified no of days .You can add multiple PSA tables here and can delete whole data in one go .
    Regards,
    Jaya

Maybe you are looking for

  • Pop-up menu trouble!

    I am learning to create a website using dreamweaver, fireworks and photoshop. I created a sample website using these tools. Initially I created a layout in photoshop followed by web slices in fireworks. Later I exported my work in dreamweaver to comp

  • Windows Vista and itunes 10.6

    After I installed itunes 10.6, the shorcut on my desktop no longer works.  The message I received said something about the file path no longer working.  I'm running Windows Vista.  Any ideas?

  • Connecting inspire 6.1 to Xbox 360

    Hello, I want to connect my Inspire 6.1 6600 speaker system to my Xbox 360. What do i have to do? and what do i need? Message Edited by ssjf on 05-19-2006 11:56 AM

  • Solaris 10 installation hangs at filesystem preparation stage

    Dear all, I am facing problems trying to configure Solaris 10 which was preinstalled on a Sun Ultra 45 workstation. Passing the network configuration stage (some errors included) the installation simply hangs while trying to prepare the filesystem, h

  • Sql server table as Target table

    Hi folks, I want to use sql server database table as target table in oracle warehouse builder.Is it possible in oracle warehouse builder 10.2.0.2.8. If their is any work arounds please let me know.... Regards Kumar