Forms :: Creating A Program With Two Tables

Jul 19, 2010

I am facing a problem while creating a program using oracle forms.These two table i am using in creating following program .

SQL> desc electricity ;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(40)
PREV_READING NUMBER(20)
PRESENT_REDAING NUMBER(20)
TOTAL_UNITS NUMBER(30)
AMOUNT NUMBER(30)
[code]....

What i want that whenever user writes a value in "PRESENT_Reading" Column then it stores value in "ID table" .For example if current month is July ,Then when user write a value in present Reading column ,it stores it in JULY Column of Id table ..i Write following trigger (Key_commit) On present_reading Column .

if sysdate=to_char(sysdate,'MON','Jan') Then
:electricity.PRESENT_REDAING := :ID.Jan ;

elsif
sysdate=to_char(sysdate,'MON','FEB') Then
:electricity.PRESENT_REDAING := :ID.Feb ;

elsif
sysdate=to_char(sysdate,'MON','MAR') Then
:electricity.PRESENT_REDAING:= :ID.MAR ;

But when i run my form it does not work ,and raised unhandled Exception .I think i need to change some properties of PRESENT_READING column of electricity table.

View 7 Replies


ADVERTISEMENT

Precompilers, OCI & OCCI :: Cobol Program That Call C Program

Jan 28, 2011

I have a Cobol program that call C program above

#include stdlib

EXEC SQL INCLUDE SQLCA;
EXEC SQL BEGIN DECLARE SECTION;
char *uid = "puntos/puntos@cmrdesar";
[code]....

Are something wrong in C programm ? Pro*C code from vouters.dyndns.org/tima/OpenVMS-Cobol-C-Cobol_ passing_ variable_ number_ of_ arguments_to_C.html

View 1 Replies View Related

SQL & PL/SQL :: Creating Some Tables - Constraints?

Dec 3, 2011

So I'm here creating some tables and if theres a guide where I can take a look at some Constraints Declarations , Mostly cause i have some values on the table that cannot be negative so i need to set constraints to be positive

View 4 Replies View Related

SQL & PL/SQL :: Using Constraints In Creating Tables

Aug 19, 2013

Explain in detail about using constraints in creating tables.

View 3 Replies View Related

SQL & PL/SQL :: Creating External Tables

Jan 26, 2011

I have created a softlink to a data file orig_file.dat using the command ln -s orig_file.dat orig_file_link.dat

Now is it possible to create an external table using this linked file orig_file_link.dat

I am using this linked file to minimise the space usage because every month we get different data files and external table creation is done as a batch job copying the data file to another file whenever a new data file arrives. External table is created with the new file. so i need to check whether it is possible with the linked file instead of copying the file.

View 6 Replies View Related

Creating User To Do A Delete From All Tables

Oct 30, 2011

I am trying to create a new user who will be able to do a delete from all of the tables that only I MYSELF created. I created my user and granted access but realized I may not have done it right..

is it simply SQL>grant delete on <TABLESPACE> to <new user>; ? or do i need to specify the grant the delete on my tablespace to new user?

View 4 Replies View Related

SQL & PL/SQL :: Creating Views - Percentages And Multiple Tables

Oct 10, 2013

I'm having trouble with a little assignment.

"Create a view named vuPassFailRate that will show the pass rate and fail rates of each test."

I have a table named Test_ID containing the following columns:

TEST_ID
TEST_NAME
PASSING_GRADE

And another table named Test_History containing the following columns:

TEST_ID
STUDENT_ID
SCORE

I'm assuming i have to create an inline view, and to work out the pass/fail rates i need to do something along the lines of (For pass rate) Where SCORE is greater than or equal to PASSING_GRADE, and TEST_ID equals TEST_ID, divide by a count of SCORE and multiply by 100. I just cant work out the nested select statements, and work out the formula using two columns in two tables.

I have been staring at this problem for so long now i cant see the wood for the trees.

View 3 Replies View Related

SQL & PL/SQL :: Insufficient Privileges When Creating Tables Using Execute Immediate?

Apr 30, 2010

SQL> connect sys as sysdba
Enter password:
Connected.
SQL> grant dba to temp;

Grant succeeded.

SQL> connect temp
Enter password:
Connected.
SQL>
SQL> create or replace procedure tempproc
2 is
3 begin
4 execute immediate 'create table temp_table(a varchar2(10))';
5 end;
6 /

Procedure created.

SQL> exec tempproc;
BEGIN tempproc; END;

*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "TEMP.TEMPPROC", line 4
ORA-06512: at line 1

SQL>
SQL> declare
2 begin
3 execute immediate 'create table temp_table(a varchar2(10))';
4 end;
5 /

PL/SQL procedure successfully completed.

SQL> desc temp_table;
Name Null? Type
----------------------------------------- -------- ----------------------------
A VARCHAR2(10)

Why am I not able to create a table from procedure using execute immediate?

View 3 Replies View Related

PL/SQL :: Creating Materialized View Utilizing Tables And A Job

Dec 5, 2012

This is just for learning purposes. What if I would like to create my own materialized view utilizing only tables and a job.

View 28 Replies View Related

PL/SQL :: Creating Views - Percentages And Multiple Tables

Oct 10, 2013

I'm having trouble with a little assignment. "Create a view named vuPassFailRate that will show the pass rate and fail rates of each test." I have a table named Test_ID containing the following columns:

TEST_IDTEST_NAMEPASSING_GRADE 

And another table named Test_History containing the following columns:

 TEST_IDSTUDENT_IDSCORE 

I'm assuming i have to create an inline view, and to work out the pass/fail rates i need to do something along the lines of (For pass rate) Where SCORE is greater than or equal to PASSING_GRADE, and TEST_ID equals TEST_ID, divide by a count of SCORE and multiply by 100. I just cant work out the nested select statements, and work out the formula using two columns in two tables. I have been staring at this problem for so long now i cant see the wood for the trees. 

View 2 Replies View Related

JDeveloper, Java & XML :: Creating Report From Oracle 9i Tables

Jun 10, 2013

I have a database in my Windows 2003 server and oracle 9i installed on it working find. we are using our client pc on the network to access the database on the server through our application program which is build under java swing.I want to create a client application which will use the browser to access the database only for generating reports.

View 1 Replies View Related

SQL & PL/SQL :: PCT Is Not Enabled While Creating Mview / Though Base Tables Are Partitioned

Apr 4, 2011

I created a mv for one of the partitioned tables but on viewing the mv capabilities it still shows PCT is set to 'N'.

create materialized view MV_summary_SEC
refresh fast
start with sysdate
nEXT SYSDATE + 1/24
enable query rewrite as
[code]....

If i remove the sub query and create the mview like this,then PCT is enabled.

create materialized view MV_summary_SEC
refresh fast
start with sysdate
nEXT SYSDATE + 1/24
enable query rewrite as
select PERIOD , SUM(SUM_WEB_HITS)
from summary ,date_table
where PERIOD >= DATE_TABLE.CUR_DATE
group by PERIOD

Is it simply because oracle doesn't support PCT if the definition contains subqueries ?

View 4 Replies View Related

Application Express :: Creating Tree With Multiple Tables?

Jun 20, 2012

I want to do a tree view based on the following tables in APEX:

create table plattform (
id number,
name varchar2(200))
create table environment (
id number,
plattform_id number,
name varchar2(200))

[code].....

View 4 Replies View Related

Minimum Extent Error Creating Tables In Empty Tablespaces

Dec 30, 2010

I am trying to restore to a backup instance on a backup server. When I try to recreate the tables I keep getting ORA-01659: unable to allocate MINEXTENTS. The tablespaces and datafiles on both servers show as the same size in OEM.

I have dropped all tables and OEM shows tablespaces are empty. Then I run a script to recreate all tables. Most of the tables don't get created because their TS is full. After the script to recreate all tables runs, the main tablespaces are full, more full than on the production machine. I have also tried ALTER TABLESPACE xxx COALESCE; on each tablespace right after dropping all tables and before recreating them to reclaim free space. Why is it full? I've only dropped and created the tables, there shouldn't be any data in them yet.

ORA-01659: unable to allocate MINEXTENTS beyond 2 in tablespace PLUS_T...The backup instance was already there, all I did was drop the tables. Here's what I ran on prod to build a script to recreate the tables on backup server. Got it off Burleson somewhere.

SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) ||'; '
FROM USER_TABLES u;

View 4 Replies View Related

Performance Tuning :: Creating Index On Base Tables Of A View?

Dec 9, 2010

I have a view on base tables holding historical data for previous 60 months(one table per month) with union all operators.create index on those base tables will improve performance or creating a primary key with disabled novalidate will improve for retrieving data?

The view has around 8 million data and used as a fact table with 4 dimension tables.A DTS package from MSSql side refreshes OLAP cube by retrieving data from these tables in oracle.

View 1 Replies View Related

Creating And Dropping Global Temp Tables Inside A Single Procedure

Aug 20, 2010

I am writing a procedure that will be called from a java wrapper.

The procedure do a lot of data manipulations and in between i am creating global temp table and saving the data into it for each request thats given as a parameter to the procedure. After all the processing i have to write the data from this global temp table into a physical table and atlast drop the temp table.

Create or replace proc_name ()

update table........

delete from ..........

CREATE GLOBAL TEMPORARY TABLE TSAAG
( supplier_id numeric(10) not null,
supplier_name varchar2(50) not null,
contact_name varchar2(50)
)

insert into............

drop table TSAAG;

End;

creating a global temp table inside a procedure is expensive...

Do we have anything like creating table before and calling the instanse of it in procedure.

Do we have any alternatives to this..

View 3 Replies View Related

Forms :: Convert Program From 6i To 10g

Dec 6, 2006

I have a program that was developed in Forms 6i.Actually, this program:

- reads a table with a Blob column that contains a MS Word format Document.
- the document needs to be convert , then the program changes some variables that are wildcards.

In forms 6i I use a column with datatype Ole and the flowing procedure that read value from database:

PROCEDURE Pr_Abre_Contrato (pContrato In Contrato.Cont_Numero%Type,
pQuery in Varchar2 ) Is
Workbook OLE2.OBJ_TYPE;
Application OLE2.OBJ_TYPE;
MyDocuments ole2.obj_type;
Args ole2.obj_type;
vWhere Varchar2(200);
[code]....

Now, I need to convert this program to forms10g. I opened the TAR in metalink and the Support said that exec_verb can not be used and it doesn't have another one to replace.

View 26 Replies View Related

Forms :: Executing Program BAT In Another PC In 10g?

Oct 20, 2010

I have forms 10g and use oracle database11. I have a form and I need to execute a program x.bat in another PC.

View 2 Replies View Related

Forms :: Open Excel Sheet From PL/SQL Program

Jul 13, 2010

I need to open an excel sheet from PL/SQL program where I will put in the data. How to open an excel sheet from Pl/sql code.I got hold of a code as below Looks like I need to configure DAD PL/SQL

BEGIN

-- Prepare Headers
owa_util.mime_header('application/vnd.ms-excel',FALSE);
--htp.p('Content-Length: '||document_length||NL_CHAR);
--htp.p('Content-Length: '||document_length);

[Code]....

View 4 Replies View Related

Forms :: Inventory Sale Program In Oracle

Apr 15, 2010

I have made the inventory sale program in oracle. Its working from 7 years. Now its speed is very slow.It take much time to execute query.

View 17 Replies View Related

Forms :: Using A Java Program In Bean Area?

Jul 13, 2010

I want to use a java program in Bean Area.

But I can't understand the implement class and how it is implemented.

View 1 Replies View Related

Forms :: Copy Rows From Excel And Paste In 6i Program?

Sep 28, 2007

I want to copy some rows in one column from Excel and Paste it in a Oracle Forms Progam. Normaly with the clipboard. But my Oracle Forms 6i Program copy alle the rows in one Field, separated with a | character. But I need it in several rows.

View 12 Replies View Related

Forms :: Trigger Program To Track User Information

Jun 25, 2013

I have a trigger program to track updated information's on perks column. I am failing to finish systime in my trigger program.

SQL> desc user_track;
Name Null? Type
----------------------------------------- -------- ----------------------------
EID NUMBER
ENAME VARCHAR2(15)
OLD_PERKS NUMBER
NEW_PERKS NUMBER
UNAME VARCHAR2(15)
ACTION_DATE DATE
ACTION_TIME DATE

SQL> create or replace trigger tri_track
2 After UPDATE ON EMP
3 FOR EACH ROW
4 BEGIN
5 insert into user_track(EID,ENAME,OLD_PERKS,NEW_PERKS ,UNAME,ACTION_DATE,ACTION_TME) values
6 (:old.eid, :old.ename , :old.perks, :new.perks,user, sysdate, to_char(sysdate , 'HH24:MI:SS')
7 from dual;
8 end;
9 /

Warning: Trigger created with compilation errors.

SQL> show errors;
Errors for TRIGGER TRI_TRACK:

LINE/COL ERROR
-------- -----------------------------------------------------------------
2/1 PL/SQL: SQL Statement ignored
3/95 PL/SQL: ORA-00917: missing comma

View 3 Replies View Related

Forms :: ORA-06508 - PL/SQL - Could Not Find Program Unit Being Called

Feb 18, 2010

Actually what happens is that we are connected to oracle through forms 6i. suddenly we receive the error " ORA-06508: PL/SQL: could not find program unit being called "

while doing some transaction. we have searched on net and meta link. they say that the package / procedure called has become invalid or recompilation has occurred and that is not compatible. Now we have monitored carefully that there are no changes what so ever has been made in the the package/ procedure.

what could be the reason behind this. we have also checked the global variable issue. we use package level variables but declared in the package body only. (so these are not public)

View 20 Replies View Related

Forms :: Run Concurrent Program On Save (Push Button)

Jun 16, 2011

How can we run concurrent program on SAVE (push button) in oracle forms?

View 3 Replies View Related

Forms :: Frm-40405 Traced The Program And Only One Commit_form Is Being Entered

Mar 22, 2011

I am getting an error whenever I attempt to save a record.My form has a number of none table data blocks and one database block. I have traced the program and only one commit_form is being entered and I keep getting the 40405 error.

I have attempted to trap in an form level on-error trigger but that doesn't fire for this error.

View 1 Replies View Related

Forms :: Batch Program Retrieve Data From Oracle To Excel

Jul 5, 2011

I'm developing a new batch program retrieve data from oracle to excel.Normally i insert those data into single sheet. Is it possible if I want do this into multiple sheet.

Eg: I need to insert data base on branch category. different sheet for different branch but still in a single workbook?

View 2 Replies View Related

Forms :: Organization Chart - Generate Automatically Without Opening Any Program

Apr 11, 2007

I need is to generate this chart automatically from the form builder without opening any program like visio (for instant). that's mean when I select the wanted department the chart will be generated automatically .

View 9 Replies View Related

Forms :: Creating A Username And Password In Oracle Forms 6i

Sep 12, 2010

I created a form to create a username and password.i tried creating a user in forms 6i using the following code on the when button pressed trigger:

BEGIN
forms_ddl('create user'||:user_name||'identified by'||:pasword);
commit_form;
END;

i have granted the user to create user but it does not work at all. password and user_name are captured in the form.

View 7 Replies View Related

Forms :: Creating A Procedure Oracle Forms And Database

Nov 3, 2011

I am creating a procedure oracle forms and database Which one is fires first ..If suppose i need data base fires first...

View 3 Replies View Related







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