How can we check that the data already exist in the database
Hi friendsI'm trying to create a procedure for adding clients in the database with the customer id as input parameter... but if the customer details database already exists that I would update this detail and is not in the database I want to add this detail in the database... How could I do that...
any help would be appreciated
Thank you
Rommy
Hello
If your condition is to add to a table, and if the record exists in the other table, the merge statement does not work
Example (Please check the column name and the parameter names). I do not commit or rollback because I do not know if you control the transaction within this procedure or outside it.
CREATE OR REPLACE PROCEDURE add_cust(I_CUST_ID IN VARCHAR2,
I_CUST_F_NAME IN VARCHAR2,
I_CUST_L_NAME IN VARCHAR2,
I_CUST_ADD IN VARCHAR2,
I_CUST_CITY IN VARCHAR2,
I_CUST_STATE IN VARCHAR2,
I_CUST_ZIP IN VARCHAR2,
I_CUST_DOB IN DATE,
I_CUST_ IN VARCHAR2,
I_CUST_ACCT_TYPE IN VARCHAR2,
I_START_BAL IN NUMBER) IS
BEGIN
INSERT INTO CUSTOMERS C
(CUST_ID,
CUST_F_NAME,
CUST_L_NAME,
CUST_ADD,
CUST_CITY,
CUST_STATE,
CUST_ZIP,
CUST_DOB,
CUST_)
VALUES
(I_CUST_ID,
I_CUST_F_NAME,
I_CUST_L_NAME,
I_CUST_ADD,
I_CUST_CITY,
I_CUST_STATE,
I_CUST_ZIP,
I_CUST_DOB,
I_CUST_);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
INSERT INTO CUSTOMER_ACCT
(CUST_ID,
CUST_ACCT_NO,
cust_acct_type)
VALUES
(I_CUST_ID,
CUST_ACCT_SEQ.NEXTVAL, -- CUST_ACCT_SEQ is a sequence, isn't?
I_CUST_ACCT_TYPE);
END add_cust;
Kind regards
Tags: Database
Similar Questions
-
So I guess it has to do with {module_data} and your API but I can't seem to understand this.
I have 3 secure areas, basic, premium and pro and I want to use the liquid to display content on their page of account based on what secure area, they are advertised to. I know how to write the logic of the liquid, I feel like a dunce because I don't know which module to use to check where they are subscribers. Please when replying, don't slam me too hard upside the head because I don't know that it's right in front of me.
I thank everyone!
You can use module_data to get the information, but you still had the native module to do this:
module_subscriptions | Developers of business catalystYou can run a collection and do what you want with the data.
-
How can I check that an e-mail address is correct in the Adobe database
I assigned a new user to our creative team, but the user does not receive the acceptance email. How can I check that the email address is correct in the database of Adobe.
Since this is an open forum, not Adobe support... you must contact Adobe personnel to help
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific time) <===>===> NOTE DAYS AND TIME
Don't forget to stay signed with your Adobe ID before accessing the link belowCreative cloud support (all creative cloud customer service problems)
http://helpx.Adobe.com/x-productkb/global/service-CCM.html -
How can I check if the 5s iPhone that I bought is the true Apple product
How can I check if the 5s iPhone that I bought is an authentic product of Apple. I need the site link sea that allows me to enter the serial number and can check it please.
-
How can I check that my copies of my personal files are on the DVD backup created?
Original title: backup (bssic)
I always use the Basic (datasafe not updated) backup
How can I check that my copies of my personal files are on the DVD backup created.
Can I see a proof without actually deleting a file and try to recover the DVD
I have no confidence with him at the present time, after seeing the various problems on the forum
Hello
Thanks to Mir... for explanations.
I don't think I'm that close properly. I tried to shut down e-mail but think I did it without writing anything (what is now). I've been around all 22 replies and then got lost
I bought today the local backup from dell datasafe (cleverbridge).
I hope so, I'd be able to print all the 22 responses within the email (?) I would like to, instead of printing the current response only. I like being able to see things on paper, and not only within windows.
These forums are a great idea. DellConnect is not always the best method, I do not seem to 'chat' option for XPS laptop.
Thanks again
-
How can I check that my Iphone 5 is unlocked
How can I check that my Iphone 5 is unlocked?
Two ways-
1. put a SIM card from another carrier - if your phone displays a message that it is a SIM card from a foreign or unrecognized carrier - locked to the current
2. restore as NEW using iTunes (after saving the device) - If you see this - it is unlocked
-
My iPhone was stolen. How can I check when the last time that I backed up my phone to my laptop without my iPhone?
Click here and either use iTunes to check or browse to the path of the backup manually.
(142338)
-
Windows Media player on my machine does not run some AVI files. How can I check what the problem with AVI files. Files are running in other utilities free ware. Also, windows Explorer does not display dimension and other video related information for the file. Y at - it a tool that can indicate what exactly is the problem with the file.
Ritu
Hello
1. you get any error message?
2. don't you make changes to the computer before the show?
Please follow the steps from the link below.
-
How can I check that my windows licenseed or not
I have several computers in my office with different types of windows (win xp, win vista, win7). How can I check that versions of windows installed on each computer is authentic (licensed) or not
The Genuine Microsoft website provides information about the Genuine Advantage program:
http://www.Microsoft.com/Australia/genuine/how-to-tell.mspx -
How can I check that Windows is authentic when buying a new laptop or used?
original title: How can I check if the windows are authentic, while buying a new laptopHow can I check if the windows are authentic, while buying a new laptop
Of course make sure you buy laptop from a trusted source, such as places that are trustworthy.
If the price is very cheap, be careful.
Also check label WGA, you can find some information from:
-
How can I check if the connection is broken?
Hi, how can I check if the connection is broken?
such a code:
try{ SocketConnection _s = (SocketConnection)Connector.open(address); }catch(Exception e){}
will return me an exception when I can't connect. But what happens if I am connected to the server for a few minutes and after that something happens that break the connection? How I check that?
Kind regards
The following links can help you:
http://thiamteck.blogspot.com/2008/10/Java-check-if-socket-connection-broken.html
-
How can I check that applications download on my computer?
I waited for my trial applications to download for 2 hours now, and there is no indication of progress. How can I check that they download to my computer? Adobe Application Manager does not give me any info at all.
You must use the desktop app here cc, https://creative.adobe.com/products/creative-cloud to install your programs, and your tests.
This app shows download progress in percentage of total available for download two spots:
If you don't see any change in 5 minutes, cancel the download and restart it.
-
How can I check if the laptop I have is the original one or not (black market)?
How can I check if the laptop I have is the original one or not (black market)?
I think that's not wrong, but I fear that if there is no problem with the laptop so I can not go to the service center to solve the problem.
The type of my laptop is:
Type: HP Pavilion 1212TX G4
Serial number: {deleted private information}
Product: QG370PA #UUF
I hope that the details is right, because I bring today from my laptop.
and maybe I need your help to check if the serial number is registered on HP.
Thank you for your information
Sagita {information} ^^
-
How can I check that add ons are paid into my account
How can I check that add ons are active in my account?
Now how can OK, I reset my password? I sent the link to make the reset, copy the link in the browser but can't find the right site to post a link too. Also, I have my number of account, but cannot find the serial number. feeling challenged this morning, thank you
-
How can I check if the hardware works correctly?
How can I check if the hardware works correctly?... including fans, hard drive, cd players, etc...
Hello
I suggest you to generate system health report to check if the system is working properly. To run the system health report, follow the steps below.
1. click on start
2. go in Control Panel
3 go to the Tools and performance information
4 search for Advanced Tools in the left panel of the window.
5 go to generate a system health report
You can also check the material status of the devices in the Device Manager. Follow the link for more information on the Manager of devices below.
http://Windows.Microsoft.com/en-us/Windows-Vista/open-Device-Manager
Maybe you are looking for
-
Return to iTunes earlier?
The new iTunes is an absolute stupidity. I've been using itunes for nearly a decade and the new GUI is absolute garbage. I tried to sync my music and it deleted my tones. Then synchronize my ringtones and it deleted my music and my shades removed fro
-
Satellite A40-SP151: can not make ethernet work card
Hello I went and stupidly installed new XP on my Satellite A40 and I can't do the ethernet card working (just Windows will not recognize it).I tried MANY solutions (even some of this site) and the drivers and the problem is still there. If someone co
-
Hello It is a recurring problem, even after dry and re - install, can someone shed light on this, the MBP dies? Yosemite, tried running Reset the PRAM and NVRAM on your Mac. MacIntel: Reset of the controller (SMC) system management same problem occur
-
Two monitors will not show extended display
I just bought a HP Envy 7000 with two dell monitors. In addition, I bought a DVI - D splitter and two monitor DVI - D cables to connect the monitors. The two monitors work, but he won't show a mirrored display. It is the splitter I bought for connec
-
BIOS update failed on the Satellite A100 - SK4 - how can I fix it
I tried to update my bios but something went wrongduring the process and now the laptop does not start.(when I try to activate the satellite, nothing happens) Is there an easy way to simply delete it?When you turn it on, the screen is all black. The