Comments (2)
Hi. Can you provide me with some test code please?
from priscilla.
CREATE OR REPLACE PROCEDURE TEST1
AS
BEGIN
INSERT INTO WH_F WT (BUSINESS_DATE, AMOUNT)
( SELECT BUSINESS_DATE, SUM (PL) AS AMOUNT
FROM WH_LOAN_F
GROUP BY BUSINESS_DATE);
COMMIT;
END TEST1;
/
CREATE OR REPLACE PROCEDURE TEST2
AS
V_HIER_START DATE;
BEGIN
SELECT HIER_START
INTO V_HIER_START
FROM CIN_BUILD_LOG CBL
WHERE CBL.BUSINESS_DATE = V_VERDATE;
COMMIT;
END TEST2;
/
CREATE OR REPLACE PROCEDURE TEST3
AS
BEGIN
MERGE INTO member_staging x
USING (SELECT member_id,
first_name,
last_name,
RANK
FROM members) y
ON (x.member_id = y.member_id)
WHEN MATCHED
THEN
UPDATE SET
x.first_name = y.first_name,
x.last_name = y.last_name,
x.RANK = y.RANK
WHERE x.first_name <> y.first_name
OR x.last_name <> y.last_name
OR x.RANK <> y.RANK
WHEN NOT MATCHED
THEN
INSERT (x.member_id,
x.first_name,
x.last_name,
x.RANK)
VALUES (y.member_id,
y.first_name,
y.last_name,
y.RANK);
COMMIT;
END TEST3;
/
from priscilla.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from priscilla.