Hi Sir, I have a question about a function that I call in a before-header process to redirect to the appropriate page. create or replace function redirect_page(p_user_name in varchar2) return varchar2 as v_redirect_url varchar2(100); branch_page table_1.PAGE%type; v_state table_1.STATE%type; v_finalpaper_id table_1.fpid%type; begin begin select fp.state, fp.page,fp.id into v_state, branch_page,v_id from table_1 fp left outer join users u on u.uuid=fp.uuid where lower(u.username)=lower(p_user_name); if v_state ='REQUESTED'then v_redirect_url:='f?p=100:95:&APP_SESSION.::NO::P95_ID:'||v_id; elsif v_state ='APPROVED'then v_redirect_url:='f?p=100:92:&APP_SESSION.::NO::P92_ID:'||v_id; end if; exception when no_data_found then v_redirect_url:='f?p=100:1:&APP_SESSION.::NO::'; end; return v_redirect_url; end; Now, when I call the function in the page, I get the 500 Internal Server Error DECLARE v_redirect_url VARCHAR2(100); BEGIN v_redirect_url:=redirect_page_finalpapers(:session_user_name); htp.init(); owa_util.redirect_url(v_redirect_url); apex_application.g_unrecoverable_error := true; END; I don't quite understand why this happening and would appreciate some help on here?
Discy Latest Questions
I have a form in my Oracle Forms application for Developing form i'm using Oracle Form Builder 10G,Now user has to write login id and password(authentication) to use the form i want to keep a button in the form so when user presses the button he is directly moved to oracle apex application without Writing login id and password(authentication) What i want to do is Once user does authecation in oracle forms application he doesnot have to authticate again in oracle apex
create or replace FUNCTION base64encode(p_blob IN BLOB) RETURN CLOB IS l_clob CLOB; l_step PLS_INTEGER := 12000; -- make sure you set a multiple of 3 not higher than 24573 BEGIN FOR i IN 0 .. TRUNC((DBMS_LOB.getlength(p_blob) - 1 )/l_step) LOOP l_clob := l_clob || UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(DBMS_LOB.substr(p_blob, l_step, i * l_step + 1))); END LOOP; RETURN l_clob; END; Please Explain this Function.
Hi Everyone, The below image is the Employee Attendance details in a table , How do i count the number of Present(P), Absent(A) and Week off(WO) days for a particular Employee using SQL Thanks in advance...
Hi I have to show oracle database table data in oracle apex interactive report. This table has a clob column(mime type: text/plain). I am able to successfully display clob data in oracle apex interactive report as guided in below post Displaying CLOB Contents in Oracle Apex Now, I should be able to edit clob column data and save the updated clob data back to database. But I am unable to do this. Can some one help with this?
Hello Sir, I created an interactive report based on a SQL-Query, I then wanted to insert another value from the table into this SQL query. However, when I tried to do this I got the following error: ORA-00904: "D". "SPID": invalid ID. I have already googled it and it says it could be because the wrong column name was entered or it would be solved if an alias was used, which I have already tried but still get the same error. I have also run the SQL query in the SQL command and it shows me the correct result. So what could be the cause of the error?
Hello Sir, I need some help with an interactive report: Here is the use case: I have a table form create table form (FORMID, COLUMN1 varchar2(50), MID NUMBER,MANID NUMBER); MID and MANID are foreign keys to the table MANAGER create table manager (MID number, COLUMN1 varchar2(30)); The manager can have different roles in the form. Depending on the role the id of the manager will be set in different columns of the table. However, all forms for which the manager has been entered,regardless of the role in the form, should still be displayed. Here is the table with some sample data: In the interactive report the manager with the id 15, should see both entries like this: I used the following sql query for the interactive report: SELECT * FROM FORM f LEFT OUTER JOIN MANAGER m ON m.MID = f.MID LEFT OUTER JOIN USERS u ON u.ID = m.ID LEFT OUTER JOIN MANAGER m2 ON m2.MID = f.MANID LEFT OUTER JOIN USERS u2 ON u2.ID = c.ID WHERE lower(u.username) = lower(:session_user_name) OR lower(u2.username) = lower(:session_user_name); and I also tried to use a union select * FROM FORM f LEFT OUTER ...