Forms :: 6i (FORMS_DDL Used To Create A Function)

Sep 8, 2011

I am using a form which create function to calculate value using form_ddl. When I used this program from superuser it will calculate correct value but in other user it calculate wrong value. I gave 'Create Procedure ' privilege to user too.But still problem exist.

View 3 Replies


ADVERTISEMENT

Forms :: How To Drop And Create Constraints With Forms_ddl

Sep 8, 2012

forms_ddl('ALTER TABLE ACCOUNT.VOC_DETAIL DROP CONSTRAINT FK_VOC_NO');
forms_ddl('ALTER TABLE ACCOUNT.VOC_MASTER DROP CONSTRAINT PK_VOC_MASTER');

forms_ddl('ALTER TABLE ACCOUNT.VOC_MASTER ADD CONSTRAINTS PK_VOC_MASTER primary key(VOC_NO)');
forms_ddl('ALTER TABLE ACCOUNT.VOC_DETAIL ADD CONSTRAINTS FK_VOC_NO FOREIGN KEY(VOC_NO) REFERENCES VOC_MASTER(VOC_NO)');

the trigger works very well but when i add some trigger between drop and create constraints then first step drop constraint sucessfully but 2nd trigger when create new constraints not working examples of trigger are as under:-

declare
s_number varchar2(7);
cursor masters is
select voc_type,voc_date,voc_no from account.voc_masterorder by voc_type,voc_date,voc_no;
abc masters%rowtype;
cursor detail is
select voc_no,ref_no from account.voc_detail group by voc_no,ref_no;
[code]....

View 1 Replies View Related

PL/SQL :: To Create Function Based Index For Group Function Columns

Jun 15, 2012

Is anyway to create function based index for group function columns.

For example

select max(timestamp),min(age),averge(sal).... ... .. from tab;

View 5 Replies View Related

SQL & PL/SQL :: Create A Function That Return XmlType

Apr 29, 2010

i want to create a function that build a return xml (XmlType):

create or replace
function plainLanguageSummary(nip varchar2,id number,code_language varchar2) return XmlType
as

[Code].....

but in the compilation i got the following error :

Error(10,62): PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null others <identificateur> <identificateur entre guillemets> <variable bind> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <un littéral de chaîne avec spécification de jeu de caractères> <un nombre> <une chaîne SQL entre apostrophes> pipe <constante de chaîne éventuellement entre guillemets avec indication du jeu de

he seems to not like the first "select" he encounter!.

View 9 Replies View Related

SQL & PL/SQL :: Create Pipeline Function In Package

Feb 13, 2013

Can we create a Pipelined function in A Package ? I know we can create it standalone function.

View 11 Replies View Related

SQL & PL/SQL :: How To Create Identity Function In Oracle

Apr 15, 2010

i have a project that needs to have a identity number in the table.this is the table:

create global temporary table BOOK_INFO
( row_id number(5),
BOOK_TITLE char(20),
BOOK_AUTHOR char(15)
) on commit preserve rows;

i dont know how can i generate row_id, in sybase i can only set the datatype of row_id in IDENTITY and it will automatically generates number and as the transaction ended the row_id will automatically back to 1.

in oracle i tried to create sequence but it didnt back to 1 when the transaction/procedure ended.. Like for example if the procedure ended and the last row_id inserted in the table is 300 the next run of the procedure will start in 301. but i need to start in 1 in every run of the procedure.

Also, i tried to set the variable v_row_id to 0 and it increment by 1 as it insert in the table, but the problem is there are times that in 1 book_title there is more than 1 author. so the v_row_id of the book_title with more than 1 author is all the same.Here is my query:

insert into BOOK_INFO
(select v_row_id, BOOK_TITLE, BOOK_AUTHOR from LIBRARY);

The result is:

ROW_ID BOOK_TITLE BOOK_AUTHOR
1 BOOK_1 AUTHOR_1
1 BOOK_1 AUTHOR_2
1 BOOK_1 AUTHOR_3
1 BOOK_1 AUTHOR_4
2 BOOK_2 AUTHOR_5

View 8 Replies View Related

SQL & PL/SQL :: Create A Function Which Can Be Used In A Select Query?

Jun 11, 2008

I have a table structure like :-

Create table test(A varchar2(50),B NUMBER);

The data in that table is like that:-

A B
----------------------
2*3
2*4*5
4*5
column B contain no data.

I want to create a function which can be used in a select query,and the output should come like that :-

A B
----------------------
2*3 6
2*4*5 40
4*5 20

Means column B contains the resultant value of column A.And the above output should come through a select statement.You can use any function inside the select statement.

View 20 Replies View Related

Create A Function And Call It In Anonymous Block

Oct 22, 2013

I made this script but I still don't quite understand if the syntax is correct. I just wanted to create a function and call it in an anonymous block. I then wanted it to use a variable as a parameter in an iteration and output the variable every iteration. It's done basically but I know it's not 100% right. The fibonacci function looks like its going to loop an infinite number of times if the parameter is greater than 2.

CREATE OR REPLACE PACKAGE myPACKAGE AS
CREATE OR REPLACE FUNCTION fibonacci
(n BINARY_DOUBLE) RETURN BINARY_DOUBLE IS
BEGIN
IF n <= 2 THEN
RETURN 1;
[code]........

View 5 Replies View Related

SQL & PL/SQL :: Create Rank On Column Without Using Rownum Function

Mar 17, 2013

can we create rank on a particular column without using rownum and rank function.

View 9 Replies View Related

PL/SQL :: Create Function To Return Table Type

Jul 25, 2012

I am trying to create a function which would return a nested table with 3 columns of a table as a type.

my query is like

select col1,col2,col3 from table_1;

View 4 Replies View Related

Application Express :: How To Create Sentry-Function

Jul 18, 2013

I want to build a custom authentication scheme which combines the funcionality of of SSO and a custom authentication function.

1. If the HTTP Header Variable REMOTE_USER is set, this user should be a valid logged on user. (Single Sign On functionality)

2. If the HTTP Header Variable is not set, the LOGIN-Page should appear. (local user Administration)

3. The user/password combination from the login page should be validated by my own authentication function I think I have to create a sentry-Function, which is a combination of the sentry-functions which are used in the schemes "custom" and "HTTP Header Variable". I tried to find an implementation of these functions in the APEX_040200 database scheme, but without success.

View 5 Replies View Related

PL/SQL :: Can't Compile And Execute Function (Create Or Replace)

Jun 6, 2013

I cant compile & execute this function.

create or replace
FUNCTION get_branding_testing
RETURN r_brand
IS
BEGIN
CURSOR c1
IS
SELECT b.branding_code, c.name_desc     
[code]....

View 6 Replies View Related

Create A Function Based Index On Bold Highlighted

Jul 2, 2010

Using oracle 10g R2 on sun-solaris 10 (sparc-64) Well in the MIS system we have lot of ad-hoc queries coming up. We have proper indexing. Say an example which runs very slow;

SELECT GLKCO, GLDCT, GLDOC, GLDGJ, GLJELN, GLEXTL, GLPOST, GLICU, GLICUT, GLDICJ, GLDSYJ,
GLTICU, GLCO, GLANI, GLAM, GLAID, GLMCU, GLOBJ, GLSUB, GLSBL, GLSBLT, GLLT, GLPN, GLCTRY, GLFY, GLFQ,GLCRCD, GLCRR, GLHCRR, GLHDGJ, GLAA, GLU, GLUM, GLGLC, GLRE, GLEXA, GLEXR, GLUPMJ, GLUPMT, GLBCRC, GLCRRM, GLACR, GLAN8
FROM "PRODDTA"."F0911"
WHERE GLUPMJ <> 0
AND TO_DATE('1 JAN' || (19+substr( GLUPMJ , 1, 1)) || substr( GLUPMJ ,2,2)) + substr( GLUPMJ , 4, 3 ) -1 BETWEEN SYSDATE - 365 AND SYSDATE
[code]....

Here GLUPMJ already indexed so the second query returing an index scan but the first query does a FTS naturally.Now even if I plan to create a function based index on 'the bold highlighted' but how.

create index glupmj_idx on f0911(TO_DATE('1 JAN' || (19+substr( GLUPMJ , 1, 1)) || substr( GLUPMJ ,2,2)) + substr( GLUPMJ , 4, 3 ));..Error If I don't use a FBI my query will result in FTS.

1> how to create a FBI here in this case

2> In MIS systems where 'n' no of ad-hoc queries can come up, how to avoid FTS.

View 4 Replies View Related

Execute Create Procedure / Function From SQL Script In SQLPlus

Feb 17, 2010

I have a series of SQL scripts which contain SQL statements to create tables, populate them, create functions and stored procedures. Now I would like to execute each sql file against SQLPlus using a batch file so that I can just run this one file and all the configuration work I need to do can get done.

Problem is, when I try to execute the SQL file against SQLPlus, it gets upset with the Create Procedure/Function scripts...

I am using the following command:

sqlplus u/p@<someserver> @<path_to_sqlfile>.sql

this sql file contains create procedure pl/sql code

Is it possible create/compile SP/Functions that are contained within SQL Files using SQLPLus? Or do I have to physically write them out in SQLPLus (or load them in SQLDeveloper) to accomplish this?

View 8 Replies View Related

SQL & PL/SQL :: Dynamic Function - Create Physical Table And Return Table Name In Out Variable

Aug 30, 2011

I am trying to execute dynamic SQL in Stored Function and I don't know how to do this.

Explanation:

In the function I am calling pr_createtab is procedure which will create a physical table and return the table name in the out variable v_tbl_nm.

I need to query on this dynamic table and return the result as return result. But i am not able to do it.

Here T_web_loylty_report_table is a type.

CREATE OR REPLACE function CDW_DSS.f_ReturnTable(i_mrkt_id in number, i_cmpgn_year in number)
return T_web_loylty_report_table is
v_tbl_nm varchar2(50);
i_cntry_cd varchar2(20);
v_sql_str varchar2(32567);
[code]......

View 2 Replies View Related

SQL & PL/SQL :: Create View From Dynamic Query (or Function Returning Query)

Dec 5, 2012

I have a dynamic query stored in a function that returns a customized SQL statement depending on the environment it is running in. I would like to create a Materialized View that uses this dynamic query.

View 1 Replies View Related

Forms :: Create View Based On Values Selected In Forms

Jun 7, 2013

I am working on a simple form which will get the user to fetch required columns of employee master.

For that i have created a form which will display the column names and select option. When user clicks on query, the form will display the selected columns in a block. After going thru if required the user can download it to excel.

As of now I do not have filtering option. For this I thought of creating view based on the selection and then fetch records from the view and display it in form.

To achieve this I would like to know How I create or replace a view dynamically based on values selected. I remember doing this sort of thing long back, but could not recollect it.

View 3 Replies View Related

Forms :: How To Disable Function Key F4 In 6i

Feb 22, 2012

How to Disable Function key F4 in forms 6i for example in forms i want that no body copy full row with F4 Key pls guide me where to apply key F4 trigger in forms.

View 1 Replies View Related

Forms :: How To Use AS_TO_CLIENT Webutil Function

Nov 3, 2009

how to use the AS_TO_CLIENT webutil function? The WebUtil User's Guide doesn't give examples. It just gives a description of what the function does:

Quote:AS_To_Client Transfers a file from the application server to the client. The webutil.cfg parameter transfer.appsrv.enabled must be set to true to use this function, and if the transfer.appsrv.accessControl parameter is also set to true, the upload target directory must be listed in the transfer.appsrv.read. list. It is sensible to call the WebUtil_File_Transfer_IsASReadable function with the target filename before starting the download to ensure that you will be able to read from this location on the application server.

View 3 Replies View Related

Forms :: Frm-41009 Function Key Not Allowed

May 1, 2012

i create form,when i press F11, it displays this error:Frm-41009 function key not allowed ,press ctrl+k for list of valid values.And i can't enter value into fields to query records.

View 11 Replies View Related

Forms :: Practical Explanation About Function

Jan 10, 2011

Can u explain me these function with practical example..so i get it...

1) FORMS_DDL
2)POST-QUERY
3)POST-BLOCK

View 4 Replies View Related

Forms :: Disable Function Keys In 6i?

Apr 3, 2006

how to disable function keys in forms6i(i.e., i want to deactivate the default function keys when running a form)

View 5 Replies View Related

Forms :: Why Function Keys Are Not Working In 9i

Dec 27, 2012

why function keys are not working in forms9i?

Like whenever I press F7 for query or F8 to fetch records or F10 to save records they are not functioning.

View 2 Replies View Related

Forms :: How To Pass Table Name By Reference To Function

Oct 1, 2011

I have to create a function which count the max id in the provided table.

For example: I have two table customer and book

and

create or replace function Row_Count(tab_nam) return varchar2 is

CONTR_NO varchar2;
begin
select NVL(MAX(t.contract_num), 0) + 1
INTO CONTR_NO
FROM tab_nam t;
return(CONTR_NO);
end Row_Count;

when I call

Function( customer) ;
or
Function( book) ;

It should tell the max number with addition of one.

View 4 Replies View Related

Forms :: Oracle Apps 11i To Use Text_io Function

Dec 21, 2010

We create a form on 6i then deploye it on our Oracle apps Server with EBS and forms 11i Linux based. I want to create a form using form 6i which read a text file from client side and insert data into table i try text_io function but its not working after deployed on server and also try webutil function but its not working with oracle forms 6i.

View 6 Replies View Related

Forms :: Call Function With Parameter In Oracle

Jul 17, 2012

i have this function

create function xxx_sal (p_number in number)
return number is
v_sal number;
begin
select sum(sal)
into v_sal
from emp
where empno = p_number;
return v_sal;
end;

how can called it in oracle forms

View 8 Replies View Related

Forms :: Parameters For App_window.set_window_position() Function

Jan 21, 2007

what are the parameters expected for app_window.set_window_position() function?

View 4 Replies View Related

Forms :: Calling Function Inside The Procedure

Jun 2, 2011

I have created a function in form field(when validate item) this should be called in separate procedure. How to call this function in procedure?

View 4 Replies View Related

Forms :: Call A Function On Key-next-item Trigger?

May 20, 2011

how to call a function on key-next-item trigger. atlst the syntax.

View 2 Replies View Related

Forms :: How To Call A Java Function From Oracle

Sep 5, 2007

I am having Oracle 9.2.0.1.0 client in my PC and jdk version is 1.6

I had configured below tools in my PC. (windows 2000) I am having Oracle 9.2 with Oracle Developer Suite 10g (10.1.2.0.2) which contains Oracle JDeveloper 10g (10.1.2.1) also.

How to call a java function from Oracle forms? code samples and how to integrate those thing?

View 13 Replies View Related







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