Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How to open a PDF output directly when click of a SubmitButton in OAF ?
Hi Waqas, it's applicable by using Standard API [code]fnd_webfile.get_url (file_type => fnd_webfile.request_out, -- for output file. Use request_log to view log file ID => l_request_id, gwyuid => l_gwyuid, two_task => l_two_task, expire_time => 500 -- minutes, security!. );[/code] notRead more
Hi Waqas,
it’s applicable by using Standard API
[code]fnd_webfile.get_url
(file_type => fnd_webfile.request_out,
— for output file. Use request_log to view log file
ID => l_request_id,
gwyuid => l_gwyuid,
two_task => l_two_task,
expire_time => 500 — minutes, security!.
);[/code]
note : there are two profile options this API must take as following
l_gwyuid : Gateway User ID
[code]oadbtransactionimpl.getAppsContext().getEnvStore().getEnv(“GWYUID”)[/code]
l_two_task: Two Task(TWO_TASK)
[code]oadbtransactionimpl.getAppsContext().getEnvStore().getEnv(“TWO_TASK”)[/code]
you can register out parameter of calling this API to String variable then use
[code]pageContext.sendRedirect[/code]
Hope this helpful 🙂
How to Put session parameter on link oracle OAF ?
Hello Aashish, There are three common means of passing parameters between pages : Request Transaction Session and you can use VO attributes for passing values Values stored in VO attributes are available in all pages within the transaction with same Root AM. URL Parameters : Encryption and EncodingRead more
Hello Aashish,
There are three common means of passing parameters between pages :
Request
Transaction
Session
and you can use VO attributes for passing values
Values stored in VO attributes are available in all pages within the transaction with same Root AM.
URL Parameters : Encryption and Encoding
When we are passing parameters in URL, following need to be considered:
[code]
See less{@Attr} – encodes. Changes Prince Kapoor to Prince%20Kapoor
{!Attr} – encrypts. Encrypts sensitive information.
{$Attr} – plain token substitution (no encoding or encryption)
{@@RETURN_TO_MENU} – Used for E-Business Suite Personal Home Page. Same as OAWebBeanConstants.RETURN_TO_MENU_URL.
{@@RETURN_TO_PORTAL} – Return the user to a launching Portal page. Same as OAWebBeanConstants.RETURN_TO_PORTAL_URL.
[/code]
How to query a CLOB column in Oracle SQL ?
Hi Albert, You can use DBMS_LOB.substr like this for example: DBMS_LOB.substr(column, 3000) but don't forget that substring of a CLOB column has size/buffer restrictions sometimes you would need to set the BUFFER to a larger size. For example while using SQL Plus use the SET BUFFER 10000 to set it tRead more
Hi Albert,
You can use DBMS_LOB.substr like this for example:
but don’t forget that substring of a CLOB column has size/buffer restrictions sometimes you would need to set the BUFFER to a larger size.
For example while using SQL Plus use the SET BUFFER 10000 to set it to 10000 as the default is 4000
and you can refer to Oracle Substr Function Article for more information about the substr function
See lessError ORA-00933: SQL command not properly ended – update
hello, here you can find the cause and action to correct your statement : Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certaRead more
hello,
here you can find the cause and action to correct your statement :
Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certain order.
Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for indented lines and delete these spaces.
you can use :
[code]
UPDATE employees e
SET e.last_name = ‘test’
WHERE e.department_id = (SELECT d.department_id
FROM departments d
WHERE d.department_id = e.department_id);
[/code]
Return more than one row from stored procedure in pl/sql
hello aya, as you know the procedure you can't use inside query so if you need to create procedure to return multiple row or values you can use : create or replace procedure myprocedure(retval in out sys_refcursor) is begin open retval for select employee_id,last_name from employees; end myprocedureRead more
hello aya,
as you know the procedure you can’t use inside query so if you need to create procedure to return multiple row or values you can use :
create or replace procedure myprocedure(retval in out sys_refcursor) is
begin
open retval for
select employee_id,last_name from employees;
end myprocedure;
and here you can call procedure inside anonymous pl/sql block :
[code]
DECLARE
myrefcur SYS_REFCURSOR;
employee_id employees.employee_id%TYPE;
last_name employees.last_name%TYPE;
BEGIN
myprocedure (myrefcur);
LOOP
FETCH myrefcur INTO employee_id,last_name;
EXIT WHEN myrefcur%NOTFOUND;
DBMS_OUTPUT.put_line (‘Employee Id: ‘ || employee_id || ‘ Last Name: ‘|| last_name);
END LOOP;
CLOSE myrefcur;
END;
[/code]
hope this help.
See lessWhat is the difference between schema and user ?
SCOTT is a schema that includes the EMP, DEPT and BONUS tables with various grants, and other stuff. SYS is a schema that includes tons of tables, views, grants, etc etc etc. SYSTEM is a schema..... Technically -- A schema is the set of metadata (data dictionary) used by the database, typicalRead more
SCOTT is a schema that includes the EMP, DEPT and BONUS tables with various grants, and other stuff.
SYS is a schema that includes tons of tables, views, grants, etc etc etc.
SYSTEM is a schema…..
Technically — A schema is the set of metadata (data dictionary) used by the database, typically generated using DDL. A schema defines attributes of the database, such as tables, columns, and properties. A database schema is a description of the data in a database.
See lessORA-29280: utl_file.fopen invalid directory path with directory
utl_file.fopen takes the name of a directory, not the path. For example: (you may need to login as SYS to execute these) [code]Windows: CREATE DIRECTORY CUST_DIR AS 'C:'; Linux CREATE DIRECTORY CUST_DIR AS '/usr/tmp'; GRANT READ ON DIRECTORY CUST_DIR TO SCOTT;[/code] Then, you can refer to it in theRead more
utl_file.fopen takes the name of a directory, not the path. For example:
(you may need to login as SYS to execute these)
[code]Windows:
CREATE DIRECTORY CUST_DIR AS ‘C:’;
Linux
CREATE DIRECTORY CUST_DIR AS ‘/usr/tmp’;
GRANT READ ON DIRECTORY CUST_DIR TO SCOTT;[/code]
Then, you can refer to it in the call to fopen:
[code]
UTL_FILE.FOPEN(‘CUST_DIR’, ‘oraask_test.txt’, ‘W’);
[/code]
hope this help.
See lessError: PLS-00103: Encountered the symbol when trying to compile
You need to change ELSEIF to ELSIF . your code would be like this : [code]declare CURSOR abc IS select * from all_Objects; begin for rec in abc loop if rec.object_id is null then null; elsif rec.owner is null then null; end if; end loop; end;[/code]
You need to change ELSEIF to ELSIF .
your code would be like this :
[code]declare
See lessCURSOR abc IS select * from all_Objects;
begin
for rec in abc
loop
if rec.object_id is null then
null;
elsif rec.owner is null then
null;
end if;
end loop;
end;[/code]
What is the difference between procedure and function in PL/SQL?
1. Procedure may or may not return value where as function should return one value. 2. Function can be called from SQL statement where as procedure can't be called from the SQL statement. 3. Function are normally used for computation where as procedure are normally used for executing business logic.Read more
1. Procedure may or may not return value where as function should return one value.
2. Function can be called from SQL statement where as procedure can’t be called from the SQL statement.
3. Function are normally used for computation where as procedure are normally used for executing business logic.
4. Stored procedure is pre-compiled execution plan where as function are not.
5. We can call function within procedure but we can not call procedure within function.
6. A FUNCTION must be part of an executable statement, as it cannot be executed independently, whereas procedure represents an independent executable statement.
and for example of both syntax of function and procedure :
[code]CREATE OR REPLACE PROCEDURE test_proc
(p_id IN VARCHAR2) as begin … end
CREATE OR REPLACE FUNCTION test_func
(p_id IN VARCHAR2) return varchar2 as begin … end[/code]
hope this help.
See lesshow to check if the column value is number or character
one example to create a function to return 'Y' if parameter value is number otherwise which is exception in this case to return ('N') ex: [code]CREATE OR REPLACE FUNCTION is_number (p_string IN VARCHAR2) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE IS l_num NUMBER; BEGIN l_num := TO_NUMBER (p_strinRead more
one example to create a function to return ‘Y’ if parameter value is number otherwise which is exception in this case to return (‘N’)
ex:
[code]CREATE OR REPLACE FUNCTION is_number (p_string IN VARCHAR2)
RETURN VARCHAR2
DETERMINISTIC
PARALLEL_ENABLE
IS
l_num NUMBER;
BEGIN
l_num := TO_NUMBER (p_string);
RETURN ‘Y’;
EXCEPTION
WHEN VALUE_ERROR
THEN
RETURN ‘N’;
END is_number;[/code]
and here you can call the function created above to identify the value passed is number or not like :
[code]SELECT (CASE
WHEN (is_number (mycolumn) = ‘Y’)
THEN
‘your column value is number’
ELSE
‘your column value is not number’
END)
FROM myTable;[/code]
hope this help you.
See less