using the MERGE command
Hi allI have the table with the name ac_supp_shed_main with columns supp_id, supp_name, delflag, net_amount, clear_amount, balance_amount
and a view named as view_supplier_dues.
I am retriving some specific lines to form the view_supplier_dues view and insert these specific lines in ac_supp_shed_main of a grid designed forms to oracle 10g with check_box control.
When check out some of the specific records it will insert in this table.
I have a procedure written in forms to load the data in the grid, if certain documents are inserted into this table prviously, then these files are coming up with checking these boxes in the grid.
My requirment is that if I am again you want to insert those verified records then these documents delflag value 'y' and registers
are not present in the table to insert in this table
I am writing in order to merge 10g oracle forms for this
-------------------------------------------------------------------------------------
merge into ac_supp_shed_main
using (select count (*) from v_count
from view_supplier_dues where bill_no = 12345 and bill_date ='01 - May - 2010 "(et supp_id = 345 and delflag = ' n ')"
When matched then
Update ac_supp_shed_main set delflag = 'y '.
When not matched then
insert into ac_supp_shed_main
(supp_id, supp_name, bill_no, bil_date, delflag)
values (234, "aunt stell Ltd.", 2323, 10-May-2010 ',' only)
It's show error MERGE online...
I give the example here.
Please give me one to achieve any solution...
It's show error MERGE online.
ERROR? What is the error? I see no error?
Please be aware that we do not have your tables & we do not have your data.
Therefore, we can run, test, or improve your SQL posted.
ALWAYS
View the name of the operating system (OS) & version for DB Server System.
View the results of
SELECT * from version $ v
or post the Oracle version with 4 decimals
When everything has failed, read the Fine Manual
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_9016.htm#i2081218
Published by: sb92075 on May 29, 2010 10:14
Tags: Database
Similar Questions
-
Copy and update data from one table to the new table by using the Merge command
Hello
Can someone tell me please how to do this?
I have a table: EMP (ename, sal, empno (pk), dept) another table is EMP_CLASS ((pk) empno, ename)
I want to insert corresponding lines of emp to table emp_class if this line does'nt exists in emp_class
otherwise it will be update info by corrsponding emp_class table as well as remove of emp_class according to the emp delete operation.
Thank you
Madam.
Published by: Nico on August 12, 2010 22:59Have changed. PLS, run once more...
MERGE INTO emp_class
With the HELP of emp
WE (emp.empno = emp_class.empno)
WHEN MATCHED THEN
UPDATE
SET emp_class.ename = emp.ename,
emp_class. DEPTNO = emp.deptno,
emp_class. Class = decode(emp.deptno,10,1,20,2,30,3,40,4)
DELETE
WHERE emp_class.empno = emp.empno
WHEN NOT MATCHED THEN
INSERT (emp_class.empno, emp_class.name, emp_class.deptno, emp_class.class)
VALUES (emp.empno, emp.ename, emp.deptno, decode(deptno,10,1,20,2,30,3,40,4));P.S. Not tested
Thank you
Florian...Published by: Florian on August 13, 2010 01:53
-
I get a message: to use the 'java' command line tool, you must install a JDK. I tried 10 times to install without success. Help, please.
You probably have some of the older than the needs/desires software legacy Java installed.
Please see these sons of community message:
Just found this last Java does not work with El Capitan
This is the Apple link to the legacy version of Java 6.
Download Java for OS X 2015-001
First of all, I would like to try to identify what application generated the next message and update (delete) this request as the case may be. If you need to run Java then, as the Apple Support page says it's certainly preferable that your installation of Java entirely up-to-date with the Oracle's Java course. If you can get without Java, you should install it not - like the Flash, it should not be installed unless you have no choice.
-
Control mouse using the voice command
Hey...
I'm doing project control of mouse by simple voice command and also the click of mouse using the voice command action...
I have problem to compare my order with the standard command...
Please help how I can make this comparison and produce output...
Ginelle
I would like to start by this library. I found this a long time ago, but it would allow you to build what you need
-
Hello
My VI look like her:
I would like to re - use the same command in my "everything".
I have several cases and I don't want to create several command text.
If someone kown one travel, please tell me how.
Next
Hello
I may not be correctly undestand your question, but you can use a local variable for what you're trying to make...
-
Cannot use the 'MDGS' command in Windows 7
original title: need help with a Comand prompt
Hi, I need help with a problem in the command prompt. Whenever I try to use the "msg" command, it displays an error indicating it is unavailable this command has been changed?
MSG is not a command that is available in Windows 7. You can get a list of available commands by typing help at the command line, or
help > C:\Users\YourUserName\Desktop\Windows7DOSCommands.txt
to put the list in a text file on your desktop
-
I worked with the Microsoft Support to discover some hidden files. The tech told me that the files are still there, just hidden. He used the attrib command to discover some of the files. The tech said the remaining files must be made manually, how?
How to find the files? My office is still hidden. I have bookmarks and word files.
Thank you
See Steve Cochran's response, dated June 2, 2011 in this thread: http://answers.microsoft.com/en-us/windows/forum/windows_vista-security/how-do-i-recover-windows-files-from-the-start-menu/96d70458-4fb4-403f-ac96-e88f5b6ffec4
See the instructions for removing the difficulty system in the following link: http://www.bleepingcomputer.com/virus-removal/remove-system-fix which includes a presentation about the hidden files and folders.
Are you sure that you have more malware on the computer? Have you run everything on scanners such as Malwarebytes or Superantispyware?
-
After changing the name of a folder or a file on the desktop or by creating a new folder (and then hit enter), the folder or the text file doesn't change - until I use the Refresh command. Then, the text shows correctly and the movements of folder or a file in a place open to the top left of the screen. Before using "Refresh" the folder or the file will not open. When I save a file on the desktop is not visible until the 'Refresh' is used. Sometimes, but not always the same behavior occurs in other folders as well. I use Win XP SP3. Can someone please shed some light on this?
Hello
· Since when are you facing this problem?
· Remember to make changes to the system?
·
Method 1:
I suggest you check in safe mode. Follow the steps mentioned below.
a. restart the computer and keep tapping F8 until you reach the start menu.
b. click on safe mode from the list and press ENTER.
Check if the problem persists.
Method 2:
I suggest you to scan your system for viruses and malware using a care Microsoft and Microsoft security essentials. Check the links below.
http://OneCare.live.com/site/en-us/default.htm
http://www.Microsoft.com/security_essentials/
Method 3:
Create a new user account and check if the problem persists.
How to create and configure user accounts in Windows XP
http://support.Microsoft.com/kb/279783
Thanks and regards.
Thahaseena M
Microsoft Answers Support Engineer.
Visit ourMicrosoft answers feedback Forum and let us know what you think. -
original title: impossible to file attachments in mail
Hello; I'm with family Vista premium and windows mail as a messaging system. I was with IE8, and now I've migrated to IE9.
When I get an email, under windowsmail with attachments, I can't file attachments by using the file command menu. This option is blocked. Under windows mail, I went to tools, options, security and made sure that: Let not the attachments which are unsecured... box be deselected. It makes no difference, and I still can't save attachment like this; I CAN SAVE BY CLICKING and opening the attachment and save it but it is not satisfactory that I can't save the attachment by using the file command menu.
Can you help me please?
IE9 is certainly the culprit and there is more questions. I know that some MVPs have contacted their MS threads about it and even received no answer.
My guess is that MS will not address this issue. Do not forget that the development team of Windows Mail is dissolved by the MS in June 2006. (Yes, while Vista was still in beta). I seriously doubt they care.
-
Hi all
I want to use the MSG command send message from my computer to other computers on a network. We work in windows 7 and I used the following syntax:
MSG * / server IP: address 'Message '.
but the message back to my computer even if I use the IP address of another computer
Thank you
Hi Michael,
Advanced networking issues are supported in the TechNet Forums. I suggest you send the request in the TechNet forums.
http://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w7itpronetworkingHope this information helps.
-
How can I prevent the access denied message when you use the shutdown command?
I use shutdown /m \\computername/s
I have "Access denied (5)" as an answer.I am admin on all my computers. Same username and password on each of them.How can I get this shutdown command to work remotely, so I can't access every computer command prompt via Remote Desktop?How can I prevent the access denied message when you use the shutdown command?Hello
I suggest you to report this issue in TechNet Forums for Windows 7 networks: http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/threads
Thank you.
-
graphic execution using the unix command
I'm new to endeca3.1
is there an available way to run the chart using the unix command?
How can I plan the graph in the cron tab?
Take a look at the Guide to the Integrator ETL server (Server CloverETL), Chapter 6, Scheduling and also chapter 14 on the Simple HTTP API. This should allow you to plan or call graphical ETL published to the server.
http://docs.Oracle.com/CD/E40518_01/Integrator.311/IntegratorServerGuide.PDF
-
When using the merge and when to use updated
Hi friends,
Given the best performance... purpose of this discussion is when we should use statement UPDATE and when we should use MERGE statement in oracle update of thousands of records.
Kindly Guide.
Kind regards
Himanshu
Hello
Looking for a couple to a few rules that you can use to decide whether to use the MERGE or UPDATE, without actually testing two meanings?
If so, use MERGE when
(1) (sometimes) need to add new lines
(2) it is simpler. This includes special cases
(2A) an UPDATE statement uses a subquery in the SET clause and then (mostly) repeats the same subquery in the WHERE clause
(2B) you want to use the analytical functions or CONNECT BY in a subquery
These rules are NOT guaranteed to work in all situations.
Kimmy says:
Hello
... My requirement is only UPDATED records about 200 to 500K (NOT followed by update of insertion).
So the rule (1) above does not apply in this case.
What I observed in the update using a MERGE statement and UPDATE is:
Update with the MERGER was faster however explain the bytes consumed to the query plan MERGE has been compared more update.
Use the tool that works best for your needs. If users are complaining that something shows more bytes used in a plan to explain, so maybe it's a reason for the UPDATE.
Where I work, where is the fastest is usually more important.
In addition, I want to get clearity
1. "if I should use MERGE if I need to update recrods using the unique table" as shown below: OR update will be good to use in this case:
MERGE INTO MKT_DATA inmkt
C using (SELECT Customer_Code, region, State OF CUSTOMER_DATA)
ON (inmkt. Distributor_Code = c.Customer_Code AND inmkt. DISTRIBUTOR_CODE IS NOT NULL)
WHEN MATCHED THEN
Updated the inmkt VALUE. Distributor_Region = c.Region,
inmkt. C.State = Distributor_Province;
UPDATE MKT_DATA inmkt
SET (inmkt. Distributor_Region, inmkt. Distributor_Province) =
(SELECT c.Region, c.State OF CUSTOMER_DATA c
WHERE c.Customer_Code = inmkt. Distributor_Code)
WHERE inmkt. DISTRIBUTOR_CODE IS NOT NULL;
2 statements above are not equivalent.
The UPDATE statement changes all the lines in the table mkt_data that have a distributor_code, this distributor_code be in the table customer_data or not.
You want something that is equivalent to the MERGE statement, you can use:
UPDATE MKT_DATA inmkt
SET (inmkt. Distributor_Region, inmkt. Distributor_Province) =
(SELECT c.Region, c.State
OF CUSTOMER_DATA c
WHERE c.Customer_Code = inmkt. Distributor_Code
)
WHERE THERE ARE
(SELECT 1
CUSTOMER_DATA C2
WHERE the c2. Customer_Code = inmkt. Distributor_Code
)
;
It basically uses the same auxiliary request 2 times (article 2 (a), so I would use MERGE if these are the results I wanted.
If you have a foreign key constraint, which ensures that each distributor_code in mkt_data will match a line in customer_data, then the 2 statements above will produce the same results. In this case, I find the UPDATE statement simpler and probably use it rather than MERGE.
2. to Updating huge amount of records MERGER must be used instead of update?
I don't know of all short reign as the "use X whenever you have more than 100,000 lines".
3. If in the update, I need to use several tables then I have to use MERGE?
MERGE IN MKT_DATA2 t
WITH THE HELP OF)
SELECT DISTINCT srt. Sales_Id, tmkt. Cust_Code, srt. PRODUCT_CENTER
OF srt, CUSTOMER_DATA c, MKT_DATA2 tmkt SALESTERR_PL
WHERE tmkt.state_Id = 10423
AND tmkt. Business = 'MARKETING'
AND c.CUST_CODE = tmkt. Cust_Code
AND c.Rollup_Code = srt. CUST_CODE
AND srt. PRODUCT_CENTER = tmkt.PL
) d
WE (t.state_Id = 10423
AND t.BA = 'MARKETING'
AND t.Cust_Code = d.Cust_Code
AND t.PL = d.PRODUCT_CENTER
AND t.Cust_Code IS NOT NULL
)
WHEN MATCHED THEN
UPDATE SET t.Sales_Id = d.Sales_Id;
UPDATE MKT_DATA2 tmkt
SET Sales_Id = (SELECT SALES_ID OF SALESTERR_PL srt
WHERE the srt. CUST_CODE = (SELECT ROLLUP_CODE FROM CUSTOMER_DATA c
WHERE c.CUSTOMER_CODE = tmkt. Cust_Code)
AND srt. PRODUCT_CENTER = tmkt.PL)
WHERE business = 'MARKETING'
AND state_Id = 10423;
Once again, those who are not equivalent. The UPDATE statement can change more lines than the MERGE statement.
In addition, you can use the MERGE statement:
MERGE IN MKT_DATA2 t
WITH THE HELP OF)
SELECT DISTINCT srt. Sales_Id, tmkt. Cust_Code, srt. PRODUCT_CENTER
OF srt, CUSTOMER_DATA c, MKT_DATA2 tmkt SALESTERR_PL
WHERE tmkt.state_Id = 10423
AND tmkt. Business = 'MARKETING'
AND c.CUST_CODE = tmkt. Cust_Code
AND c.Rollup_Code = srt. CUST_CODE
AND srt. PRODUCT_CENTER = tmkt.PL
) d
WE (t.Cust_Code = d.Cust_Code
AND t.PL = d.PRODUCT_CENTER
)
WHEN MATCHED THEN
UPDATE SET t.Sales_Id = d.Sales_Id
WHERE t.state_Id = 10423
AND t.BA = 'MARKETING'
- AND t.Cust_Code IS NOT NULL - does not need, said subquery 'c.CUST_CODE = tmkt. Cust_Code ".
;
If you would care to publish the sample data, I was able to test this.
4. when the UPDATE is preferred over the MERGER?
In simple cases, including situations where all you need to know are on the line itself, such as:
UPDATE emp
SET sal = sal * 1.05
Job WHERE NOT IN ('MANAGER', 'PRÉSIDENT')
;
-
Hi all
I find that selecting and moving layers in Photoshop are MUCH more difficult to 2015.1 CC PS as in earlier versions of Photoshop (using the shortcut COMMAND to temporarily toggle the tool move).
In earlier versions of Photoshop, if I had several layers and one of the layers selected in an image by hitting the keyboard shortcut CTRL-COMMAND (that I had my mouse over the image), and then selecting the name of the layer that I wanted to work with / move, I could then easily hit the "COMMAND" key (which is a shortcut for the tool MOVE) if I happened to have another selected both tool and this would automatically switch to the MOVE tool until what I released the button COMMAND key. Then I could move the layer as needed.
Well, in the current version of the PS CC 2015.1 this shortcut (using the COMMAND to convert temporarily the MOVE tool) does not work very well the Group WHOLE layers (if I have layers within a group) is selected instead of just the layer I had chosen.
ONLY if I actually choose the MOVE tool in the toolbar it works correctly and I am able to move the selected layer.
Oh my God, it was so much harder to explain that I thought it would be! I hope this makes sense.
It is a known problem with the latest update.
For now, the workaround is to select the move tool and uncheck "Selection automatic Layers ' and then hit cmd as a shortcut for the move tool.
-
By using the nqcmd command to purge the cache
Hello
I would like to ask a question,
in OBIEE11G, I need to use the nqcmd command to purge the cache,
in server, I run commond below:
nqcmd d coreapplication_OH1568635987 u weblogic1 s C:\purgecache.txt Pei weblogic
command is following in purgecache.txt:
call sapurgeallcache()
It's ok in the server,
now, I want to run this command at another machine, as I want to use informatica to invoke this how to purge the cache at the time.
How to do?
Thank you in advance!Assume that the column name is etl_end_time
Agents can be controlled using reports (analysis in 11 g). There is a tab Condition while creating agents that can be used to control the agents according to the report.
Lets say u create a false report. In what you put a dummy column. In the Edit Form dialog box, use the TIMESTAMPDIFF function to compare your etl_end_time and current_time.
Lets say you set the TIMESTAMPDIFF function returns the difference in minutes. Then create a filter on this column with operator greater than or equal to and the value that say 1 minute (it's your choice)
If this report now returns true when the difference between timestamps is greater than 1 minute (which means that it will become true 1 minute after the etl is complete). Then assume that you configure the agent to check the status of all the 1 minute at a time given when the agent is running, the report returns true and agent is triggered
This officer will then call you purge command
Of course, you can add another filter to the fake report as less than or equal to 5 minutes because the difference of the timestamp of the current time and the previous etl also runs will be greater than 1 minute ;) To make sure only the latest time end etl is used, you can add a second filter as has just said.
Phew... hope so :) I made myself clear
Maybe you are looking for
-
What type of sim card is used?
PL tell me what sim is used in intex cloud firefox Tel?
-
Firefox keeps telling me that an update is available. I try to update and it runs for hours and will not accomplish. I expect that such update may take several minutes. I click on the "Hide" button and it will not "hide". Pause button does not seem t
-
Is there a way to transfer music videos of You Tube for my Windows Media Player?
I found a few music videos on You Tube, is there a way I can get them in my Windows Media Player library?
-
Can I disable Windows Media Guide
Original title: Windows Media Guide Can I disable Windows Media Guide, and still operate Windows Media Player?
-
Hello I submitted my app on 3/20, and it was approved on 3/31 around 7 pm PST. I did not receive the e-mail about the free playbook again. I need to make my application available in the app store of BB before being able to get email for the playbook?