SQL & PL/SQL :: Create Procedure Run For Both Monthly As Well As Yearly Report

Aug 3, 2010

I want to create procedure who should run for both montly as well as yearly report for monthly report i will pass Year and Month as argument for year i will pass Year only

for annual report i a counting all the user, new entry for item, new enty for customer, new enty for admin for montly report i am counting new item, new group.

View 16 Replies


ADVERTISEMENT

Reports & Discoverer :: Create A Procedure In Program Unit And Assign Output To A Field In Report?

May 8, 2013

i just want to know how can i create a procedure in the program unit and assign the output to a field in the report.

View 7 Replies View Related

Ora-06502 - Create Generate Procedure That Create Dynamic Procedure Through DBMS_SQL

Mar 31, 2004

ORA-06502...I have database on oracle 9i on Solaris 9. I create a generate procedure that create dynamic procedure through DBMS_SQL. On this database I got the ORA-06502 error. When I tried to run the same procedure on the same database on oracle 8i on NT this work fine.

View 3 Replies View Related

PL/SQL :: Yearly Quantity Distributed Evenly Across 12 Months

Aug 15, 2012

getting the yearly qty distributed evenly across 12 months. I can do this in PL/SQL but want to know is it possible in SQL.

Database version 10g

create table test_tbl( qty number(22),
yr number,
key_val varchar(10)
);

insert into test_tbl values( 500000, 2013, '1');
insert into test_tbl values (56789, 2014, '2');

commit;

This is the output I need to get from a SQL select query

Key     Month     Year     qty
--------------------------------------------------------------
1     1     2013     41667
1     2     2013     41667
1     3     2013     41667
1     4     2013     41667
1     5     2013     41667
1     6     2013     41667
1     7     2013     41667
[code]....

View 4 Replies View Related

SQL & PL/SQL :: Showing Monthly Data

Mar 6, 2013

I am having the query

SELECT JOB,
decode(to_char(hiredate,'YY'),80,to_char(hiredate,'MON'),NULL) "80",
decode(to_char(hiredate,'YY'),81,to_char(hiredate,'MON'),NULL) "81",
decode(to_char(hiredate,'YY'),82,to_char(hiredate,'MON'),NULL) "82",
decode(to_char(hiredate,'YY'),83,to_char(hiredate,'MON'),NULL) "83",
count(*) total
FROM emp
WHERE JOB='CLERK'
GROUP BY JOB,
hiredate;

I want result as follows

job 80 81 82 83 TOTAL
CLERK DEC DEC 2
CLERK JAN JAN 2

That means if 80,81,82,83 if having some common month then it should show side by side.

View 20 Replies View Related

Application Express :: Create Items Context Help Editable Report Or Report And Form App

May 9, 2013

How do I create Items context help editable report or report & form app?

what is its table?

View 2 Replies View Related

Reports & Discoverer :: Can Create Drill Down Report With Parameter Form Of Report

Nov 29, 2011

I am trying to open report in parameter form in drill down report.

View 7 Replies View Related

Reports & Discoverer :: Can Create Drill Down Report With Parameter Form For Report

Dec 19, 2011

I had report A which drill down to report B. While drilling down to report B, The parameter form of report B should be displayed which accept parameter code and then open the report B. My parameter form is displayed but not accepting the input. i am using the hyperlink to display the second report. Is there any cgimap.bat file to be configured for the parameter report? If yes then how to configure this file?

View 1 Replies View Related

SQL & PL/SQL :: Write Query To Show Monthly Salary?

Jul 12, 2012

i have table structure (emp_no, emp_sal,emp_startwork)

i want query to show the monthly salary such as jan month salary Feb month salary

View 2 Replies View Related

SQL & PL/SQL :: Monthly Running Total With Opening Balance

May 9, 2012

I want to generate the gapless montly running balance for the whole year.Data in the table "A" is as below.

code Date amount remarks
0101 30-SEP-10 1000 Opening
0101 01-OCT-10 1500
0102 25-OCT-10 500
0102 10-DEC-10 750
0101 26-JAN-11 450
0102 03-MAR-11 3000
0101 30-SEP-11 6000

Required output is
Code Date amount Balance
0101 31-OCT-10 1500 2500
0101 30-NOV-10 0 2500
0101 31-DEC-10 0 2500
0101 31-JAN-11 450 2950
-- -- -- continue
0101 30-SEP-11 6000 8950

Same output for code 0102. I have taken only 02 code for excample only. There are about 250 code in table.

View 14 Replies View Related

Create Procedure To Create User In Oracle

Jan 19, 2012

I need to create PROCEDURE to create user in oracle

CREATE OR REPLACE PROCEDURE "CREATE_USER_ORACLE8"
(
USER_ID in VARCHAR2,
PASSWORD in VARCHAR2,
ROLES in VARCHAR2,
nReturnCode OUT NUMBER
)
BEGIN
[code].......

Compilation errors for PROCEDURE NOG.CREATE_USER_ORACLE8

Error: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

; is with authid deterministic parallel_enable as
Line: 9
Text: BEGIN

i want that the customer execute PROCEDURE (user_id,password,PROCEDURE )

View 5 Replies View Related

PL/SQL :: Create A Procedure Inside A Procedure

Jun 25, 2012

DB version:11g

can we create a procedure inside a procedure...if not is there any alternative??

in db2 it is allowed so do oracle support this????

View 5 Replies View Related

PL/SQL :: How To Run Report / Calling Web URL Into Stored Procedure

Dec 17, 2012

I have a requirement to run below given URL by Stored Procedure. I am using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

[URL]

View 4 Replies View Related

Reports & Discoverer :: How To Create Report

Apr 30, 2013

I want to create report using this query, is there any option?

declare
cursor c2 is
select epi_id, epi_code, epi_name

[Code].....

View 4 Replies View Related

SQL & PL/SQL :: Create Report In Excel File?

Dec 22, 2010

I want to create a excel report by joining 2 tables.

Is there any stabdard package which i can use for creating this report.

View 3 Replies View Related

SQL & PL/SQL :: Create DBMS-SQL Procedure?

Oct 7, 2010

I am creating the following dbms_sql procedure...

CREATE or replace PROCEDURE table_demo
(tabname IN varchar2)
IS
cursor_name INTEGER;
rows_processed INTEGER;

[code]...

There are no compilation errors.I call this code from the following anonymous block...

DECLARE
X CHAR:='T';
BEGIN
TABLE_DEMO(X);
END;

This also compiles successfully and without any errors. It runs properly as wellHowever when I run 'select * from T'. Then system throws up the error of table or view does not exist.

View 12 Replies View Related

SQL & PL/SQL :: Create A Trigger And Procedure To Go Along With DDL

May 11, 2010

I'm trying to create a trigger and procedure to go along with my DDL. Everything is created just fine, but when I try to execute an update on the table monitored by the trigger I get the following error:

update housing set group_num = 1 where room_num = 10

ERROR at line 1:
ORA-00937: not a single-group group function
ORA-06512: at "YANKEEFAN146.VIOLATION_CHK", line 6
ORA-04088: error during execution of trigger 'YANKEEFAN146.VIOLATION_CHK'

/* DDL */
create table violation_type
(violation_num number(1) primary key,
violation_def varchar2(100) not null)
organization index
tablespace mi257_data;
[code]....

View 9 Replies View Related

SQL & PL/SQL :: Create A Procedure Using EXECUTE IMMEDIATE?

Apr 14, 2013

I am trying to create a procedure using the EXECUTE IMMEDIATE. I have been having problems calling it from an anonymous block

My code

CREATE OR REPLACE PROCEDURE homework
(p_table_name VARCHAR2)
IS
v_department_id departments.department_id%TYPE;
BEGIN
EXECUTE IMMEDIATE

[code]....

I called the procedure from an anonymous block

BEGIN
homework('Employees');
END;

It gives me an error

ORA-00905: missing keyword

View 3 Replies View Related

SQL & PL/SQL :: How To Create Procedure In Script

May 23, 2011

I have 5 create package scripts.Rather than executing as one by one in SQLPLUS ,i want to run all 5 create statments in shell script in background.

For example... i want to create one file called bala.sql and execute all 5 create package statements in one shot as a script called bala.sql.

View 21 Replies View Related

SQL & PL/SQL :: How To Create Procedure By Using Dblink

Jun 26, 2011

iN MY DB SERVER (CALLED A),THERE IS A DBLINK TO ANOTHER DB SERVER (CALLED B). DBLINK'S IS LINKB.
----------
BY USING LINKB,I CAN CREATE,DROP TABLE;DELETE,UPDATE,INSERT DATAS IN SERVER B.

Now,i want to create procedure on server b(but i can only deal with b using dblink linkb).

View 4 Replies View Related

PL/SQL :: To Create A Procedure Which Have 3 Parameters

Jan 11, 2013

I would like to create a procedure which have 3 parameters. suppose in Date_birth, in Dept , out number_of_records

if i pass null value to one of the parameter it should return all values . if a pass value to the parameter it should return as per parameter values

Create or replace Procedure Emp_Test (P_dop in Date,P_Dept in number , P_noof_records out Number,
p_recordset Out Sys_Refcursor) as
Begin
OPEN p_recordset FOR
Select Emp_cd,Emp_name, Date_of_Birth,Dept,Count(emp_Cd) noof_records
From Emp_Master Where Date_of_birth =P_date_of_Birth
and Dept=P_dept ;
End ;

View 2 Replies View Related

Forms :: Create A Report For Absent Employee?

Oct 18, 2012

I have a requirement that I need to create a report for absent employee, we have "Hand Punch" scanning system for attendance, when a employee scan his hand it put a record with the employee id, date, shift, & time.

Now I need to create a report for absent employees in date range

View 2 Replies View Related

Application Express :: How To Create Customize Report

May 10, 2013

I am having the table columns called

level1_name, level2_repemail, level2_name, level2_repemail, level3_name, level3_repemail,

using this columns i would like to create a report region as mentioned below.

------------------------------------------------------------------------------------------------------------------------------------------------------|
TITLE |
-----------------------------------------|---------------------------------------------------|--------------------------------------------------------|
Lvl 6 | Lvl 7 | Lvl 8 |
-------------|---------------------------|---------------------------------------------------|--------------------------------------------------------|
Name | Rep | Name Rep | Terr Name Rep |
-------------|---------------------------|-------------------|-------------------------------|--------------------------------------------------------|
AP | aaa@gmail.com | AAA | bbb@gmail.com | AAA bbb@gmail.com |
AP | aaa@gmail.com | BBB | bbb@gmail.com | BBB bbb@gmail.com |
AP | aaa@gmail.com | CCC | bbb@gmail.com | CCC bbb@gmail.com |
AP | aaa@gmail.com | DDD | bbb@gmail.com | DDD bbb@gmail.com |
-------------------------------------------------------------|-----------------------------------------------------------------------------------------|

how can i create this type of report.

I am using ORACLE 11G, and APEX 3.2 .

View 7 Replies View Related

Reports & Discoverer :: Create Report From Cursor?

Jun 18, 2012

I want to create report against my below query, how?

Declare
Cursor Emp_Cur is
Select epi_id, epi_code
From emp_personal_info
Where epi_status = '73'

[code]...

View 3 Replies View Related

Create A Procedure To Update Status?

Mar 10, 2011

create a procedure that will update the column status from active to closed after every two years.

View 4 Replies View Related

SQL & PL/SQL :: Create A Select Procedure With Parameter?

Feb 2, 2011

I have a query like this:

*************************
SELECT vendor_id, summary_flag
FROM ap_suppliers
WHERE vendor_id = :param; --'4551'

The Results:

************
VENDOR_ID SUMMARY_FLAG
-----------------------
4551 N

Then I create the procedure:

*****************************
CREATE OR REPLACE PROCEDURE myproc4 (
p_vendor_id IN ap_suppliers.vendor_id,
p_summary_flag OUT ap_suppliers.summary_flag
)
AS
BEGIN

[code]....

Warning: compiled but with compilation errors.

I want to create a procedure that call vendor_id (parameter) and the output like the this:

VENDOR_ID SUMMARY_FLAG
-----------------------
4551 N

View 4 Replies View Related

Create Toad Stored Procedure?

Mar 8, 2007

I am trying to create a stored procedure in TOAD. I've found example code on the Internet to write a stored procedure, but it doesn't seem to work with Toad. I tried to write the procedure and execute it to save it to the DB, and instead I keep getting error messages like "an INTO clause is expected in this SELECT statement" when I used the

CREATE OR REPLACE PROCEDURE testing
AS
BEGIN
SELECT *
FROM CPK;
END;

or "bad bind variable 'CPKS'" when I tried the following instead:

CREATE OR REPLACE PROCEDURE testing
AS
BEGIN
SELECT *
FROM CPK;
Into :Cpks;
END;

post some example code here with short explanations for me on how to write a stored procedure.

View 4 Replies View Related

Create A Procedure To Update The Table?

Aug 27, 2007

I got a table table1 with 3 columns: id, name, value

im trying to create a procedure to update the table.

create or replace
PROCEDURE TEST1 (
x IN varchar,
y IN varchar,
z IN varchar
) AS
BEGIN
update table1 set value=x where name=y and id=z;
commit;
END TEST1;

that doesnt seem to work

View 3 Replies View Related

Create A Procedure Which Parses Into Other Proc?

Oct 30, 2012

I have a table TABLE1 which has following columns
proc_name
table_name
insert
update
delete.

The table contains a proc name, all tables used in that proc,operation is done on the tables. like sample data.

proc_name tab_name insert update del select
----------------------------------------------------------------------------------
Proc1 Table1 Y Y N Y
Proc1 Table2 y Y Y Y

I want to update this table throu running a generic procedure.Can it be possible to craete a procedure which parses through all procs of database and get above info and update TABLE1??

View 1 Replies View Related

Reports & Discoverer :: Error In Event Driven Report Procedure?

Mar 30, 2011

.I created the following procedure to implement Event Driven Reporting:

CREATE OR REPLACE procedure ABC.eve_drv_rep as
myPlist system.SRW_PARAMLIST;
myIdent system.SRW.Job_Ident;
BEGIN
myPlist := system.SRW_PARAMLIST(system.SRW_PARAMETER('',''));
system.srw.add_parameter(myPlist,'GATEWAY','apsIP/reports/rwservlet');

[code]...

Procedure is created successfully but when I execute this procedure, I get the following error:

ORA-20001'Error sending email.Error: ORA-20999
ORA-06512: at "Nml.Eve_Drv_Rep", line 17
ORA-06512: at line 1

2ndly I want to know that whether I should give IP address or Application Server Machine Name in GATEWAY parameter?
And in SERVER parameter either I should give the Application Server Machine Name or Report Server name installed on Application Server Machine?Lastly from where I can get the complete list of Parameters to be added in SRW.Add_Parameter like SERVER, GATEWAY etc.

note that we r using Database 10g Rel.2 and Forms and Reports services on Application Server and the report being called was developed in Reports 10g.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved