Concatenate two rows
Hello
I have a requirement where to check a table with a list of values in reference data.
I get two rows with a column for each output that every time and I need to concatenate the two rows in a field.
Is there any combination/processor that can be used to do this?
I tried concatenate / merge and merge data from processors without success.
Any direction is much appreciated.
Thank you
SID
It is not clear what criteria do you use to determine which records to eat together. The research is not relevant?
If it's all the records that spent searching you need to eat, it's simple, you can just add a grouping key (for example to add string to a value of 1 attribute), and then group and merge, creating a merged with output value ' delimited list by a "which is used to create the string.
Tags: Fusion Middleware
Similar Questions
-
trigger to concatenate two fields in a table
Hello
I'm trying to concatenate two columns in a table and add to the third column in the same table, all the columns are
numbers, I want to write a trigger that is after insertion to do this... does anyone know how its done...
Thank you very much
JessicaHi, Jessica,.
Welcome to the forum!
Do you really need to store this concatenation? How you get these results in a normalized database is to store the numbers separately and comnbine them, when necessary, in the queries and reports. You can use a view to avoid repeating the same coiding over and over again.
If you really want to store the value, use a trigger INSERT or UPDATE BEFORE , 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 about your specific needs. Concatentaion is possible for strings.
If colonne_1 and column_2 are numbers, the trigger above will make string versions of these numbers, concatenate them (with a hyphen between them), and put the results in the column VARCHAR2 column_3.
So after this statement:INSERT INTO table_x (column_1, column_2, column_3) VALUES (1, 2, '9-8');
the new line will have column_3 = 1-2» (In this case, there is no point in explicitly implemented column_3, because the shutter always sets the value based entirely on colonne_1 and column_2.)
If you need more information, post CREATE TABLE, INSERT and UPDATE statements and that you want the table to contain after each INSERT or UPDATE.
-
I have several bookmarks in my toolbar, and my most often used found in a drop down menu, which is annoying. I have tried to click and drag on the menu bar, there was room for more icons, but they didn't budge. Anything under the "toolbar" has been helpful. Help tell me do right click on my toolbar and then click on 'Customize'... which did not come as an option. I would like to really all my favorites toolbar (I have about 10) or real on the toolbar visible, not hidden in a small dropdown tab menu.
There is a plug-in that allows 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 place where I have the legs for various open websites (I usually opened several at once). App Tabs are fixed and do not move as site tabs, which is extremely annoying and so why I 1) want to move to the bottom of the toolbar or 2) be able to view all my bookmarks toolbars - which is what I prefer.
BTW, I have Windows 7.
Thanks in advance for your help.App tabs are special tablets and are always displayed at the left end of the tab bar.
You can place all the bookmarks that you want to see the toolbar of bookmarks in the bookmarks toolbar folder.
You can do this in the sidebar or the Manager of bookmarks if you can't do it on the bookmarks toolbar.
Most visited is a special file (smart) which shows the websites that you have visited and are not necessarily Favorites, so you can not drag on the personal bar unless you first to bookmark the. You can make it open in a tab by clicking on Star on location bar twice and choose the toolbar of bookmarks as destination folder. -
HP Laserjet P1102: Two rows of black dots on every print
I recently removed the seals and tested a few impressions, but each of them contains two rows of black dots on the left side (a line more fat and other points more small rank). I did the cleaning print but no use. Here are some pictures of the question. I can print any document, but the points are the problem. I run on the genuine laser HP cartridge by default. Also, the points are spaced the same way. Any help would be appreciated...
No! The load inside the cartridge is bad
-
Mr President.
My worm jdev is 12.2.1
How to enter two rows at the same time with different default values that only the first line to use see?
Suppose I have a table with four fields as below
"DEBIT" VARCHAR2(7) , "DRNAME" VARCHAR2(50), "CREDIT" VARCHAR2(7) , "CRNAME" VARCHAR2(50),
Now I want that when I click on a button (create an insert) to create the first line with the default values below
So if I click on the button and then validate the second row with different values is also inserted on commit.
The value of the second row are like the picture below
But the second row should be invisible. It could be achieved by adding vc in the vo.
The difficult part in my question is therefore, to add the second row with the new default values.
Because I already added default values in the first row.
Now how to add second time default values.
Concerning
Mr President
I change the code given by expensive Sameh Nassar and get my results.
Thanks once again dear Sameh Nassar .
My code to get my goal is
First line of code is
protected void doDML(int operation, TransactionEvent e) { if(operation != DML_DELETE) { setAmount(getPurqty().multiply(getUnitpurprice())); } if (operation == DML_INSERT ) { System.out.println("I am in Insert with vid= " + getVid()); insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE", (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); } if(operation == DML_UPDATE) { System.out.println("I am in Update with vid= " + getVid()); updateSecondRowInDatabase(getVid(), (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); } super.doDML(operation, e); } private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5) { PreparedStatement stat = null; try { String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " + "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')"; stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } } private void updateSecondRowInDatabase(Object value1, Object value5) { PreparedStatement stat = null; try { String sql = "update vdet set AMOUNT='"+ value5+"' where VID='" + value1 + "'"; stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } }
Second line code is inside a bean method
public void addNewPurchaseVoucher(ActionEvent actionEvent) { // Add event code here... BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator"); RowSetIterator rsi = dciter.getRowSetIterator(); Row lastRow = rsi.last(); int lastRowIndex = rsi.getRangeIndexOf(lastRow); Row newRow = rsi.createRow(); newRow.setNewRowState(Row.STATUS_NEW); rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow); rsi.setCurrentRow(newRow); BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator"); RowSetIterator rsi1 = dciter1.getRowSetIterator(); Row lastRow1 = rsi1.last(); int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1); Row newRow1 = rsi1.createRow(); newRow1.setNewRowState(Row.STATUS_NEW); rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1); rsi1.setCurrentRow(newRow1); }
And final saveUpdate method is
public void saveUpdateButton(ActionEvent actionEvent) { // Add event code here... BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry(); OperationBinding commit = bindingsBC.getOperationBinding("Commit"); commit.execute(); OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit"); operationBinding.execute(); DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef. iter.getViewObject().executeQuery(); }
Thanks for all the cooperation to obtain the desired results.
Concerning
-
Difference between two rows in a table.
Hi all
I have a requirement where I need to calculate the difference of a column, but the values are in two rows.
Its exactly like that, I'll have a table where I have stored incidents with their status and their modification dates
example:
Incident_Id: Status: Modified_Date (in seconds from a specific date)
1: 1: 9080890
1: 2: 9080999
1: 3: 9081900
2: 1: 10000900
2: 2: 10001000
2: 3: 10002000
Now there I show the time spent by each incident in each State.
That is to say for the State 1 I need the difference between the date of change of condition 2 and updated the date of status 1 Similarly
2 necessary status the difference between the date of change of condition 3 and updated the status date 2 and so on.
the real result, I need is like that
Incident_Id: Status: Timespent
1: 1: (modified_date (status2) - modified_date (status1))
Please help me to write the query to do this.
Kind regards
TauceefCan we assume that the lines are classified according TO the event status ?
This (i.e. an Ordering) is necessary in order to systematically identify consecutive lines.Please try the analytical function LAG and less to the current value.
-
Remove ' / ' with a value of feld to create two rows
I have a table with a structure like
CREATE TABLE TEST
(
MOLDCODE VARCHAR2 (20 BYTE) NOT NULL ACTIVATE.
PRODCODE VARCHAR2 (255 BYTE),
DIAMCONTAINER NUMBER (4.1).
SEGMENT NUMBER (2.0)
)
And it contains data such as
MOLDCODE PRODCODE DIAMCONTAINER SEGMENT
ADE16920-1 CJ02A/SD51A 96 10
ADE20206 CT25A 95 8
ADE16912-1 DG31A 57 10
ADE16913 AS30A/DE28A 96 10
ADE17845 CJ24A/SD36A 96 10
I want to create another table saw which will remove / of prodcode and he will separate the values and forms two rows with the same values for the other fields.
for example.
Source: -.
MOLDCODE PRODCODE DIAMCONTAINER SEGMENT
ADE16920-1 CJ02A/SD51A 96 10
ADE16913 AS30A/DE28A 96 10
Purpose: -.
MOLDCODE PRODCODE DIAMCONTAINER SEGMENT
ADE16920-1 96 10 CJ02A
ADE16920-1 96 10 SD51A
ADE16913 AS30A 96 10
ADE16913 DE28A 96 10
Is it possible?
Need help for the same thing.Check this box:
SELECT moldcode, REGEXP_SUBSTR (procode, '[^/]+', 1, LEVEL) procode, diamcontainer, segment FROM t CONNECT BY LEVEL <= REGEXP_COUNT (procode, '/') + 1 AND moldcode = PRIOR moldcode AND PRIOR SYS_GUID () IS NOT NULL;
See you soon,.
Manik. -
Compare two rows in the same table
Hi all
I need to compare two rows in the same table, I don't know hoe to do it in pl/sql. Please help me on this.
example:
price of ro TR
xya0001 AMA.7 12
xya0003 ama6 14
xya0004 AMA.7 16
in table b is a unique value for each line, I need to compare the price column and see if the first value is less than or greater than the following value and, if there is more to put the corresponding value of br to a variable, and if it is less, put the corresponding value of the br to another variable. I don't know a method to do this, as I'm new to pl/sql. Please help me in thisfor data in(select tr,br,price, lag(price) over ( order by tr) newcol from yourtable) loop if nvl(data.newcol,0) > data.price then variable1:=data.br; else varable2:=data.br; end if; end loop;
-
SQL to communicate with two rows in one record
I have a source table that includes data in the following format.
CON_ADDR_ID TIME_CONFIGURATION START_TM END_TM
1 GU-798 Tuesday 1/1/1980 08:00 1980-01-01 17:00
1 GU-798 Thursday 1/1/1980 07:00 01/01/1980 16:00
I need to concatenate fields time_configuration, start_tm, end_tm for con_addr even
For example, for the light of the foregoing, the output should be * & you = 480, 1020 & th = 480, 1020 *.
Logic: -.
1 convert the time in minutes
Min start time = 8 h = 480 min
End time in minutes = 17 h = 1020 mins
Beginning in minutes hour = 7 h = 420 min
Time in minutes to end = 16 h = 960 minutes
2 concatenate 2 rows and 3 columns.
& < Start the day in format MM > = < start in a few minutes time >, < time in minutes left > & < start the day in format MM > = < start in a few minutes time >, < time in minutes to go >user10566312 wrote:
I have a source table that includes data in the following format.
CON_ADDR_ID TIME_CONFIGURATION START_TM END_TM
1 GU-798 Tuesday 1/1/1980 08:00 1980-01-01 17:00
1 GU-798 Thursday 1/1/1980 07:00 01/01/1980 16:00I need to concatenate fields time_configuration, start_tm, end_tm for con_addr even
For example, for the light of the foregoing, the output should be * & you = 480, 1020 & th = 480, 1020 *.
Logic: -.
1 convert the time in minutes
Min start time = 8 h = 480 min
End time in minutes = 17 h = 1020 mins
Beginning in minutes hour = 7 h = 420 min
Time in minutes to end = 16 h = 960 minutes2 concatenate 2 rows and 3 columns.
&= , & = , According to your logic, shouldn't be out & you = 480, 1020 * & th = 420 960 *?
Can be:
SQL> ed Wrote file afiedt.buf 1 with sample_data 2 as (select '1-GU-798' 3 con_addr_id, 4 'Tuesday' 5 start_day, 6 to_date('1/1/1980 8:00:00 AM', 'DD/MM/YYYY HH12:MI:SS AM') 7 start_tm, 8 to_date('1/1/1980 5:00:00 PM', 'DD/MM/YYYY HH12:MI:SS AM') 9 end_tm 10 from dual 11 union all 12 select '1-GU-798', 13 'Thursday', 14 to_date('1/1/1980 7:00:00 AM', 'DD/MM/YYYY HH12:MI:SS AM'), 15 to_date('1/1/1980 4:00:00 PM', 'DD/MM/YYYY HH12:MI:SS AM') 16 from dual) 17 select listagg(tm, ' ') within group(order by con_addr_id) val, 18 min(con_addr_id) con_addr_id 19 from (select con_addr_id, 20 '&' 21 ||substr(start_day, 1, 2) 22 ||'=' 23 ||( ( start_tm - trunc(start_tm) ) * 24 * 60 ) 24 ||',' 25 ||( ( end_tm - trunc(end_tm) ) * 24 * 60 ) tm 26 from sample_data) 27* group by con_addr_id SQL> / VAL CON_ADDR ------------------------------ -------- &Th=420,960 &Tu=480,1020 1-GU-798
-
Table has two rows it returns two rows. I need to have a single folderselect BOND_SCHED_ID,bond_id,earnings_proceeds,max(s.effective_date) as effective_date from XXDL.xxdl_cd_bond_schedk_p2b s Group by BOND_SCHED_ID,bond_id,earnings_proceeds
What is the best application I can writeActual 10020 7 200 01-FEB-11 10000 7 100 01-JAN-11 Expected 10020 7 200 01-FEB-11
893185 wrote:
Table has two rows it returns two rows. I need to have a single folder
According to what criteria? I'll assume last effective_date for the connection id. If so:
select bond_sched_id, bond_id, effective_date from ( select s.*, row_number() over(partition by bond_id order by effective_date desc) rn from XXDL.xxdl_cd_bond_schedk_p2b s ) where rn = 1 /
SY.
-
concatenate two columns in OFA
Dear friends,
I have a Page OFA developed with advanced table, I want to concatenate two first
columns. is it possible that I can achieve this?
Note: I use a trigger without entity object (VO after search)
Please, share your ideas.
Thanks in advance,
Keerthi.kHAD,
In advance table region how do i select the newly created column , i mean concatenated column. I think in property inspector it will ask for " select view attribute " .
Suppose your new query is something like
Select Attribute1 | Attribut2 AS Concat from table_name.For this column, you must select Concat in ' select view attribute.
Kind regards
GYAN -
two rows of back with a single column with just one place
Hello all;
Published by: user13328581 on March 22, 2011 11:52I have a query that returns two rows similar to this below ID PLACE PROGRAM A NEWYORK PROGRAM A A NEWYORK PROGRAM B I would like this instead ID PLACE PROGRAM A NEWYORK PROGRAM A PROGRAM B All help is appreciated. Thank you.
user13328581 wrote:
WOW... Thanks a lot for Salomon, I never used the partitions and row_number in such a way... can you please explain your logic.Ensure that:
ROW_NUMBER() over (partition by order of identification by location, program)
This operation can take all the rows returned by the query andsplit them in compartments (sheet music) by id. Inside each bucket it order lines by program and place and assign line numbers. So for each row of the ID number 1 will be stored with (in alphabetical order) first place the first programt. And this is the line where we want to ID is displayed. That's why we wrap the analytical function that precedes in the CASE statement that will do just that. Now:
ROW_NUMBER() over (partition by id, order by program)
pretty much the same just bucket is a combination ID / PLACE. So for each combination of it, we want to show that for the first (in alphabetical order) programt.
Now notice in the ORDER BY clause I prefix ID and PLACE with the table alias. You do it because otherwise the query alias ID and PLACE will have priority resulting in the incorrect sort order (remember that we cancelled all ID and PLACE with the exception of the number of line 1).
SY.
-
PivotTable with header in two rows
Hello
is it possible to split a large pivot table to the narrower PivotTable with two heads?
I need to achieve this result: [http://img30.imageshack.us/img30/2339/oraclebipivotmultiplehe.jpg]
Column with total didn't need to be formatted as it is on the screenshot. But for me it is important to split a long pivot table two rows header...
Thank youI have the solution. I have transformed an original table with clean function js and jQuery
function transformPivotTable (tableId) {}
var $tables = $("#" + tableId + "table.) Pivot table");
If ($tables.length == 1 & $tables.attr("id").substr (0.3) == 'vu') {}
var $table = $tables;
var $headings1 = $table.find ("tr:eq (0) td:lt (11)");
var $headings2 = $table.find ("tr:eq (0) td:gt (10)");
var $values1 = $table.find ("tr:eq (1) td:lt (11)");
var $values2 = $table.find ("tr:eq (1) td:gt (10)");
$table.find ("tr:eq (0)") .html ($headings1);
$table.find ("tr:eq (1)") .html ($values1);
var $newrowHeadings = $(')") .addClass ("PTRowLabelsRow");
var $newrowValues = $(')");
$newrowHeadings.html ($headings2);
$newrowValues.html ($values2);
$table.append ($newrowHeadings);
$table.append ($newrowValues);
}
}This function can be performed by button or after the page loads:
transformPivotTable('d\\:dashboard\\~p\\:0fbi1pfhhtepur3d\\~s\\:vpjrrqes9j4sbo2kContents');
' d\\:dashboard\\ ~ p\\:0fbi1pfhhtepur3d\\ ~ s\\:vpjrrqes9j4sbo2kContents' is ID to lock up the HTML table with escape characters. It was the final table with ID fixed. Other nested tables had dynamic IDs, so I had to go with fixed ID and my PivotTable to search for the attribute class.
-
Using Sections to tie together the two rows
I use the ability of the section to bring together two rows. I have a button that will duplicate the section. On the screen shows perfectly. However, when you save the file, open it back up it does not keep these articles. It groups them into one. Look at this example:
TABLE 1
RANK 1: Item1, item2 - line 1 & 2 are the group as section
2nd ROW: Item1, item2
User, press the Add button:
Table 1
1st ROW: Item1, item2 - so when the user presses the Add button it duplicates the section to add more than two lines in order
Row2: item 1, item2
ROW3: 1 item, item2
ROW4: item 1, item2
The moment user saves the form and exit...
The user lanuches drive and opens the form. they see the result to follow...
ROW1: Item1, item2
ROW3: Item1, item2
Row2: Item1, item2
ROW4: Item1, item2
I need the section to stay together... Any suggestions of what can be done?
Concerning
Uncheck the box for "repeat row for each data item" tab Bidning Row2, and Row3 inside the Section.
You actually create a new instance of the section (including Row2, and Row3). If this check box must be checked in the Section levl not at the level of the line. You have already checked the property Section so remove from the ranks 2 and Row3.
Thank you
Srini
-
Concatenate comparing two rows
Hi all
I have 2 columns in my table;
Col1 Col2
A V
A C
B X
C Y
C Z
I want the result form:
Col1 Col2
A V: C
B X
C Y:Z
If the two lines are identical (say A) then values responsive concate in Col2(i.e..) V:C for A)
Thank youOr 11 GR 2:
SQL> with data as ( select 'A' A, 'V' B from dual union all select 'A', 'C' from dual union all select 'B', 'X' from dual union all select 'C', 'Y' from dual union all select 'C', 'Z' from dual ) -- -- select a, listagg(b, ':') within group (order by rownum) b from data group by a / A B - -------------------- A V:C B X C Y:Z 3 rows selected.
Maybe you are looking for
-
Want just the other themes, the cool ones, please. Is this possible?
-
How can I make maximized window the default size
I have a notebook file which amounts to about half the size of the full window, enlarged. I tried "stretching" to the maximum and then close the file. However, it does not. How can I do optimize by default when I open it?
-
Title: cannot open Add/Remove programs in the control panel When I try to open Add/Remove programs in the Control Panel, I get a message that it can not be found. What should I do to repair this?
-
Vista Ultimate Menu/upper toolbar on the desktop
I use to have a menu bar at the top of my office who had a 'Music Office button button, button of security and Recycle Bin Button'. I ran the program Microsoft Fix It and the Menu bar disappeared and I can't seem to make it back. How can I return m
-
Looking for Admin settings and preferably the user to install new 8.3 Primavera
Hi allThis is my first foray in MOSC (unless I forgot a precedent... )Our current P6 8.3 was born of several years of updates/upgrades since the time of P3. We found the opportunity to meet our preferences user and admin and it made us want to compa