Last active
August 29, 2015 14:04
-
-
Save shaik2many/2d4c5f18d0e340cd7114 to your computer and use it in GitHub Desktop.
oracle merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| merge into tims_idr_agent t | |
| using (select 1 from DUAL) s | |
| on (t.id = p_id AND t.audit_cycle = p_audit_cycle) | |
| when matched then | |
| update set t.name = 'Alan1',t.phone = '-2932x',t.email = 'Alan@v1',t.category = 'Domestic1' | |
| when not matched THEN | |
| INSERT (audit_cycle,ID,NAME,phone,email,category) | |
| VALUES(p_audit_cycle,p_id,p_name,p_phone,p_email,p_category); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment