How to put 2nd column into 1st column in excel
Hello,
I have a question how to put 2nd column into 1st column in excel. Thank you.
Solved!
Go to Solution.
Why the 1 iteration for loops?
Why the two Index Arrays? It is just trying to fix the problem created by the For Loops on the original 1-D arrays.
Both of those things are creating 2-D arrays that are complicating things and can be eliminated.
You can take your 2 1-D arrays, use Build Array and right click to set "Concatenate Inputs".
If you do have a 2-D array, you can use Reshape Array to make it a 1 column by N row 2-D array.
Similar Messages
-
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 to Splilit The String Into Single Column using Comma As Delimiter ?
How to Splilit The String Into Single Column using Comma As Delimiter ?
using Functionrefer my thread ,code is also available see if that helps you
error while executing the sp ORA-21779: duration not active -
How to put measures correctly into spreadsheet
Hi expert,
I loaded data into a planning model, and I can see data in BW and BEX, but when I put 'ACCOUNT' into row, and 'TIME' into column, I can't see 'measures' in spreadsheet, eventhough I drag 'measures' into spreadsheet from EPM pane, then update, getting blank for 'measures', it is gone. please tell me how to put measures correctly into spreadsheet.P.S If you are creating report by drag n drop on EPM pan, then same way need to add measure dimension in desired axis.
Share the screen shot.
Shrikant -
How to put my podcasts into playlist folders? Can't drag'em.
How to put my podcasts into playlist folders? Can't drag'em.
I've subscribed to a number of podcasts & they appear in my iTunes window under the Podcasts section.
There i have
2 problems:
1st: I can't rearrange or group them so can listen consecutively to different topics.
I must listen to one, then come to the keyboard and select the next to start playing. Now, I know that I can get them to play consecutively once I've placed them into Playlist folders,
but that brings me to my second problem:
2) I can't drag and drop them into separate iTunes FOLDERS (by topics).
(Though I have been able to drag&drop separate items from my 'Music' section into iTunes playlist folders.)
But can't drag from Podcasts section into Playlists,
as everytime I try they just refuse to go in and scurry back to their starting position under Podcasts.
Zupwidiss? This can't be.
I would be grateful for your solution.
And also grateful if I could have easily found the solution explained
before I had to resort to bothering this forum with this question.
Just using my MacMini, Snow Lep.Thanks very much.
You have reminded of the
difference between
Playlists and Playlist Folders:
One can only drag things from the Master list into PLAYLISTS.
And can only drag Playlists into Playlist Folders.
I'm an older man, and easily confused by these things.
Many thanks to my friend in Germany.
P.S. Your English is excellent. -
Splitting one column into different columns.
Hello Experts,
How do i split datetime column into different columns while doing a Select statement.
Ex:
The column "REC_CRT_TS" has data like "2014-05-08 08:23:09.0000000".The datatype of this column is "DateTime". And i want it in SELECT statement like;
SELECT
YEAR(DATETIME) YEAR,
MONTH(DATETIME) MONTH,
DATENAME(DATETIME) MONTHNAME,
DATEPART(DATETIME) WEEKNUM,
DAY(DATETIME) DATE,
DATEPART(DATETIME) HOUR
FROM TABLE_NAME;
The output should look like this;
--YEAR| MONTH | MONTHNAME| WEEKNUM | DATE | HOUR
--2014| 5 | May | 25 | 08 |08
Any suggestions please.
Thanks!
RahmanI made a very quick research and I see in this blog post
http://www.jamesserra.com/archive/2011/08/microsoft-sql-server-parallel-data-warehouse-pdw-explained/
that It also uses its own query engine and not all features of SQL
Server are supported. So, you might not be able to use all your DBA tricks. And you wouldn’t want to build a solution against SQL Server and then just hope to upsize it to Parallel Data Warehouse Edition.
So, it is quite possible that this function doesn't exist in PDW version of SQL
Server. In this case you may want to implement case based month name or do it in the client application.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles -
Splitting one column into 4 columns
Hi,
I want to split one column into 4 columns as shown below.
parameters
PanelPanel=MP01110201&YearYear=2013&Source=1&UserID=aad2779
PanelPanel=MP12100173&YearYear=2013&Source=1&UserID=aac6440
it should be display as
panel yearyear source userid
MP01110201 2013 1 aad2779
MP12100173 2013 1 aac6440
there will be thousands of rows in the column. Can anybody help how to split it as shown.The length may very from row to row
Thanks for your help.........
BALUSUSRIHARSHAIt is working...thank u very much... I found one more issue here
PanelPanel=MP01110201&YearYear=2013&Source=1&UserID=aad2779
PanelPanel=MP11100070&Source=1&PNR=2&YearYear=2014&UserID=ddc1535
PanelPanel=MP11101276&Source=1&YearYear=2014&PNR=2&UserID=ddc1565
I found 3 kinds of formats in the same column... I didn't observe the data carefully while posting the
question..sorry about that. In this case if we need to show as
panel yearyear source
userid
MP01110201 2013 1 aad2779
MP11100070 2014 1 ddc1535
MP11101276 2014
1 ddc1565
is it possible to filter like this? Should we use any case statement in query while we have diff formats
like this?
BALUSUSRIHARSHA -
Select multiple column into one column
Hi..!!!
Is it possible to select 4 columns in to 1 columns?
I've major1, major 2, major 3, major 4 and i want to retrieve all the columns into one column called "Majors".
Is it possible? if yes then how?
Help me out.
Thanks,
HimadriIf you had given a proper example this thread would have been over in two posts. What you are looking for is often described as an UNPIVOT.
I tend to use a collection type for this, e.g.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> CREATE OR REPLACE TYPE varchar2_table AS TABLE OF VARCHAR2 (4000);
2 /
Type created.
SQL> SELECT empno, column_value
2 FROM emp, TABLE (varchar2_table (ename, job));
EMPNO COLUMN_VALUE
7369 SMITH
7369 CLERK
7499 ALLEN
7499 SALESMAN
7521 WARD
7521 SALESMAN
7566 JONES
7566 MANAGER
7654 MARTIN
7654 SALESMAN
7698 BLAKE
(snipped)
28 rows selected.
SQL> -
How to put html file into a canevas?
How to put html file into a canevas?
Hi,
would require you to write a JavaBean that interprets the HTML (there are commercial versions of this available)
Frank -
How to put selected videos into one place (File)
How to put selected videos into a File so I can only show on TV the videos in that file
YYou have to describe your issue in more detail. Are you using iTunes? Trying to see it in Apple TV, etc, etc.
-
How to put Variable value into Labeltext of a subcomponent WIB
Hello
In our Web Based Planning tool we uses Tabstrib_control component and the Label-Text is filled like 'Plan 2008'. (Our BPS = 3.5 and Web interface builder)
I am looking for a way,how to put a variable into the Label field of the component. I am not sure if there is a possibility to enhance the labelfield with variable values.
Thanks a lof for any good idea.
Best regards
Christian
Our BPS = 3.5 and Web interface builderHello Christian,
Maybe I have a solution for your problem.
1. Create subcomponent "Selector variable" with your variable.
2. Hide this new subcomponent
3. Write in the Label-Text: <%=descr("Name of new subcomponent"/value)%>
If the variable will be selected by the user in the web interface, put the name of this selector in the field "Update upon Change of" in the properties of the new created subcomponent.
Hope this helps.
Friedrich -
How to put a dvd into ipod touch
i have no idea how to put my DVDs into my ipod touch! can someone help? i have the new touch, 3g i think? it's a 32GB. i really don't feel like having to buy the movie on itunes when i already own it as a dvd. can someone please help me?
Sorry, but the Apple Forum Terms of Use don't permit us to discuss ripping commercial DVDs. Try Googling for such information.
-
How to load rm file into ordAudio column?
Hello everybody,
I made many attempts trying to insert aa.mp3(3.63Mb) and bb.rm(3.58Mb) file into ORDSYS.ordAudio column respectively with the same way.
the result is: aa.mp3 was inserted successfully, but the bb.rm was not. It showed the error message: "java.sql.SQLException:ORA-01401:inserted value too large for column"
Why? How can I insert *.rm into the ordAudio column?
main code are grateful.>
>
1.tonight, I made another trying to insert aa.mp3(3.63Mb) and bb.rm(3.58Mb) file into ORDSYS.ordAudio column respectively with the same way.
the result is: aa.mp3 was inserted successfully, but the bb.rm was not. It showed the error message: "java.sql.SQLException:ORA-01401:inserted value too large for column"
And the main code is as following:
private final static String EMPTY_AUDIO = "ordsys.ordaudio.init()"; //declare the EMPTY_AUDIO
stmt = (OraclePreparedStatement)conn.prepareStatement( //
"insert into TAB_NOAUDIT_AUDIO(NOAU_AU_SERIALNUMBER,"+
"NOAU_AU_TYPE,NOAU_AU_KEYWORD,NOAU_AU_FILENAME,"+
"NOAU_AU_MEDIA)"+
" values (?,?,?,?," + EMPTY_AUDIO +")" );
stmt.setString( 1, id );
stmt.setString( 2, filetype );
stmt.setString( 3, new String(keyword.getBytes("ISO8859-1")) );
stmt.setString( 4, new String(filename.getBytes("ISO8859-1")) );
// System.out.println("after 4th set..()!!");
stmt.executeUpdate();
stmt.close();
//load the audio media file into table
stmt=(OraclePreparedStatement)conn.prepareStatement(
"select NOAU_AU_MEDIA from TAB_NOAUDIT_AUDIO where NOAU_AU_SERIALNUMBER = ? for update" );
stmt.setString( 1, id );
rset = (OracleResultSet)stmt.executeQuery();
while(rset.next()) {
media = (OrdAudio)rset.getCustomDatum( 1, OrdAudio.getFactory());
File file = new File(filepath);
FileInputStream fStream = new FileInputStream(file);
media.loadDataFromInputStream(fStream);
// System.out.println("after aumedia.loadDataFromInputStream()!!");
fStream.close();
I don't know why the error occured?
Whether the rm file format is not recognized by ORDSYS.ordAudio or not?
How can i do next?
The error you get has nothing to do with the size of the media data. The error you are getting has to do with another field somewhere I think. The error you say has nothing to do with media data, but regular SQL.
It all depends on where the error is... Do you get the error on the media.loadDataFromInputStream(fStream);? I suspect, you are getting the error on the insert. and that id or filetype are too big for the column.
Could you tell me where the problem occurs? On the first insert? on the update?? I really can't debug with the amount of information here.
In general, for debugging problems, you need to break it down smaller to find the errror.
Pleas break down your insert to find the problem.
2.Would you mind telling me more detail step or code for copying ordAudio data from table
to another table with the same ORDSYS.ordAudio column property?
One media column to another would simply be
select sound into soundvar from oldtable where .....
insert into newtable(newsound) values (soundvar) where ...;
If from a lob....
select lob into lobvar from....
soundvar.source.localdata := lob;
soundvar.setlocal();
soundvar.setProperties();
Larry
Larry -
How to insert parameter value into multiple columns and rows
Hi All,
I have one procedure insert_tab and I am passing
100~101~102:103~104~105:106~107~108 as a parameter to that procedure. I wanted to insert each numeric value into one column. The output of the table should contain
Table:
Col1 Col2 Col3
100 101 102
103 104 105
106 107 108
Awaiting for your reply..That's not more clear for me...
Anyway, if you really want a procedure for that, try :
SQL> create table tblstr (col1 number,col2 number,col3 number);
Table created.
SQL>
SQL> create or replace procedure insert_fct (p_string IN varchar2)
2 as
3 v_string varchar2(4000):=p_string||':';
4 v_substring varchar2(4000);
5
6 begin
7 while instr(v_string,':') > 0 loop
8 v_substring := substr(v_string,1,instr(v_string,':')-1)||'~';
9 insert into tblstr(col1,col2,col3)
10 values (substr(v_substring,1,instr(v_substring,'~',1,1)-1),
11 substr(v_substring,instr(v_substring,'~',1,1)+1,instr(v_substring,'~',1,2)-instr(v_substring,'~',1,1)-1),
12 substr(v_substring,instr(v_substring,'~',1,2)+1,instr(v_substring,'~',1,3)-instr(v_substring,'~',1,2)-1));
13 v_string:=substr(v_string,instr(v_string,':')+1);
14 end loop;
15 end;
16 /
Procedure created.
SQL>
SQL> show err
No errors.
SQL>
SQL> select * from tblstr;
no rows selected
SQL> exec insert_fct('100~101~102:103~104~105:106~107~108')
PL/SQL procedure successfully completed.
SQL> select * from tblstr;
COL1 COL2 COL3
100 101 102
103 104 105
106 107 108
SQL> exec insert_fct('109~~')
PL/SQL procedure successfully completed.
SQL> exec insert_fct('~110~')
PL/SQL procedure successfully completed.
SQL> exec insert_fct('~~111')
PL/SQL procedure successfully completed.
SQL> select * from tblstr;
COL1 COL2 COL3
100 101 102
103 104 105
106 107 108
109
110
111
6 rows selected.
SQL> Nicolas. -
How to Transpose a Row into a Column ? (URGENT)
I am trying to transpose a row into a column and please pay attention "Just one row of a table into a column of another table". Unlike Excel, in Numbers there is no easy way to transpose data but this is a bit urgent to me, any help would be appreciated!!!!
Dear Friend,
I have been looking for an answer the whole day and have performed every possible solution in the index, transpose, lookup and all the other recommended functions, none of them have worked for me in this case. I have gone through more than 20 posts on the discussion board but all of them were useless. I havent tried your method yet but although I appreciate your help and time, I dont remember forcing you or anyone else to help me, I just looked at posting my question as an option to avoid writing long scripts for such a basic function that is easily available on excel under the special paste option.
I thank you very much in advance for the advice.
PS. I tried it and with a couple of modifications it worked, thank you very much for making my day
Message was edited by: cool3pehr
Maybe you are looking for
-
Running wlst command in embeded mode results in error for deleteMetadata()
I need to use wlst command deleteMetadata() in embeded mode. I had followed instruction at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_scripting/using_WLST.html, to import the wlst interpreter, The command I use is: deleteMetadata
-
Disk Utility not showing same disk space as get info on HD
Hi, My Macbook Pro was really slow and i did Repair Disk and it seems to work much better. the problem is that when i get info on my HD it shows me that there is 200 GB free but when i go to Disk Utility it only shows me that there is 73 GB free??? H
-
New message output determination after changed a PO
Hello experts. When we create a purchase order a message output is triggered automatically according to customizing done in MN04. Ok for that. In which part of customizing can we define the output conditions of trigger again a PO? For example, I want
-
Content parsing of the sharepoint 2010 doc library documents
Can we parse the content of document(word,excel, ppt, pdf) which is uploaded to the SharePoint 2010 library. My requirement is to check that if there is any word (which is sensitive) and matches to my regexp should be blocked while adding the item or
-
Event viewer : The type initializer for 'advancedsetttings' threw an exception
I am recieving a " The type initializer for 'advancedsetttings' threw an exception" error when i try to view subscriptions in event viewer. The machine is a windows 2008r2 server. It was working before but just stoped working. I tried loging in as