HOWTO updating table after closing a popup
With the help of JDev 11.1.1.3I have a table and a popup. The table is filled with chronogram a datacontrol.
The popup has a form indicating the details of the selected record in the table. I also use this popup to create new records.
I have problems when you press the 'OK' button in the dialog box. The record is saved in the database, a commit is executed but my table does not show the new record. I need to press F5 before recording.
I tried to set a partialTrigger at the table of the popup, but it does not work.
This is the dialogEvent code:
public void enqueteListener(oracle.adf.view.rich.event.DialogEvent dialogEvent) {
if(dialogEvent.getOutcome() != DialogEvent.Outcome.no) {
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
operationBinding.execute();
operationBinding = bindings.getOperationBinding("Execute");
operationBinding.execute();
}
else {
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("Rollback");
operationBinding.execute();
}
}
As you can see that the commit is executed and after that I run the Execute to refresh the table, but it doesn't seem to work...How can I get that I have is more useless to press F5 if the record show upward directly in the table after click on the OK button in the pop-up?
You add partial trigger to the table in your code. If your table is related to an attribute in the bean you can add
RequestContext.getCurrentInstance().addPartialTarget(getTable());
where getTable() returns the component "richeTableau". If you do not link the table to the bean, you can search the tree of components for the id of the table to get the part.
Timo
Tags: Java
Similar Questions
-
Refresh the Parent page after closing the popup
Hello
I open the pop for that insert data and then I want to see the page parent page refresh after closing of pop either perform cancel or closing popup using X.
try like this
< af:commandLink text = ' #{rank. " DEPTNO}"id ="cl1"partialSubmit ="true"returnListener =" #{backingBeanScope.backing_DeptDBFace.backFromPopup} "> "" < af:showPopupBehavior popupId = ': p1 ' triggerType = 'action' / > < af:returnActionListener value = "10" / > < / af:commandLink > When this method ({. backing_DeptDBFace.backFromPopup}) contains the PON - Stmts which are not executed after the closure of the pop-up window
Thank you
Venaktn
Hello
Try to use the popupCanceledListener. (af:popup)
This event will happen only when you click the X or cancel the popup.
Kind regards
Ruben
-
Firefox claims she is already underway and will let me start a new session after closing of
I had this problem intermittently on my Dell XPS 8000 and my laptop HP nx7400. Dell runs the latest version of Windows 7 Pro and HP running XP Pro (fully updated). After closing a session of Firefox and other applications running, Firefox won't let me open another session, saying that "Firefox is already running... Please close the session... "This is not an exact quote, but you get the idea. CTRL-ALT-DEL and all other conventional means do not work and I have to reboot the system. It is a royal pain... and I need a pain relief! Any suggestions? I can go back to an earlier version of Firefox until I see a solution... is not bad, but I really like 4.0, and I do not look back in the 'progress '.
Thank you.
Tom
Looks like it is suspended when you quit, and then later try to restart Firefox.
- How to stop the currently running Firefox process
- In the Task Manager, firefox.exe will appear in the processes tab
- How to stop the currently running Firefox process
- See: http://kb.mozillazine.org/Kill_application
- Windows 7 users: http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576
- What can cause the hang out of Firefox
- The Windows 7 Task Manager: http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576
- http://support.Mozilla.com/en-us/KB/Firefox+hangs
- http://KB.mozillazine.org/Firefox_hangs
- https://support.Mozilla.com/en-us/KB/Firefox+is+already+running+but+is+not+responding
- You may need to try the Mode without failure of Firefox
- You may need to use Safe Mode to locate the problem:
- See: http://kb.mozillazine.org/Safe_Mode
- Users of Firefox 4, hold the SHIFT key while clicking on the icon of the desktop Firefox 4 to enter Safe Mode.
- Firefox Safe mode is a diagnostic mode that disables Extensions and some other features of Firefox.
- In Firefox 4, Safe Mode also disables Plugins and hardware acceleration.
- If you are using a theme, place you in the DEFAULT theme: Tools > Modules > Themes before start Safe Mode (in Firefox 4, tools > Modules > appearance). See: http://support.mozilla.com/en-US/kb/Using%20themes%20with%20Firefox#w_managing-themes-and-personas
- When you enter Safe Mode, do not check all the items in the window, just click "continue mode without failure."
- A test to see if the problem you are experiencing is fixed.
- If the problem does not occur in mode without failure then disable all your Extensions and Plug-ins, and then try to find the cause
- by activating one at a time until the problem reappears.
- You can also activate a little at a time (3-5), followed by what just you re-enabled to see if the problem occurs again. This will help narrow down the possibilities if you have a large number of Add-ons.
- You MUST close and restart Firefox after EACH change via file > restart Firefox (on Mac: Firefox > Quit).
- You can use "Disable all add-ons" on the start window Mode without failure.
- See below for more information
- You may need to use Safe Mode to locate the problem:
- Next-generation Java plug-in 1.6.0_24 for Mozilla browsers
- Check your plugin versions on one of the following links:
- http://www.Mozilla.com/en-us/pluginCheck/
- https://www-trunk.stage.Mozilla.com/en-us/pluginCheck/
- Note: plugin check page lacks information about all versions of the plugin
- There are links to tests specific plugin available on this page:
- Update the Java plugin to the latest version.
- Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java platform: download JRE)
- Don't forget to uncheck the toolbar Yahoo option during installation if you do not want to install.
- Don't forget to uncheck the toolbar Yahoo option during installation if you do not want to install.
- See also "Manual Update" in this article for update from the Java Control Panel in Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
- Removal of older versions (if required): http://www.java.com/en/download/faq/remove_olderversions.xml
- Remove several extensions of Console Java (if necessary): _ http://kb.mozillazine.org/Firefox: _FAQs_:_Install_Java #Multiple_Java_Console_extensions
- Java test: http://www.java.com/en/download/help/testvm.xml
- Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java platform: download JRE)
-
region of refresh on the page parent after closing popup inframe
Hello
I have parent page with several regions, and one of the reports is related popup to another page using inframe. All these are works fine but now iam trying to a parent region partially regenerate after closing the window contextual inframe, I tried apex.submit (region1) but it does not work? no idea how can I update this after the closure of the window popup?
Best regards and thank you
Hi Gor_Mahia,
Gor_Mahia wrote:
Here are the details,
application ID = 46268
page ID = 13
demo123/demo123
proj2010 = workspace
Use the links in the second column IR
Once again thanks for your time.
Check your application now. The interactive report is refreshing on the closure of the modal dialog box using the method of dynamic, such action described in the blog post:
Monkey on Oracle: Modal popup with dynamic Actions
Here are the changes:
- Edited your action dynamic and value:
In the section "Advanced":
Scope of the event: Dynamics
In 'true Actions:
Action edited your "run the Javascript Code" and "Code" to modified:
From:
/* prevent default behavior on click */ var e = this.browserEvent; e.preventDefault(); /* Trigger JQuery UI dialog */ var horizontalPadding = 30; var verticalPadding = 30; $('').dialog({ title: "Edit Employee", autoOpen: true, width: 700, height: 300, modal: true, close: function(event, ui) { apex.event.trigger('#P13_AFTER_MODAL','select',''); $(this).remove(); apex.submit('edit-IR'); }, overlay: { opacity: 1.0, background: "black"} }).width(700 - horizontalPadding).height(300 - verticalPadding); return false;
NOTE: remove the apex.submit call in the function close to the code below so that it submits the page.
TO
/* prevent default behavior on click */ var e = this.browserEvent; e.preventDefault(); /* Trigger JQuery UI dialog */ var horizontalPadding = 30; var verticalPadding = 30; $('').dialog({ title: "Edit Employee", autoOpen: true, width: 700, height: 300, modal: true, close: function(event, ui) { apex.event.trigger('#P13_AFTER_MODAL','select',''); $(this).remove(); }, overlay: { opacity: 1.0, background: "black"} }).width(700 - horizontalPadding).height(300 - verticalPadding); return false;
I hope this helps!
Kind regards
Kiran
-
Update of table after SELECT COLLECT in BULK IN
Hello
I have the following query
SELECT TYPE(A, B, C, D) BULK COLLECT INTO ARRAY_TYPE_VAR FROM table WHERE ROWNUM <= number;
And after execution of this I need to update the selected lines to mark as processed.
UPDATE table SET is_proc = 'Y' WHERE ...
-I want to just select a predefined number of lines (ROWNUM < = number)
-Selected data comes from an intermediate table that I can't control and there is no PKs.
Is it possible that I can use to identify the selected lines and use them in an UPDATE statement?
Thank you
Hugo
I need to select the data to perform certain operations and validations and insert in the paintings of application.
Since I have a large number of files, I found myself with performance while loading problems all in memory.
I am trying to create a kind of limiting process:
Until I have 0 not dealt with the lines:
Select lines of high x-> perform data operations-> lines of the selected mark as processed
The sql code I posted is inside a loop.
I'm probably complicate an easy problem, but I'm kinda stuck with it.
And Yes, there is a column that can be used to identify the data.
There is NO NEED to 'Butterfly' lines of process or as treated brand.
Assuming that you need to use the collections and PL/SQL just treat ALL lines but only a limited number at the time.
Some examples of code (ONLY for the demonstration) which deals with the entire EMP table a few lines at a time:
EXTRACTION is a BULK of COLLECTING all the data in "v". It will get either all data, or none if there is none.
The construction of the LOOP would be used when you have a LIMIT clause while Oracle would be 'loop' return to
Download the following set of lines. Run this example in the SCOTT schema and you will see how the LIMIT clause.
I have 14 rows in my table EMP.DECLARE
CURSOR c1 IS (SELECT * FROM emp);
TYPE typ_tbl IS TABLE c1% rowtype;
v typ_tbl;
BEGIN
OPEN c1;
LOOP --Loop added
C1 FETCH BULK COLLECT IN v LIMIT 3; -treat 3 records at a time
-treat the first 3 max records
DBMS_OUTPUT. Put_line ('Treatment' | v.COUNT |) "documents.");
I'm IN v.first... v.Last LOOP
DBMS_OUTPUT. Put_line (v (i) .empno);
END LOOP;
OUTPUT WHEN c1% NOTFOUND;
END LOOP;
DBMS_OUTPUT. Put_line ('all done');
END;In the loop, you would do any processing of the nested table, you want to make
and could use a FORALL do one INSERT into another table. -
Change the value in the table after update
Hi all
I want to update a certain column (column date) after update is made. I can do this using "before the update" trigger. But I'm getting a few problems of transaction when the trigger is written as before the update (error on the side of java, saying data has been modified outside of the transaction). So I was wondering if there is another way to do the same, if I change data after the update takes place. I searched the net and found "can not change the NEW values for this after the update trigger type". Someone knows how to do this?
Thanks in advance!Why not use plsql as sybrand said.
javacall procedure, switch to the folder
procedure does 2 things
1 updates table with file
2. If succesfull update, make your second update.PLSQL is there for this kind of thing
-
Hi people,
I looked through many messages about refreshing the page, but still did not solve my problem. Please help me. It's quite URGENT.
I have a table with a command button. After you click the data insertion is engaged and the table is supposed to be updated to reflect the changes.
Now I use PPR as my solution: the button is the initiator and the table is the target. I put the button property: part delivery = true and its id as a partial release of the table value
What I missed, please?
Note: reloading of the entire page is not a solution for me. (The table is incorporated within a region of showOneTab and there are other tables in different tabs)
Thanks in advance!Assuming that nothing wrong with the JavaScript syntax, the explanation might be: If you ActionListener Installer (data transaction method) and javaScript on a button-click the button, the button click javaScript will not be executed. (???)This is not the case. In my application, the two actions of script and java onclick button are executed. Javascript onclick fires first, then the action of the button. It should be the same for actionlistener as well.
Regarding the updating of the table after a click of a button inside the table, you can do this by forcing the partial relaxation of the table of a bean to support using addPartialTarget.
On the actionListener to the button call the below the backup method of bean.
Here is the code example:
public void btnSample_actionListener(ActionEvent actionEvent) { // First execute the method on the button BindingContainer bindings = getBindings(); OperationBinding operationBinding = bindings.getOperationBinding("buttonMethod"); Object result = operationBinding.execute(); //Refresh the iterator of table and partial trigger the table OperationBinding operationBindingTab = bindings.getOperationBinding("RefreshTable"); Object resultTab = operationBindingTab.execute(); AdfFacesContext.getCurrentInstance().addPartialTarget(myTable);
RefreshTable is an action that runs the Execute method on the table iterator.
Thank you
Mitesh. -
Error after closing Firefox window!
Hello
After closing Firefox, an error window appears. And after closing this window appears a smaller.
Please help me.
Best wishes
NickWhat are the mistakes you are seen to appear?
Try to start Firefox in safe mode. This mode disables all extensions, customizations, hardware acceleration, etc., temporarily for the diagnosis and troubleshooting. If Firefox works fine in Safe Mode, then it is probably a problem with the add-on. Restart Firefox in normal mode, and then type "subject: addons" (without the quotes) in the address bar. Disable your extensions, restart Firefox between each one, until you find the troublemaker. Once you do, you can turn off this add-on and report the problem to the developer of this - on Add.
A few other basic problems you can try things is the following:
Run all Windows updates, install all required service packs, etc.Updating your graphics driver (Firefox uses the graphics card for rendering and an outdated graphics card driver can cause problems. https://support.mozilla.org/en-US/kb/how-do-i-upgrade-my-graphics-drivers.
Update all of your plugins (Flash, Java, etc.): http://www.mozilla.org/plugincheck/.
Download and install MalwareBytes Anti-Malware, run a full scan. http://www.malwarebytes.org/. This check allows that there is no virus on your computer, causing problems. You can uninstall this program after having cleaned the infections.
-
Update table of contents (frame) in the primary anchor text stream?
I understand that a table of contents of InDesign should sit on its own page or in a separate text frame, so it can be easily maintained and updated.
Help of InDesign said: "avoid threading the TOC to other blocks of text frame in the document. If you replace the existing table of contents, the whole story will be replaced by the update table of contents. »
Fine and understand. However, I'm working on a project where I need all the content (from the illustration of the cover of the last line) to sit in the primary sequences of the spread of master - including the table of contents.
Here's what I've tried: I open the Table of contents dialog, made all the settings and click OK. Clicking on will now create a new text frame with the table of contents, which can be changed by selecting this image by using "Update Table of contents. So far so good.
I cut this framework and then inserted as a framework anchored in the stream text main, just as I have anchor a table, image, etc.. However, after anchor this TOC frame, I can not more updated by using "update the Table of contents. It is just another framework, not recognized as the table of contents more.
Is there another way to have a 'live', table being updated content that will float in the primary text flow?
Thank you.
Ariel, I think you should give up on e-mail responses - empty again...
PlainMartin,
I could make this work in CS6 (and I would consider another version that allows to drag the anchored object rather than cut and paste). Now the SHIFT key and dragging the blue handle in the main story, I could anchor the table of contents, and when the text cursor was in it I could update. Make sure you anchor in a separate paragraph that uses a style that is NOT included in the table of contents, or he'll start on update.
-
Update datagrid after text user input?
Hi guys
I have a datagrid editable.
When you enter text in there, I noticed that the dataprovider only is not updated until after having clicked on the line twice.
for example
Type "what's new" in the "Whoopa" column, press return (or click on another line), then, in function cell_edit_Ended(event:DataGridEvent)...
var _newText = .text TextInput (event.currentTarget.itemEditorInstance);
trace (_newText;) tracks "what's new".
trace ("file:" + data_grid.dataProvider.getItemAt (_row) ["Artist"]); traces of nothing
Click on another line and trace ("file:" + data_grid.dataProvider.getItemAt (_row) ["Artist"]); tracks "what's new".
How to update? It is originally goofy errors with deletion of the duplicate function, with that I followed.
Cheers for your help.
Just open a new AS3 doc (FP11 +) and make a string with the data that your JSON.stringify (done) and test a JSON.parse (top) directly in a table:
var str:String = ' [{'Delete': 'X', 'Gender': 'None', 'Duo' ': ' '}]';
var obj:Array = JSON.parse (str);
trace (obj);
You get the error:
Scene 1, Layer 'layer 1', frame 1, line 2. 1118: constraint implied value of static type Object to a type perhaps unrelated table. Because JSON.parse () returns an "object" and you are assigning it to a "table".
Even if you typed _myData tabular form and your JSON is technically a JSON array notation, the JSON.parse () function supports not return them in table form, therefore the above error.
Fortunately the JSON.parse () returns the object in notation, you can use it as a table. Consider the modified here source:
var str:String = ' [{'Delete': 'X', 'Gender': 'None', 'Duo' ': ' '}]';
var obj:Object = JSON.parse (str);
trace (obj[0]. Delete + ', ' + obj[0]. Kind + ', ' + obj[0]. Duo);
Track:
X, no,.
Bottom line, no need to make the table (he is not still valid), just assign the dataProvider at the same time you analyze.
data_grid. DataProvider = new DataProvider (JSON.parse (event.target.data));
-
Dear Sir
As a beginner I'm struggeling with a script that would update both tables; Could someone help me to write a script that could do this? Is this technically possible? Thanks in advance!
the paintings that I use with the sample data are:
drop table r008_tpow;
CREATE TABLE r008_tpow
(TRADE_TNUM TANK (6 BYTES),
TRADE_CHILD1 TANK (6 BYTE),
TRADE_CHILD2 TANK (6 BYTE),
TRADE_PARENT TANK (6 BYTES),
TRADE_TORG TANK (6 BYTES),
AUDIT_ZKEY NUMBER (10)
);
INSERT into r008_tpow
values ("ABC123", ",", ",", ' 1234567890 "); -parent 1
INSERT into r008_tpow
values ("AAA001", ",", ",", '0987654321'); -parent 2
INSERT into r008_tpow
values ('QQQ999', ",", ",", '1122334455'); -parents 3
INSERT into r008_tpow
values ('WWW999', ",", ",", ' 1234567890 "); -child 1
INSERT into r008_tpow
values ('DEF123', ",", ",", '1122334455'); -child 3
INSERT into r008_tpow
values ('XXX888', ",", ",", '1122334455'); -child 3-b
INSERT into r008_tpow
values ('XXX999', ",", ",", '0987654321'); -child 2
INSERT into r008_tpow
values ('BBB001', ",", ",", '0987654321'); -2 child b
drop table R008_PARENT_CHILD_DEAL_VOID; --(c'est à dire métiers pour mise à jour est requise)
CREATE TABLE R008_PARENT_CHILD_DEAL_VOID
(TRADE_TNUM TANK (6 BYTES)
);
INSERT into R008_PARENT_CHILD_DEAL_VOID
values ("ABC123"); -parent 1
INSERT into R008_PARENT_CHILD_DEAL_VOID
values ('AAA001"); -parent 2
INSERT into R008_PARENT_CHILD_DEAL_VOID
values ('QQQ999'); -parents 3
drop table r008_cusfields;
CREATE TABLE r008_cusfields
(CF_UTIL_19, CHAR (64 BYTE),
AUDIT_ZKEY NUMBER (10)
);
INSERT into r008_cusfields
values ("," 1234567890"); -parent 1
INSERT into r008_cusfields
values (", '0987654321'); -parent 2
INSERT into r008_cusfields
values (", '1122334455'); -parents 3
INSERT into r008_cusfields
values (' #Par: ABC123 #Org:XYZ789 "," 1234567890 "); -child 1
INSERT into r008_cusfields
values (' #Par: AAA001 #Org:CCC001 ', '0987654321'); -child 2
INSERT into r008_cusfields
values (' #Par: AAA001 #Org:CCC001 ', '0987654321'); -2 child b
explanation
Select distinct T1.trade_tnum as a child, t2.trade_tnum as parent, t1.trade_child1, t1.trade_child2, T1.trade_torg, R008_PARENT_CHILD_DEAL_VOID t2 cus.cf_util_19
inner join (select substr (t3. CF_UTIL_19, 6, 6) tnum, t3.audit_zkey, t3. R008_cusfields t3 CF_UTIL_19) cus
On cus.tnum = t2.trade_tnum
inner join r008_tpow on T1.audit_zkey = cus.audit_zkey t1
where T2.trade_tnum <>T1.trade_tnum
the trade_child1 and/or trade_child 2 must be updated with the news of child for the professions of parents and parents need to be updated with the data of children (more after this update the cf_util_19 field must be updated with UPDATE FACT)
Goal
(1) update, as the parent of the trades of the table r008_tpow with the news of children
(2) update, the children of the trades of the table r008_tpow with the data reference and torg parent
(3) update the CF_UTIL_19 field of the r008_cusfields with 'MADE for update' tableI think this will help
create or replace trigger trigger_parent_child_upd_cus after update of trade_parent,trade_child1 on r008_tpow for each row when (new.trade_parent is not null or new.trade_child1 is not null) begin update r008_cusfields SET (cf_util_19) = '#PCC_Done#Par:'||:NEW.trade_parent||'#Org:'||:NEW.trade_torg where audit_zkey = :new.audit_zkey; end trigger_parent_child_upd_cus;
It was a nice discussion with you. I'm looking forward to some live projects but I don't get one. If you have pls send me to my mail id shafirmubarak@gmail.com
Thnak youPublished by: 879090 on August 18, 2011 05:25
-
VBA Project Password dialog box shown after closing Excel when Acrobat PDFMaker COM Addin is enabled
I have developed many applications in different environments (ASP, SQL, VBA, VB, etc.) of the past 20 years. Recently I've had reports about a bug that I believe that the derivative of a com add-in called "Acrobat PDFMaker Office COM Addin" (PDFMaker.OfficeAddin) developed by Adobe.
The application that generates the problem rests in Excel. There a Userform with a ListBox in it. The position of the listbox is different depending on several parameters and is changed programmatically. However, whenever the UserForm has proved and the user closes the file of the VBA project password dialog box appears. The pop up password must be cancelled 2 - 5 times before it disappears.
The problem of course is very annoying and difficult to explain to the customers who paid me for the solution. I spent a lot of time trying to solve the problem, but with little success.
Recently, I read in a forum that it was caused by the Acrobat PDFMaker COM Addin. I couldn't believe it, but when I disabled the add-in everything works correctly. In addition, in machines that does not add-in installed there is no problems reported.
How to reproduce the BUG (5 minutes) (Courtesy Randall):
To reproduce this bug anyone can just create a new workbook for MacroEnabled, 1) adds a UserForm with a close button, 2) protect the VBProject code (this is essential), 3) add code to load or. View the UserForm in the WB or Activate open procedure, 4) add Userform code change of ownership (for example. High =. Left =. (Caption =) in the Userform Init procedure (this is essential), 5) save and close the workbook. (6) revive the workbook by ensuring that the UserForm is opened and then close it via the button you have provided on the UserForm. (7) exit the WB via the file Menu option - leave (this is essential). Wait, wait what he (about 5 seconds) :-) invited password VBProject to appear, repeatable.
As a solution, I tried to disable the add-in at startup, but the line Application.
ComAddIns("
PDFMaker.OfficeAddin")
. Connect = Falsewill throw an error "This add-in is installed for all users on this computer and may only be connected or disconnected by an administrator."
I read in some forum that the issue occurs if the ActiveX DLL does not correctly release the reference to the workbook that contains the VBA project protected by password (http://support.microsoft.com/kb/280454)
Any help to solve the problem or find a workaround is very appreciated.
Niklas
Hi Niklas,
The above question has been saved as a Bug and has been corrected in Acrobat 11.0.1 update.
-
sql Update query after matching with the string
I am trying to reach the query that updates a table column with the value of the other table, after that he finds an exact match.
So here's the table data and sample to create.
I'm writing a query that would update the value of column - codedesc (currently Null) of the table1 table: after it is a string of column - table code1 codedesc.create table code1 ( codeid number, codedesc varchar2(60) ); Insert into code1 values ( 1,'R1 CONTRACTS'); Insert into code1 values ( 2,'R2 CONTRACTS'); Insert into code1 values ( 3,'R3 CONTRACTS'); Insert into code1 values ( 4,'R5 CONTRACTS'); Insert into code1 values ( 5,'R9 CONTRACTS'); Insert into code1 values ( 6,'R10 CONTRACTS'); create table table1 ( tablekey number, prefix varchar2(25), codedesc varchar2(60) ); Insert into table1(tablekey,prefix) values (1,'1001PAC'); Insert into table1(tablekey,prefix) values (2,'1001MXT'); Insert into table1(tablekey,prefix) values (3,'1002PAE'); Insert into table1(tablekey,prefix) values (4,'1003PCS'); Insert into table1(tablekey,prefix) values (5,'1004BDX'); Insert into table1(tablekey,prefix) values (6,'1005PAC'); Insert into table1(tablekey,prefix) values (7,'1006PAC'); Insert into table1(tablekey,prefix) values (8,'1007LDR'); Insert into table1(tablekey,prefix) values (9,'1009LCR'); Insert into table1(tablekey,prefix) values (10,'1010LBR'); Insert into table1(tablekey,prefix) values (11,'ABCDEF');
The logic for the match is, - take - 2nd column of table-codedesc code value and get 2 characters. For example, when the string is - R1 CONTRACTS, the string will be 1. (Select substr ("R1 CONTRACTS, 2, 2) of the double). -Output will be 1.
Now,.
Look in table 1 for the 3rd position of the prefix that corresponds to the string returned by the query above. So, if the prefix is '1001PAC', it should look for 2 value of figures from the 3rd position. So, in this case it will be 01. Digitally 01 and 1 are equal, then the match is found for this line in the table1 table, so we will need to update the value of the column codedesc with the "contracts of R1.
tablekey, prefix codedesc ---------- ------------------------------------------------------------ 1 1001PAC R1 CONTRACTS -- Needs to be update with this value. 2 1001MXT R1 CONTRACTS 3 1002PAE R2 CONTRACTS ... 11 ABCDEF --Null ( No Need to update when no match found).
Appreciate your help.SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.4.0 - 64bit Production PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for Linux: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production
Hello
You want to avoid TO_NUMBER, given that will cause an error if even a line has a number no (except space) in the wrong place.
Use RTRIM to remove extra spaces at the end of the match_key and LPAD to add '0', if necessary, at the beginning:MERGE INTO table1 dst USING ( SELECT LPAD ( RTRIM ( SUBSTR ( codedesc , 2 , 2 ) ) , 2 , '0' ) AS match_key , codedesc FROM code1 ) src ON (src.match_key = SUBSTR ( dst.prefix , 3 , 2 ) ) WHEN MATCHED THEN UPDATE SET dst.codedesc = src.codedesc ;
Thanks for posting the CREATE TABLE and INSERT statements; It's very useful!
-
What is the best way to refresh the table after autosubmit (10.1.3.4)
What is the best way to refresh the table after autosubmit?
I have a page that contains a table where if one of the fields is changed it autosubmitted where the view object changes some attributes, based on the field having been changed. I need these modified attributes that appear in the table. But without doing anything, the only way to see these values is to cause the iterator updated table.
I've been refreshing the table is having a method in a grain of beacking called "getSystemSettingIter.getCurrentRow ();". This seems to be a bit of a hack for me and I was wondering if there is a better way to get the table to update.
Thanks in advance!Have you tried setting between the two partial page refresh?
http://www.Oracle.com/pls/as111120/lookup?ID=ADFUI385http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/web_form.htm#CACEIEEI
-
Updates failed after the new HD install
I live in South Africa and use a MacBook Pro bought in the USA by the end of 2014. When I had to replace the HD in December 2015 the company is certified local Apple had to order the HD of the USA. After installing it, they restored my software and data files and mails in Mail.
Since the replacement of HD that I was not able to install updates because after that I give permission to update, I get a notice that no update is available under "this Apple ID" or something to that effect. After 8 months of updates failed my HD is slow again with my computer freezing temporarily and the color wheel - wait please turn from time to time. What should I do to allow updates succeed?
It seems that an another Apple ID that yours has been used when the HD has been replaced.
-Backup your data on an external drive
-Start the recovery of the Internet
On OS X Recovery - Apple Support
by pressing Command + Option + R at the start of the OS X Internet Recovery*.
If start you only on the recovery partition, you may have same problem
then format the boot disk and install OSX. During the installation of recovery of the Internet, the version of Mac OS x installed is what came initially with the Mac. For example, you may need to update/upgrade via the Mac App Store
This is the Office Mac Pro forum. I asked that your post moved to the forum of laptop MacBook Pro or another appropriate forum.
You need to update the following. The Plugin version (s) below has / have been submitted with your question and is obsolete. You need to update in order to avoid the known security issues with the version (s) that you have installed. Click on 'more system info... '. "to the right of your question to see what was included with your question.
Maybe you are looking for
-
Offers updates firmware for NWZ-E354
I hope that Sony has not released the player NWZ-E354 and left users without updates. So would like to think that I came with some features I've seen available in other brands of media players that I'm sure that all the users of this model Walkman wo
-
I have Airport express 802.11n and can not make it appear in Airport utility.
-
How to develop the final application exe file that will work on PC not installed labview
Hello I developed a labview application (I request manufacturers/builders and professional license). I generate the final exe file by the tools of-> built Application exe of VI-> fact file But this the application exe file runs only on machines insta
-
Inspiron 3452 32 GB flash too small
I recently bought a laptop computer Inspiron 3452. The 32 GB Flash drive was preinstalled with Windows 10. After installing patches and put in place MS OneDrive, there are only 2 GB free on a total of 29 GB available. When Windows 10 build 1510 try t
-
Questions of fonts using Photoshop in CC
Hello! Previously, I used a full version of Photoshop (latest version I used was CS5 I think) and now I use it through the subscription of the CC. I downloaded fonts DaFont.com previously, I found to be reliable and without problem, using dozens of t