Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL Procedure
PL/SQL Procedure [message #261836] Thu, 23 August 2007 14:39 Go to next message
raksora
Messages: 18
Registered: August 2007
Junior Member
Hello Iam new to this forum ..
can anybody help me out , i have data which loads sales at certain levels in period hierarchy at 1 and 2 .Now a new product have been introduced at level 4 .Now i have to sum up the these lower level in to higher level at 2 in order to get them loaded.The following is the procedure which loads that..

BEGIN

SELECT MAX(cal_year_num) INTO ln_max_year FROM dw_admin.period_ref_monthly ;
SELECT MIN(cal_year_num) INTO ln_min_year FROM dw_admin.period_ref_monthly ;
INSERT INTO dw_admin.sales_rep_sales_quota_fact
SELECT a.division, a.product_hierarchy_level, a.SALES_QUOTA, a.sales_rep
FROM SALES

Re: PL/SQL Procedure [message #261916 is a reply to message #261836] Fri, 24 August 2007 01:12 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Welcome.

Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Make sure that lines of code do not exceed 80 or 100 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Please post a description of your tables.
Please post something that is syntaxically correct.
A small test case with create table and insert statements and the result you expect with it will help us help you.

Regards
Michel
Previous Topic: PL/SQL
Next Topic: Please help me............(do you like my stupid unhelpful title?)
Goto Forum:
  


Current Time: Sat Dec 03 10:04:32 CST 2016

Total time taken to generate the page: 0.09783 seconds