How can I Make one column into Multiple columns

Id
SCM-01-015
SCM-01-020
SFA-02-021
SFC-02-042
STB-03-035
STP-04-167
SVF-06-150
I want the output like this
Id 01 02 03 04 06
SCM-01-015 5
SCM-01-020 10
SFA-02-021 15
SFC-02-042 15
STB-03-035 20
STP-04-167 50
SVF-06-150 5
thank you in advance

Hi,
801668 wrote:
Id
SCM-01-015
SCM-01-020
SFA-02-021
SFC-02-042
STB-03-035
STP-04-167
SVF-06-150
I want the output like this
Id 01 02 03 04 06
SCM-01-015 5
SCM-01-020 10
SFA-02-021 15
SFC-02-042 15
STB-03-035 20
STP-04-167 50
SVF-06-150 5
thank you in advanceWhenever you post formatted text (such as query output) on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after formatted text, to preserve spacing.
Do you want output something like this, which is from the scott.emp table?ENAME ANALYST CLERK MANAGER PRESIDENT SALESMAN
ALLEN 1600
JONES 2975
FORD 3000
CLARK 2450
MILLER 1300
SMITH 800
WARD 1250
MARTIN 1250
SCOTT 3000
TURNER 1500
ADAMS 1100
BLAKE 2850
KING 5000
JAMES 950
(ALLEN is a SALESMAN, JONES is a MANAGER, ..., JAMES is a CLERK.)
If so, do a pivot, somehting like this:SELECT     ename
,     MIN (CASE WHEN job = 'ANALYST' THEN sal END)     AS analyst
,     MIN (CASE WHEN job = 'CLERK' THEN sal END)     AS clerk
,     MIN (CASE WHEN job = 'MANAGER' THEN sal END)     AS manager
,     MIN (CASE WHEN job = 'PRESIDENT' THEN sal END)     AS president
,     MIN (CASE WHEN job = 'SALESMAN' THEN sal END)     AS salesman
FROM     scott.emp
GROUP BY ename
Always say which version of Oracle you're using.
The query above will work in Oracle 8.1 or higher, but starting in Oracle 11 there's a better way:  SELECT ... PIVOT.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How can I seperate one string into multiple strings using PowerShell?

    New to PowerShell...how can I read/separate parts of a file name? For instance if I have a file name like "part1_part2_part3_part4.xls", how to separate this file name to four different parts? So I basically want to go from that file name,
    to four different strings like part1, part2, part3, and part4...as four separate strings. How can I get this done in PowerShell?
    Thanks

    You can try something like this
    PS> (Get-ChildItem part1_part2_part3_part4.xls).BaseName.Split('_')

  • How can I make one cell search multiple other cells for a string of text and return whether or not the string appeared in the cells searched?

    https://www.icloud.com/iw/#numbers/BAI31boMQXsGKc8NH22BlqWRzbs8PdgWBs-F/2014-15_ Curriculum_Planning_w_CCSS_(Web_Shared)
    My document is above, if anyone wants to help this crazy teacher invent a better lesson planner.
    Here's my predicament.  The state in which I teach requires teachers to keep up with which of the Common Core State Standards (CCSS) their instruction is addressing and when the standards were addressed.  I got the bright idea to do this through a spreadsheet in Numbers because our school is getting iPads this year, so it'd be pretty sweet to be able to assemble all of my lesson plans in one massive spreadsheet.  On the "AP Lesson Plans" sheet, I've got a few weeks worth of lesson plans entered in.  I'm planning on going in and using the drop-down menu next to each lesson plan to add all the CCSS on a per-day basis.  This is simple enough, but here's where I run into a problem.
    I want the "AP Standards" sheet to concatenate, in cells D3 through G76, the dates on which a standard was covered.  What I need is some way for, say, Cell D3 to look at the table on the "AP Lesson Plans" sheet and concatenate the dates of every lesson which has the standard in column A (In this instance, RL.11-12.1).  At the end of the day, the functionality I need is that I can enter my lessons and CCSS on the "AP Lesson Plans" sheet and go to the other sheet and see a summary of which standards have been addressed, when, and how often.
    If that's as clear as mud, well, I teach literature, not technical writing, so my apologies.  I'm more at home with Jonathan Swift than spreadsheets.  I'll gladly help you help me if you'd let me know what you need to know.  Oh, and to illustrate my knowledge level (just enough to be dangerous), I've left you the formula of my best stab at making cell D3 behave as desired.  It's the gray box on the "AP Standards" sheet.  Yikes.

    Hi Arrdenet,
    Congratulations on the nested IFs. I haven't tested that formula, but it is impressive. It will be very difficult to debug if it doesn't work, and I think it would make Numbers very slow.
    Here is a different approach. After you enter all the CCSS, add another column with HLOOKUP.
    Edit:
    B2 (and Fill Down)
    A2 (and Fill Down)
    =IFERROR(HLOOKUP(A$1,C2:E2,1,0),"")
    HLOOKUP looks for the value in A1 in all the CCSS columns.
    IFERROR is to stop the error triangles appearing and returns "" (NULL) instead.
    Then sort by column A.
    Not a complete answer, but it might get you started.
    Regards,
    Ian.

  • How can I separate one column into multiple column?

    How can I separate one column into multiple column?
    This is what I have:
    BUYER_ID ATTRIBUTE_NAME ATTRIBUTE_VALUE
    0001 PHONE_NUMBER 555-555-0001
    0001 EMAIL [email protected]
    0001 CURRENCY USD
    0002 PHONE_NUMBER 555-555-0002
    0002 EMAIL [email protected]
    0002 CURRENCY USD
    0003 PHONE_NUMBER 555-555-0003
    0003 EMAIL [email protected]
    0003 CURRENCY CAD
    This is what I would like to have:
    BUYER_ID PHONE_NUMBER EMAIL CURRENCY
    0001 555-555-0001 [email protected] USD
    0002 555-555-0002 [email protected] USD
    0003 555-555-0003 [email protected] CAD
    Any help would be greatly appreciated.

    This is another solution. Suppose your actual table's name is test(which has the redundant data). create a table like this:
    CREATE TABLE test2 (BUYER_ID number(10),PHONE_NUMBER varchar2(50),EMAIL varchar2(50),CURRENCY varchar2(50));
    then you will type this procedure:
    declare
    phone_number_v varchar2(50);
    EMAIL_v varchar2(50);
    CURRENCY_v varchar2(50);
    cursor my_test is select * from test;
    begin
    for my_test_curs in my_test loop
    select ATTRIBUTE_VALUE INTO phone_number_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='PHONE_NUMBER';
    select ATTRIBUTE_VALUE INTO EMAIL_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='EMAIL';
    select ATTRIBUTE_VALUE INTO CURRENCY_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='CURRENCY';
    INSERT INTO test2
    VALUES (my_test_curs.person_id,phone_number_v,EMAIL_v,CURRENCY_v);
    END LOOP;
    END;
    Then you will create your final table like this:
    create table final_table as select * from test2 where 1=2;
    After that write this code:
    INSERT ALL
    into final_table
    SELECT DISTINCT(BUYER_ID),PHONE_NUMBER,EMAIL,CURRENCY
    FROM TEST2;
    If you have a huge amount of data in your original table this solution may take a long time to do what you need.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • How can I make a column of sums out of a repeating pattern of 24 changing numbers

    How can I make a column of sums out of a repeating pattern of 24 changing numbers in Numbers.
    I have a long list of 8760 numbers of which I need to take the sum (and store in a column) of each 24 numbers.

    Here's one way. I've reduced the example, taking groups of five numbers from a set of 20. I've used 3 as the data number in all cases to make the sum easily recognizable.
    Original column of numbers in Data::column A.
    Data::B2 (and filled down): =QUOTIENT(ROW()+3,5)
    This adds 3 to the row number, then divides by 5, returning the quotient and ignoring the remainder.
    The result is a 'group number' for each group of five rows.
    Sums of each group are reported in the Sums table.
    Sums::A2 (and filled down): =ROW()-1
    Sums::B2 (anf filled down): =SUMIF(Data::$B,A2,Data::$A)
    For your example, assuming the 8760 numbers are listed in column A of a table named Data, starting at cell A2:
    Add a second column to the table (column B).
    In B2 enter the QUOTIENT formula above, with these two revisions:
    =QUOTIENT(ROW()+22,24)
    Fill down to all cells in the column.
    Provided you have named the first table "Data", both formulas in the Sums table will be as written above. You will need to extend the Sums table to 366 rows (including the Header row) to accommodate all 365 groups of 24.
    Regards,
    Barry
    PS: For details on the functions used, see the iWork Formulas and Functions User Guide. You can download the guide via the Help menu in Numbers '09.

  • Pages:  How can I sort one column of words and not have it affect the other columns?

    How can I sort one column of words and not have it affect the other columns?  I have opened the inspector to the edit columns and rows under Table.  It will sort the column, but then it changes the other colums as well.  I know that if I use Numbers, it will work, but I want to know how to do the same thing in Pages.

    Hi Peter,
    Numbers sorts full rows on values in selected column(s). The technique for sorting a single column is essentially the same as Jerry is describing for Pages tables—separate the (data in the) column to be sorted, sort it, return it to the table.
    In Numbers the actual column may be separated from the original table, sorted, then returned. In Pages, the data must be extracted, sorted, then pasted back in, overwriting the unsorted data (if it was left in the original table).
    iWork tables follow a database model in which each row is a Record, and each column holds a Field within the records.
    As evidenced by the current question (and several similar questions arising in the Numbers community) that model doesn't apply to the way some users, especially some who come in from the MS Excel world, use tables.
    With Excels model—islands of data on a single large table, the ability to sort one or a selected few columns of data makes sense. One 'island' may comprise only cells AA21:AH50. Sorting that small 'table' should be possible without disturbing the rest of rows 21-30, which are probably part of one or more other 'data islands' in the sea that is a MS Excel spreadsheet.
    In Numbers, each of those 'islands' would be a separate Table, and that Table would be sortable without disturbing other Tables in the document.
    Regards,
    Barry

  • Mountain Lion Recovery DVD - How can I make one, ML was installed on my iMac and BBP

    Mountain Lion Recovery DVD - How can I make one, ML was installed on my iMac and MBP when I purchased them. When I look at the App Store, it dose not show ML as purchased (to download again) - do I have to purchase it again to make a Recovery DVD?
    Thanks for your help.
    Regards
    NGI

    do i have to purchase it again to make a Recovery DVD?
    No. You can still make a bootable recovery DVD, but you will not be able to make a full bootable copy of ML without purchase.
    1) Enable the debug menu for Disk Utility via Terminal Application. Navigate to terminal by typing "terminal" in   spotlight. Copy the bolded text below and enter it into the command prompt:
    defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true ; open -a "Disk Utility" ; exit
    2) From the Debug Menu > Select Show every Partition > Recovery HD should appear
    3) Right click (control + click) the Recovery HD partition and select "Mount"
    4) Right click again the partition again > "Reveal Recovery HD in Finder". Leave this window open
    5) At this point, you will need open terminal again and enter the following command:
    sudo chflags nohidden /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg ; exit
         Type your password when prompted.
    6) Navigate back to the Recovery HD finder Window > com.apple.recovery.boot > BaseSystem.dmg
    7) Drag "BaseSystem.dmg" into Disk Utility's sidebar.
    8) Insert your DVD
    9) Select "BaseSystem.dmg" in the sidebar and hit "Burn"
    Once the burn is completed, hold option down at startup and select the DVD to boot. This is a bootable Recovery partition, not a bootable copy of ML.
    Note: to disable the debug menu,
    defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool false

  • How can i put one scene into JPanel of the swing?

    how can i put one scene into JPanel of the swing?

    980571 wrote:
    ty for the information but i have a problen with JFXpanel when i try to into a panel it doesnt display insideSorry to hear that. If you want assistance with the code, feel free to post the relevant parts of it. Make sure to use \ tags when you do.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I modify one column of current and next record depending of some criteria?

    Having DDL
    CREATE TABLE #ServiceChange(
    [ID] [int] identity(1,1),
    [SHCOMP] [char](2) NOT NULL,
    [SHCRTD] [numeric](8, 0) NOT NULL,
    [SHCUST] [numeric](7, 0) NOT NULL,
    [SHDESC] [char](35) NOT NULL,
    [SHTYPE] [char](1) NOT NULL,
    [SHAMT] [numeric](9, 2) NOT NULL,
    [CBLNAM] [char](30) NOT NULL,
    [GROUPID] [char](2) NULL
    And original and desire data in below link
    https://www.dropbox.com/sh/bpapxquaae9aa13/AADnan31ZASublDjN7sa2Vvza
    I would like to know how can I modify one column of current and next record depending of some criteria using SQL2012?
    The criteria is:
    Type should always flow F->T
    if current abs(amount)> next abs(amount) then groupid = 'PD'
    if current abs(amount)< next abs(amount) then groupid = 'PI'
    there is no case when those amounts will be equals
    where current(custid) = next(custid) and current(service) = next(service) and groupid is null
    Any help will be really apreciated.
    Thank you

    I tried that and got this error
    'LAG' is not a recognized built-in function name.
    You said you were using SQL 2012, but apparently you are not. The LAG function was added in SQL 2012. This solution works on SQL 2005 and SQL 2008:
    ; WITH numbering AS (
       SELECT groupid,
              rowno = row_number()  OVER (PARTITION BY custid, service ORDER BY date, id)
       FROM   #ServiceChange
    ), CTE AS (
       SELECT a.groupid,
              CASE WHEN abs(a.amount) < abs(b.amount) THEN 'PD'
                   WHEN abs(a.amount) > abs(b.amount) THEN 'PI'
              END AS newgroupid
       FROM  numbering a
       JOIN  numbering b ON b.custid  = a.custid
                        AND b.service = a.service
                        AND b.rowno   = a.rowno - 1
    UPDATE CTE
    SET   groupid = newgroupid
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How can I make one list of all events I have in over 30 libraries I made

    How can I make one list of all events I have in over 30 libraries I made?

    The only way I know of is to take a screenshot of the Photo mode with the View ➙ Show Event Titles selected.  That will give you a list of sorts.  Might take more than one screenshot per library.
                   Click to view full sized
    OT

  • How can we make one object as synchronizable?

    Hi!
    I am new to java.How can we make one object as synchronizable?
    Thanx

    Synchronize is used to make an object and/or a functional sequence thread safe. By itself it does not make something thread safe.
    So the point is to make something thread safe not just to synchronize it.
    You can either sychronize a method like so....
          public synchronized void doit()
    Or you synchronize on an object (where 'Object' below is solely as an example, any object can be used)...
          Object lockObject = new Object();
          public void doit()
             sychronized (lockObject)

  • How can i make hidden column in JTable

    hi, how can i make hidden column in JTable,
    basically i have a ID field in JTable, i have to use this ID , but i also dont want to show this ID in JTable.
    any idea how ??

    staiji its not working
    i did this :
    first :
    TableColumnModel columnModel =
    usersTable.getColumnModel();TableColumn column =
    columnModel.getColumn(1);
    usersTable.removeColumn(column);
    then when i trying to get this :
    Integer userId =
    (Integer)usersTable.getValueAt(UserBrowser.this.usersTa
    le.getSelectedRow(), 0);
    it not give me ID column's value .
    i have a column in JTable like :
    ID | Username | First name | Last name
    i want to hide ID column , but get this ID's value
    when user clicks on JTable row.Hi, if you would read the documentation about JTable.getValueAt(...) you will find, that there is a significant difference between this method and the datamodels getValueAt(...) method. JTables getValueAt(...) method interprets column-index as index in its TableColumnModel - in your TableColumnModel there is no column any longer that holds ID values, therefore you were not able to get it by JTable.getValueAt(...). Do not use these methods for the purpose you want it for - you will also get the wrong values, if the user has repositioned columns - the column index is always interpreted as index in the currently used TableColumnModel and IS NOT A MODELINDEX.
    greetings Marsian

  • How can I make one slide that contains multiple slides?

    Hi, I want to make slideshow for presentation. And I want to know how can I make this slide.
    For example in this picture, have 1 main slide and 6 sub slides. I want to make slide like this, and all slides should be in one slide. And I want to zoom in to sub slide when I click and then zoom out when I click one more. And then second slide should be zoom in when I click and zoom out when I click again. And then slide 3 etc.
    I want to know how can I do this.

    There are two ways to do this.
    1. Duplicate the main or first slide numerous times - as many as you'll need for the show, which looks like 6 including the first "overview slide".
    2. You know have two choices - either use the Magic Move transition between the first slide and the next, which has the main box centre screen and enlarged proportionally.
    3. Or enlarge the slides so that the main point is central, but use hyperlinks to move between the slides. This also gives you the liberty of changing the order spontaneously should the situation demand. Using the main first slide, place an invisible box around each element and use a link to move to that slide which is enlarged. Then you have to decide if you will come back each time to slide 1 (the overview) by having the whole slide hyperlinked to slide 1, or the whole slide linked to the next slide. That way you don't have to go looking for the hyperlink area.
    The Magic Move effect will give your presentation a "Prezi" like effect, while the hyperlinked version I've described will just use gentle dissolves between each slide.
    I will sometimes use 3 because I want to encourage audience participation and let them choose where to go next... e.g., the various elements of a 747 wing assembly, or the interior of a large cruise ship, showing state rooms, dining, pool area, ballroom, etc.
    Les

  • During import, how to auto split one project into multiple albums based on date?

    I believe I've done enough aperture reserach to get all my terminology right, so here goes...
    I've created a file structure within the aperture inspector the the tune of: 
    Year [folder], Type of event (Occasion, special occasion, holiday, vacation) [folder], Project (Wedding), Album (i.e. Day 1, Day 2 or Pre wedding week, event, honeymoon).
    I also have entire months with 7 or 8 pictures each day, that are of the same type/project (random dog pictures) but are distinctly different days (albums - day in park, in bed at night, watching movie). 
    My question is, can I import one project with multiple albums already created based on the date they're taken.  As I can see it, all I can do is split individual projects automatically by date.  But what if one project is over one month, but has multiple distinct days that would be ideal for albums?  One more example.  We did a trip to San Fran.  One day was touring the city, one day was a concert, another day was touring the city.  All one project, but 3 different albums (in my mind).  I had to import as one project, then separately go in and make albums.  I would like that done automatically.
    My suspicion is that I can not natively do this within aperture, and that I would need something called an "applescript."  I haven't done any reserach into that area, so if that's the case and you know where I can find a script that would do this, I'd appreciate the help. 
    Sorry for the wordiness, just wanted to be clear.  Thanks for any and all help!

    Hi,
    You need to create a new requirement in tcode VOFM for that, together with your ABAP consultant. This requirement will be used in copy contol.
    http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf
    MdZ

Maybe you are looking for

  • A few questions

    Hi there, I bought a Macbook 13" 1.8Ghz CD, 512M RAM, 60GB HDD just over 18 months ago. I then bought an iMac 2.33 C2D, 2GB RAM about a year ago. I am considering upgrading from my Macbook to a Macbook Pro but I just want to make sure it is worth it.

  • How can I download my hotmail junk mail and other folders?

    I linked my account and i can only see inbox. Please help if possible, thanks!

  • Syncing photos from iPhone

    In ITunes it gives you the opportunity to sync photos from computer to iPhone Why not the other way round iPhone to computer? Pete

  • Re: group calls free, cancelled Premium, getting c...

    I too signed up for Skype premium and I can't find a way to cancel. Every month my credit card is charged $9.99...I tried to go to my settings and everything else on this page to cancel but nothing works. So do I have to call my credit card company t

  • Remove underline folders

    Hi, How could remove the default underline of the folders? imagine it as a link to the folder is displayed by default but I would not show the underline. can you help me? Thanks.