Concatenate two rows
Hi,
I have a requirement where i check an table against a list of values in reference data.
I get two rows with just one column each as output every time and i need to concatenate the two rows into one field.
Is there any processor/combination that can be used to do this ?
I have tried concatenate / Merge and Data Merge processors without success.
Any direction is much appreciated.
Thank you,
Sid
Hi Mike,
Here is my target:
I have a CSV file with certain columns:
Column 1 and Column 2 hold some data i am interested in.
I use a reference data to compare column 2 to a list of 2 values. That returns me two rows - always.
Now i want to concatenate value in column 1 for those two rows and that will be my output.
I have nothing to group by and column 1 has completely different values in it.
Like:
C1 C2
This is string1 Value Matched with Ref Data1
This is string2 Value Matched with Ref Data2
Now am trying to do something that can give me "This is String1~This is String2"
Thanks,
Sid
Similar Messages
-
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 Concatenate two rows of same table
Hi Friends
I have table
No Name Id
1 Raju 6
2 Dhanshree 7
3 Shital 6
4 Priya 7
I want the query that should display
Raju Dhanshree.
Shital Priya
That Means whenever 6,7 number come the query should Concatenate The name colume1 150 IEEE TRANSA CTIONS ON MICR O W A V E THEOR Y AND TECHNIQ UES, V OL. 50, NO. 1, J ANU AR Y 2002
Times-Roman 4
2 A Miniaturized MMIC Analog Phase Shifter Using
Times-Roman 16
3 T w o Quarter-W a v e-Length T ransmission Lines
Times-Roman 16
4 Hitoshi Hayashi
Times-Roman 7
5 , Member , IEEE
Times-Italic 7
6 , T adao Nakaga w a
Times-Roman 7
7 , Member , IEEE
Times-Italic 7
8 , and Katsuhik o Araki
Times-Roman 7
9 Abstract—
Times-BoldItalic 6
10 This paper describes a miniaturized monolithic-mi-
Times-Bold 6
11 cr o w a v e integrated-cir cuit (MMIC) analog phase shifter using tw o
Times-Bold 6
12 quarter-wa v e-length transmission lines. A con v entional analog
Times-Bold 6
13 phase shifter employs an analog phase-shifter topology using a
Times-Bold 6
14 3-dB 90
Times-Bold 6
15 branch-line h ybrid r equiring f our quarter-wa v e-length
Times-Bold 6
16 transmission lines. Thus, in the f irst stage of our study , w e
Times-Bold 6
17 pr esent a new analog phase-shifter topology using only tw o
Times-Bold 6
18 quarter-wa v e-length transmission lines. The phase shifter her e
Times-Bold 6
19 has only one-half as many transmission lines as a con v entional
Times-Bold 6
20 analog phase shifter using a 3-dB 90
Times-Bold 6
21 branch-line h ybrid, and the
Times-Bold 6
22 cir cuit can be miniaturized to less than one-f ourth as compar ed to
Times-Bold 6
23 the con v entional analog phase shifter . Furthermor e, we sho w that
Times-Bold 6
24 the operating fr equency range of the phase shifter is v ery wide and
Times-Bold 6
25 can obtain lar ge phase v ariation with small capacitance v ariation.
Times-Bold 6
26 Next, an experimental
Times-Bold 6
27 -band MMIC analog phase shifter is
Times-Bold 6
28 pr esented. A phase shift of mor e than 180
Times-Bold 6
29 and an insertion loss
Times-Bold 6
30 of 3.6
Times-Bold 6
31 1.1 dB ar e obtained at the fr equency range fr om 12 to
Times-Bold 6
32 14 GHz. The chip size of the experimental MMIC phase shifter is
Times-Bold 6
33 less than 3.0 mm
Times-Bold 6
34
How will use on this data -
How to concatenate many rows to be one row?
Hi,
How can I do if I concatenate two rows or many rows become one row in the same column with different values (CHAR or VARCHAR2). It's possible to do that?
Ex:
Column A
ABCD
EFGH
to become
Column A
ABCDEFGH....
Anybody can help me, please...
I will very appreciated.
Thanks,
LenyI'm not sure if SQL Plus supports this feature. But programmatically it is possible if you use oracle procedure. Also if you're using some front end application (like VB, ASP etc) where you need the concatenated result then you can easily concatenate all rows under a loop on Recordset.
-
Concatenate multiple rows in a single column
Hi
I am using Web Intelligence v4.0x (i think) and I am hoping to get help.
My query (from Performance Management Module) has a field name called "Device Name" and it has two rows, server1 and server 2 (maximum of 33 servers)
I am trying to concatenate these values so that a blank cell in a report reads
"Devices are: server1, server2"
I am not able to concatenate server1 and server2 (i.e. get server1, server2) in the above statement. I've tried to use Previous(Self) and it does not work. I get output in two rows as
server1,
server2,
Any assistance or direction is appreciated.
Thanks - KevHi Jothi,
The solution that helped me earlier
"VAR1 =Replace(ReportFilter([Customer]);";";",")"
worked for one Customer ID that had two (or more) invoice# related to that Customer ID.
If there is more than one customer ID fetched by the query, the above solution merges all the related invoice# in that variable and does not merge invoice# per Customer ID.
E.g.
Customer ID Invoice ID
0001 P100
0001 P101
0002 P150
0002 P151
Desired Output
Customer ID Invoice ID
0001 P100, P101
0002 P150, P151
Actual Output: The query merges as:
Customer ID Invoice ID
0001 P100, P101, P150, P151
0002 P100, P101, P150, P151
and so on till the last customer ID is fetched.
Is it possible to tweak the query to obtain the Desired Output? Your help is appreciated.
Thanks - Kavan -
Trigger to concatenate two fields in a table
Hi
I am trying to concatenate two column in a table and add to the third column in the same table, all the columns are
numbers, I want to write a trigger which is after insert to do that..does anyone know how its done...
thanks a lot
JessicaHi, Jessica,
Welcome to the forum!
Do you really need to store this concatenation? The way you would get these results in a normalized database is to store the numbers separately, and comnbine them, when necessary, in queries and reports. You can use use a view to avoid repeating the same coiding over and over.
If you really want to store the value, use a BEFORE INSERT OR UPDATE trigger, like this:
CREATE OR REPLACE TRIGGER table_x_biu
BEFORE INSERT OR UPDATE
ON table_x
FOR EACH ROW
BEGIN
:NEW.column_3 := TO_CHAR (:NEW.column_1)
|| '-'
|| TO_CHAR (:NEW.column_2);
END;I'm confused by your exact requirements. Concatentaion can only be done to strings.
If column_1 and column_2 are NUMBERs, the trigger above will make string versions of those numbers, concatenate them together (with a hyphen between them), and put the results in the VARCHAR2 column column_3.
So after this statement:
INSERT INTO table_x (column_1, column_2, column_3)
VALUES (1, 2, '9-8');the new row will have column_3= '1-2'. (In this case, there is no point in explicitly setting column_3, because the trigger will always set the value based entirely on column_1 and column_2.)
If you need more help, post CREATE TABLE , INSERT and UPDATE statements, and who what you want the table to contain after each INSERT or UPDATE. -
How to create CSV data with a cell including two rows?
Hi guys,
i am creating CSV using "comma" as seperator for columns, "return" as seperator for rows.
But how can I create a cell which includes two rows?
I want to do following:
cell1 cell2 cell3
XXXXX YYYYY ZZZZZ
in cell2 YYYYY, there are two sub rows:
YLine1.1 YLine1.2 YLine1.3
YLine2.1 YLine2.2 YLine2.3
Which kind of seperator can I use for these sub rows?
so to say(XML mode):
<row>
<Col1>XXXXX</Col1 >
<Col2>
<row>
<col1>YLine1.1</col1>
<col1>YLine1.2</col1>
<col1>YLine1.3</col1>
</row>
<row>
<col1>YLine2.1</col1>
<col1>YLine2.2</col1>
<col1>YLine2.3</col1>
</row>
</Col2 >
<Col3>ZZZZZ</Col3 >
</row>
It is very kind of you to give me some hint!
Regards,
Liying
Message was edited by:
Liying Wang
Message was edited by:
Liying WangHi Wang Liying,
I tried with Excel. A Cell with 2 rows saved as CSV shows that the cells contents are enclosed in hyphens "b row 2 b" and the two rows ins one cell are separated with HEX 0A. This is a simple Line feed. The sequence to build this would be in ABAP
concatenate
<row1>
CL_ABAP_CHAR_UTILITIES=>NEWLINE
<row2>
into cell.
I did not take the time to try on system, but I tried to open with excel: It works with Windows.
Regards,
Clemens -
i need to sort desc order by date and need to take two rows only
id date
1 1/2/1994
2 2/2/2000
3 1/5/88
4 6/5/2006
i need out put like this
id date
4 6/5/2006
2 2/2/2000
plz give query with good perfomence thanksYou can use any one of the below query which performs better for you
SQL> with t
2 as
3 (
4 select 1 id,to_date('1/2/1994','dd/mm/yyyy') dt from dual
5 union all
6 select 2,to_date('2/2/2000','dd/mm/yyyy') from dual
7 union all
8 select 3,to_date('1/5/88','dd/mm/yyyy') from dual
9 union all
10 select 4,to_date('6/5/2006','dd/mm/yyyy') from dual
11 )
12 select * from
13 (
14 select * from t
15 order by 2 desc
16 )
17 where rownum <=2
18 /
ID DT
4 06-MAY-06
2 02-FEB-00
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=9 Card=2 Bytes=24)
1 0 COUNT (STOPKEY)
2 1 VIEW (Cost=9 Card=4 Bytes=48)
3 2 SORT (ORDER BY STOPKEY) (Cost=9 Card=4 Bytes=48)
4 3 VIEW (Cost=8 Card=4 Bytes=48)
5 4 UNION-ALL
6 5 FAST DUAL (Cost=2 Card=1)
7 5 FAST DUAL (Cost=2 Card=1)
8 5 FAST DUAL (Cost=2 Card=1)
9 5 FAST DUAL (Cost=2 Card=1)
Statistics
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
416 bytes sent via SQL*Net to client
496 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
2 rows processed
SQL> with t
2 as
3 (
4 select 1 id,to_date('1/2/1994','dd/mm/yyyy') dt from dual
5 union all
6 select 2,to_date('2/2/2000','dd/mm/yyyy') from dual
7 union all
8 select 3,to_date('1/5/88','dd/mm/yyyy') from dual
9 union all
10 select 4,to_date('6/5/2006','dd/mm/yyyy') from dual
11 )
12 select id,dt
13 from
14 (
15 select id,dt,row_number() over(order by dt desc) rn from t
16 order by 2 desc
17 )
18 where rn <=2
19 /
ID DT
4 06-MAY-06
2 02-FEB-00
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=8 Card=4 Bytes=100
1 0 VIEW (Cost=8 Card=4 Bytes=100)
2 1 WINDOW (SORT PUSHED RANK) (Cost=8 Card=4 Bytes=48)
3 2 VIEW (Cost=8 Card=4 Bytes=48)
4 3 UNION-ALL
5 4 FAST DUAL (Cost=2 Card=1)
6 4 FAST DUAL (Cost=2 Card=1)
7 4 FAST DUAL (Cost=2 Card=1)
8 4 FAST DUAL (Cost=2 Card=1)
Statistics
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
416 bytes sent via SQL*Net to client
496 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
2 rows processed -
Two rows as one display the data in one row
Hello All,
I would like to have data of two rows put in one as:
Lets say the data is like this:
SELECT * FROM TEST;
COL1 COL2 COL3 C
1.5 3 1 M
2 1 C
2.5 2 C
3.5 2 M
4.5 3 M How do i get the output as :
COL1 COL2 COL3 COL4 COL5
1.5 3 1 M 2
2.5 2 C 3.5
4.5 3 M If there are two rows with same value in Col3, then col5(a new dummy column in select stmt) the second row's col2 should be disaplyed in Row 1.
Can we do it in a Select Statement ?
Regds,
AmkotzA try :
SQL> select * from Amkotz;
COL1 COL2 COL3 C
1,5 3 1 M
2 1 C
2,5 2 C
3,5 2 M
4,5 3 M
SQL> select a.col1,
2 a.col2,
3 a.col3,
4 a.col4,
5 max(decode(a.rowid,b.rowid,null,b.col2)) keep (dense_rank last order by a.col1,a.col2) as col5
6 from (select Amkotz.*, row_number() over (partition by col3 order by col1,col2) rn from Amkotz) a, Amkotz b
7 where a.rn=1
8 and a.col3=b.col3
9 group by a.col1,
10 a.col2,
11 a.col3,
12 a.col4;
COL1 COL2 COL3 C COL5
1,5 3 1 M 2
2,5 2 C 3,5
4,5 3 M Nicolas. -
hi all
In alv report out put the field heading is too long.
So I want to disply the heading in two rows.
Like April 2006 prior month personal,
Is to be disply like in one row April 2006.
And in next row prior month personal.
Please send the reply as early as possible to [email protected]i think it is not possible like that , u can increase the length of that field in fieldcatalog
wa_fieldname-outputlen = '100'.
and in layout u can use
wa_layout-colwidth_optimize = 'X'. -
Concatenate multiple row values into single column value
Hello,
Can anyone please refresh my memory on how to concatenate multiple row values into a single column value.
In the following query, I will get multiple denial reasons per application and I would rather return all denial reasons on one line.
SELECT a.application_id, a.membership_number,
r.reason_text AS denial_reason,
a.appl_receipt_date AS application_receipt_date,
a.plan_request_1 AS application_plan_code,
a.adjudication_date AS application_denial_date
FROM application a, PLAN p, application_reason ar, reason r
WHERE a.plan_request_1 = p.plan_cd
AND a.application_id = ar.application_id
AND ar.reason_id = r.reason_id
AND a.adjudication_cd = 'D'
AND a.appl_receipt_date BETWEEN '01-jan-2006' AND '31-dec-2006'
AND p.plan_type_id = 12 and a.application_id = :appId
ORDER BY application_id
Any help is greatly appreciated.
Thanks,
-Christinefound the following
SELECT deptno,
LTRIM(MAX(SYS_CONNECT_BY_PATH(ename,','))
KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
FROM (SELECT deptno,
ename,
ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) AS curr,
ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) -1 AS prev
FROM emp)
GROUP BY deptno
CONNECT BY prev = PRIOR curr AND deptno = PRIOR deptno
START WITH curr = 1;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 ADAMS,FORD,JONES,SCOTT,SMITH
30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARD
3 rows selected.at http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php -
I have several bookmarks on my toolbar, and my most often used ended up in a pull-down menu, which is annoying. I tried to click and drag them onto the menu bar, because there was room for more icons, but they won't budge. Nothing under "Toolbars" was helpful. Help would tell me to right click on my toolbar and then click on "Customize"...which didn't come up as an option. I would really like all my toolbar bookmarks (I only have about 10) to be visible on the actual toolbar, not hidden away in a small pulldown tab.
There is a plug-in that enables you to put bookmarks in two rows on your toolbars, but it is not compatible with my version of FF (7.0.1).
App Tabs are cute, but I don't like them on top where they take up room where I have the tabs for various websites open (I usually have several open at a time). App Tabs are fixed and don't scroll over like website tabs, which is extremely annoying, and hence why I 1)would like to move them to the bottom of the toolbar or 2)be able to display all my bookmarked toolbars --which is what I prefer.
BTW, I have Windows 7.
Thanks in advance for your help.App tabs are special tabs and are always displayed at the left end of the tab bar.
You can place all bookmarks that you want to see on the Bookmarks Toolbar in the Bookmarks Toolbar folder.<br />
You can do that in the side bar or the Bookmarks manager if you can't do it on the Bookmarks Toolbar.<br />
Most Visited is a special (smart) folder that shows websites that you've visited and that aren't necessarily bookmarks, so you can't drag them on the bookmarks toolbar unless you first bookmark them. You can do that by opening them in a tab and clicking the star on the location bar twice and choose the Bookmarks Toolbar as the destination folder.
*https://support.mozilla.com/kb/how-do-i-use-bookmarks -
Merge Two Rows of a table to One row but into two columns
Hi
I Am struck in writing a query to merge two rows into two columns of one row.
Here is the Sample data i am working with,
Col 1 Col 2 Col3 Col4 Col Col6
5000 573-3000 2 0 Phone
5000 573-3036 1 0 Fax
5000 893-5703 3 0 WOrk
3000 232-5656 1 0 Phone
3000 353-5656 2 0 FAx
Here Col,Col3,Col4 form the Key.
now wht i am trying to do is to Merge these type of rows put them into Columns P,F,W,E respectively to achive a Structure as below
Col1 P F W
5000 573-3000 573-3036 893-5703
3000 232-5656 353-5656
Can you please help me how could i do this.
I am pretty ordinary at writing SQL's.
Thanks a Lot in Advance
Message was edited by:
SreebhushanSearch the forum for PIVOT and you'll find plenty of examples.
-
Add new row in table between two rows - OATableBean
Hi,
I have a requirement where I need to add a new row between two rows. Lets say I have a table with 5 rows. I am envisioning having an icon (table switcher) on the row #1, which when clicked will insert/create a new row between rows #1 and #2 like #1.5, something that can be achieved in core forms. In core forms, when we click the add button, it immediately creates a new row before the current row ( and pushes other rows down). Is that possible with OATableBean. Please let me know if you have any ideas.
Thanks,
Ravi.Hi,
I used following code to insert the row in the end
public void createNewRow()
XXEGASRLinesVOImpl vo =getXXEGASRLinesVO1();
Row row1 ;
int i;
Row row[] = vo.getAllRowsInRange();
row1 = vo.createRow(); //vo.createRowSet("10");
vo.insertRowAtRangeIndex(row.length,row1);//.insertRow();
row1.setNewRowState(Row.STATUS_INITIALIZED);
Check if it works for you, you have to modify it to meet your requirement.
Regards,
Reetesh Sharma -
I need to retrieve the a set of rows in between two rows from a table.
consider employees table and primary key employee_id.
With out using EMPLOYEE_ID column in the where clause or between clause, I need to get the records between 104 and 116 or a set of records between two rows.
Can any one help me in this... i know this is simple but am just a fresher to oracle development... help me grow....
Thanks,
Arunya at last i got the out put... thank guys for thinking with me....
SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id)
WHERE ROWNUM <=8
MINUS
SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id) WHERE ROWNUM <= 4
Maybe you are looking for
-
i imported a large file of photos from my computer to my iphone by accident. how can i remove them all??
-
HT201343 can i update late 2007 imac to run apple tv?
I have late 2007 Imac running osx 10.6.8. I would like to run apple Tv. How can I do that? Do I need to upgrade to the new Mountain Lion? Thanks
-
Dual Core, but just one recognized [SOLVED]
In the last days I had problems with my computer just going off randomly after some time... As I found out the CPU fan was too loose... Now I somehow fastened it so it seems to work normally now. Today I noticed (I'm not sure whether it's now the fir
-
Hi, I have installed TimesTen 6.0.1 and created Server/Client DSN's and trying to connect from a simple Java File using Client DSN, but encounter the following error. What could be the reason java.sql.SQLException: [TimesTen][TimesTen 6.0.1 ODBC Driv
-
Iphoto glitch with retained masters
Mavericks 10.9.4 iphoto 9.5.1 I am currently having a mysteriously bulky iphoto even after deleting most my photos. How can I delete the masters of iPhoto without losing my photos in the main iPhoto display library and all their masters and edits. I