Application Express :: Looping Through Row Selector Exponentially Duplicating

Jul 15, 2013

Using Apex 4.2

 BackgroundCreated a Tabular Form based on a view. Removed all the default multi-row updates and deletions, buttons and processes.I am using a tabular form because of the fact that I can gain access to a row selector.The row data itself is all read only so in effect this is a report with a row selector.This is because I can't find a way to select a row an interactive report, well I can and did but this was a work around. ProblemI have created a button to process the selector to run the below code:

begin
kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'Selected Check Boxes:'||wwv_flow.g_f01(1)) ;
kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'Selected Check Boxes:'||wwv_flow.g_f02(1)) ;
   for i in 1..wwv_flow.g_f01.count
   loop
   kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'i:'||i) ;
      kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'WF ID:'|| wwv_flow.g_f02 (wwv_flow.g_f01.count)) ;
   end loop;
end;

I just wanted to see what would be output. For one row this works fantastically and I can find the ID based on the rowWhen I select more than one row the loop run's through for the number of rows but then also runs for the number of rows selected.So if I selected threee rows this above procedure would run three times, each times looping three times.I have set the execution scope to: For Created and Modified Rows in the button condition that appears.RequiredI only want to loop through the selected rows once per button clickORKnow which row I am currently looping through. 

View 3 Replies


ADVERTISEMENT

Application Express :: Edit Region Display Selector

Dec 7, 2012

Is possible to remove the "show all" of the Region Display Selector? How can i do this?

View 8 Replies View Related

Application Express :: Looping Checkboxes

Jun 15, 2012

How can I loop through unchecked checkboxes using this construction: FOR i IN 1 .. apex_application.g_f01.COUNT (its for checked)

View 5 Replies View Related

Duplicating DB In 10gR2 With RMAN Without Target DB

Dec 2, 2011

I would like to have some inputs on RMAN backup that we are planning to perform for the database that has to be now discarded; and which may have have to be restored in distant future.

Current Env--
DB Ver: 10gR2
OS: Solaris
Backup mode: RMAN WITHOUT CATALOG(i.e. using controlfile for storing rman info)

From what I know(I might be wrong), that for duplicating the 10gR2 DB to another machine we have to have the target(original) database running and connected. In my case we need to take the rman backup and then use the target db for fresh installation and hence the db will be deleted.

View 2 Replies View Related

Duplicating Multiple Rows - Getting Error?

Sep 9, 2008

I'm getting an error "SQL command not properly ended" with the following complex delete duplicates query.

DELETE FROM A_EMIS_TOXIC_DTL
WHERE exists
(
select dcf.MASTER_AI_ID,
dcf.INT_DOC_ID,
txd.SUBJECT_ITEM_CATEGORY_CODE,

[code]...

View 2 Replies View Related

Importing Data From Different Schema Without Duplicating Records

Apr 27, 2011

I'm trying to figure out how to import data from another schema for an oracle SQL project in an MIS Course.Each student/schema created the following tables STUDENT, FACULTY, COURSE, IS_QUALIFIED, SECTION, IS_REGISTERED. Each student was supposed to make up names and ID numbers for 20 different students, then use real university faculty, courses, and sections to populate the respective tables.

I need to import data from all of another student's tables, without duplicating any courses, faculty, etc I already have in my tables.

The other student already granted acess to her tables, so now I'm just having trouble with the insert statement. This is what I have so far for the first table.

INSERT INTO myschema.STUDENT
SELECT * FROM otherschema.STUDENT

I know i need to add a "WHERE" statement to successfully copy the other persons data into mine, without duplicating any results. This is the last part of this project and I'm having trouble finding the answer anywhere.

View 1 Replies View Related

Backup & Recovery :: Duplicating A Database With RMAN

May 6, 2013

I would like to duplicate to the different server Oracle Database with RMAN. I've configured flash recovery area for Oracle Database.
My questions are:

Source Server ( target ) : ORACLE_SID : DB11G
AUXILIARY Server (duplicate ): ORACLE_SID : CLONE

1- if backup files (autobackup and backup set)/ Archived Logs are in a different path on the source host (not default FRA Path) then how can I use the DUPLICATE command? BTW, only the flashback logs are in the default location (/u01/app/oracle/fra/flashback). Path: /u01/app/oracle/oradata/DB11G/autobackup and /u01/app/oracle/oradata/DB11G/backupset.

2 - Do I have to add *_CONVERT parameters for different SID as shown below? e.g. : DB_FILE_NAME_CONVERT , LOG_FILE_NAME_CONVERT.

DB11G.__java_pool_size=4194304
DB11G.__large_pool_size=4194304
DB11G.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DB11G.__pga_aggregate_target=155189248
[code]......

View 2 Replies View Related

SQL & PL/SQL :: To Get Rid Of Looping

Aug 17, 2010

The below sql is executed by reading the flat file row by row which is having more than 2 million rows.

SELECT CUST_SEQ_R, BANK_BRANCH_C INTO v_CustNo, v_BrnachCode
FROM TABLE1
WHERE ACCOUNT_NO = v_Acc_No
AND VIST_NO = v_VistnO
AND CUST_JOIN_DATE = to_Date(v_Cust_Date,'yyyymmdd');

The procedure opens the file, reads one record, parses it, then it executes few select statements then it loops back to the top where it reads one more record and runs through each activity again. How to read batch of records rather than one record at a time. Is something like creating staging table or by using bulk collect.

v_Acc_No,v_VistnO,v_Cust_Date are variables that read from below file.

test data:
BNC192363A1291197OQ6HA0H05557004559020080528
BNC194566A1280615VT8FA0H05917004016020080530
BNC192588A1263301VB2LE0G11065005707020080519
BNC178369A1295822MM4XB0G11820006839020080512

View 9 Replies View Related

SQL & PL/SQL :: Looping Through A Ref Cursor

Feb 16, 2008

I have a procedure which has an out value of a ref cursor (made up of different columns from different tables). I would like to call that procedure from another procedure and loop through each row.

I know how to call my stored procedure but I don't know how to loop through it.

View 5 Replies View Related

SQL & PL/SQL :: Straight Insert Instead Of Looping

Sep 24, 2012

I have a table with these rows,

Name No
one1
two2

Without using plsql looping constructs, how to achieve this in a simple sql statement?

View 5 Replies View Related

SQL & PL/SQL :: Looping External Tables?

Jul 31, 2012

I am using an external table with numbers and joining the external table to fetch data and Insert into another table.I am altering the table within procedure to pass csv file name as parameter as It'll change each time. It's working fine but in case if my grouping id is having two gids, then Header from csv file is also inserted as row in to coupon_personlization_members.

I gave skip 1 in external table but for second GID, header is inserted as row.I don't want header to be inserted as row but header will be there on csv file.

Here is my procedure :
CREATE OR REPLACE
PROCEDURE proc_coupon_load(
p_grouping_id NUMBER,
p_file_name VARCHAR2)

[code]..

View 4 Replies View Related

Forms :: Looping Records With Checkbox Value

Jun 17, 2013

I am Using the Check Box in the Detailed Block & I Have Assigned values 'Y' and 'N' when Checked & Unchecked If there are 3 Values Retrieved in the Detailed Block, Among that 2 Values are Checked the Cursor is Directly going the 2nd Value and Displaying the 2nd Value 2 Times rather than Displaying the 1st Value.

Below Attached is the Code Which i am Using.

GO_BLOCK ('ITEM_RESULT');
L_ITEM_CODE := :ITEM_RESULT.ITEM_CODE;--71720;--
first_record;
loop
message (' item id is '|| L_ITEM_CODE || '-' || :ITEM_RESULT.CHECKBOX);
if L_ITEM_CODE is not null and :ITEM_RESULT.CHECKBOX = 'Y' then
begin
[code]....

View 6 Replies View Related

Forms :: Looping Multiple Records In Blocks

Jul 31, 2012

I have two blocks, both are multi record block. 1st block is control block and second is database block. Both the blocks have same fields(Example: Location,Location_name,Location_Type). In the first block(Control Block) I have check box. My goal is when I check the checkbox and click on add button all the records which are selected in first block should go to second block.

View 3 Replies View Related

SQL & PL/SQL :: Improve Procedure Which Is Looping Through Query To Make Inserts

Oct 10, 2013

I am trying to improve a procedure which is looping through a query to make inserts.

FOR P IN (
SELECT O.TYPEID
,o.KEY
,O.ID
,O.NAME
,O.LGNUM
,O.LGNAME
[code]....

View 12 Replies View Related

JDeveloper, Java & XML :: Looping And Querying Data From XML Clob

Oct 14, 2013

Our company database is Oracle based and we use SQL Developer to pull out needed data.Using a snippet borrowed from a co-worker, I have put together a query that, among other things, pulls a list value out of an xml clob field and displays it in the query results. My query as it stands right now is below, followed by an example snippet of the xml clob that I am pulling from. The reason for the "query within a query" is because the base query could return multiple entries and I only want the one with the most recent date.

select * from
(Select Wtr_Service_Tag, Wtr_Tran_Origin, Wtr_Send_Date, Wtr_Receive_Date,
to_char(substr(wtr_req_xml,instr(substr(wtr_req_xml,1,8000),'SID')+8,12)) Asset_Tag
from ws_transactions
Where Wtr_Service_Tag In ('20458749610')
And Wtr_Req_Xml Like ('%CSM%')
Order By Wtr_Receive_Date Desc)
where rownum = 1;
[code]....

This query is only able to pull the first value in the list.How can I edit this query to pull all of the list items when there are more than 1 (preferably concatenated into one column in the query results)? I have another field, in a separate table, that I can pull from to get the number of list items.

This one may be more complex. As currently written, the query pulls a fixed number of characters from the xml clob and either returns not enough data, or too much because the values I need to pull could be of varying lengths. I have no way to query what those lengths might be.

View 28 Replies View Related

SQL & PL/SQL :: View Created With Compilation Errors / ORA-01775 - Looping Chain Of Synonyms

Jun 21, 2011

I created a view in DB2 .I copied the code of view from DB3 and created in DB1. The view got created but with compilation errors.

SQL>
SQL> CREATE OR REPLACE FORCE VIEW bala.cee_efacts_pie_order_v (cenumber,
2 installationid,
3 areanumber,
4 clli,
5 servicedate,
6 forecasttype,
7 jobid,
8 shippriority,
[code]....

I checked the status of view in user_objects , it was invalid.How to make it valid ?

View 11 Replies View Related

Application Express :: Pass Header Variable From OAM To Apex And Read It In Application?

Mar 4, 2013

We have integrated Oracle Access Manager 11gR1 with Oracle Apex 4.1. The OAM-Apex integration is working fine. Now we want an additional header variable to be passed from OAM to the Apex application. This new header variable will be user's sAMAccountName in Active Directory. OAM is integrated with AD and the AD users are successfully able to access the Apex applications.

The three header variables which are configure in OAM right now are:
Header variable name Value
1. OAM_REMOTE_USER $user.userid
2. OAM_REMOTE_USER_EMAIL $user.attr.mail
3. OAM_REMOTE_USER_GROUPS $user.groups

We need an additional header variable as mentioned below:
Header variable name: OAM_SAMACCOUNTNAME
Value: $user.attr.samaccountname

The new header variable was added in the OHS server's dads.conf file like shown below:
=========== dads.conf =============
...
PlsqlCGIEnvironmentList HTTP_OAM_REMOTE_USER
PlsqlCGIEnvironmentList HTTP_OAM_REMOTE_USER_GROUPS
PlsqlCGIEnvironmentList HTTP_OAM_REMOTE_USER_EMAIL
PlsqlCGIEnvironmentList HTTP_OAM_SAMACCOUNTNAME

But we are not able to read the value of this attribute in the Apex application.On the Apex application, we have a text box which shows the value of this header variable. This textbox is attached with the following stored procedure call to fetch the header variable:
===================
begin
:P1_HEADER_VALUE := owa_util.get_cgi_env( 'HTTP_OAM_SAMACCOUNTNAME' );
end;

The textbox shows the correct value if HTTP_OAM_REMOTE_USER is passed to the get_cgi_env method but does not shows anything when HTTP_OAM_SAMACCOUNTNAME is passed to the same method. if I am missing some configuration to pass the HTTP_OAM_SAMACCOUNTNAME haeder variable from OAM to Apex.

View 1 Replies View Related

Application Express :: Multiple Application Setup Using Session Sharing Within Workspace

Jan 24, 2013

I have multiple application set-up using session sharing within the workspace.Technically all works fine, however it does not play nice with user behaviour.

Example:
Users logs into APP_ID:100. Since he isn't authenticated yet, he provides user/pass and the APP_SESSION is authenticated.
Now if the user switches using to another application (using a link provided in application 100) he gets redirect to APP_ID:101:APP_SESSION all is fine.

The session is already authenticated, the application shares the session and the user gains access to app 101 without having to authenticate again. All's fine!

However users don't behave they way. Instead of using an easy link in the application. They will use their own bookmark or type in the url for app 101 manually. That way the next application is either called with f?p=101:1:[SOME OLD SESSIONID FROM BOOMARK] or f?p=101 (with no further page or session info) In both cases instead of using the already authenticated session apex spawns a new session, which of course isn't authenticated yet thus forcing the user to authenticate and come complaining they have to login again.

Similar behaviour problems exists when the user opens a browser and tries to open both applications in each in a tab next to each other.Both tabs fetch there own initial session id and start writing it to the same cookie each in turn invalidating the other tab's session.These can lead to some fanatic ping pong actions. Thus it's impossible to open 2 applications sharing session in the same browser.

Is there any remedy for these situations?Can apex be as smart as for instance first trying to resume the session stored in the cookie and only if that session is invalid, start a new session?

View 2 Replies View Related

Application Express :: Get Checked Options Values Via Application Global Arrays?

Apr 26, 2013

how to use checkbox item, and trying to get checked options values via application global arrays. So, this may be quite simple question, but I'm completely stuck here...

When I was looking through various threads and guides, I've encountered checkbox corresponding array names like "g_f01" - "g_f50". And so far i saw that these names are derived from item name in generated HTML code, for example:

<input type="checkbox" name="*f10*" value="3" />

And this one stands for array name "g_*f10*".However, when I tried to do the same thing - i receive item name which looks like "*p_v04*", and therefore, I can't figure out, which array name should I choose to adress it properly.

My generated HTML snippet:

<input type="checkbox" id="P6_ANSWER_0" name="*p_v04*" value="3"/>

View 2 Replies View Related

Application Express :: Display List Of All Users On Page / Accessing Or Using Application

Mar 23, 2013

i want to display a list of all users on a page those currently accessing or using the application. How do i accomplish this requirement?

View 1 Replies View Related

Application Express :: Login Error 7621 - Determine Workspace For Application?

Jul 5, 2013

APEX 4.0 Sometimes, I am getting the below error when I tried to logging into APEX workspace (after giving workspace name, User name and password), Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.

ErrorERR-7621 Could not determine workspace for application (:) on application accept. I found some threads related to this but in different way not exactly when I am getting this error. 

After 2 or 3 times, this error will not come and I can able to logging into workspace What is the cause for this issue?? 

View 1 Replies View Related

Application Express :: ORA-02291 / Constraint Wwv_flows_fk Violated While Application Import

Nov 4, 2013

Each time when I import an application into my workspace in local 10g XE using the APEX 4.2 Application Builder, I get the "ORA-02291, constraint wwv_flows_fk violated..". The application I whant to import  was originally exported from [URL]. I found out, that it has to to with wwv_flow_application_install.get_workspace_id in the installation script, which obviously returns NULL and not my current workspace id as I suppose it should. I replaced wwv_flow_application_install.get_workspace_id by '<my worskspace id>' and then the import does work. 

View 0 Replies View Related

Application Express :: Application Locking - Force Logout All Current Users And Prevent Login

Jun 12, 2012

I have an application that I'd like to prevent activity in after a certain time of day, say 3pm. Is there any way I can force logout of all current users and then prevent re-login until 9am the next day (short of deleting all of their login credentials and then recreating them the next morning)?

View 7 Replies View Related

Application Express :: How To Protect Oracle Application From Code Edit On Client Side Installation

Sep 12, 2013

We have developed an application for our clients,planning to deploy it in client server soon. we have plans to support the application in future,so we want to restrict the clients from any modifications. By Doubt is, 'build_status=Run only' alone,cannot protect our application from client developers to edit our application,

Because though we install our application as 'Run Only' at the time of installation in client instance,we can still import the original application and change the type to 'Build and Run Application',and run the new application as 'Build and Run'.(which is not supposed to) we want to make sure,if there is any way we can protect our application from modifications after client side installation.  

View 1 Replies View Related

Application Express :: Obtaining Custom HTTP GET / POST Parameters Of Variable Length In Application Process

Sep 5, 2013

I'm trying to connect a javascript UI control within my page to an APEX Application Process. The control calls the application process via AJAX and appends a variable number of GET / POST parameters to its URL.What is the best way to obtain these parameters from within the PLSQL procedure of the process? Or is there a better way to connect my javascript AJAX control to the Database behind my APEX app?

View 4 Replies View Related

Application Express :: Tree View On Application Builder Not Showing

Jul 16, 2012

I have some applications on Apex public workspace (apex.oracle.com), and suddenly the Tree View, on Application Builder stopped showing any content. If I select "Component View", I see the page components, but if I switch to tree view, it shows me only some empty frames.

View 2 Replies View Related

Application Express :: JSON Error When Trying To Redirect To Another Page In Same Application?

Jul 23, 2013

I'm trying to set up a PL/SQL dynamic action that is triggered by clicking on a button.  The dynamic action sets two values in a table and then I would like to redirect to another page.  Setting the values works fine.  The code is below: 

declarel_information varchar2(255) := :P94_FILENAME;BEGINcommit;UPDATE VDI_METADATASET CREATEUSERLISTNAME = l_information,    CREATEUSERLISTON = sysdate();commit;htp.init;owa_util.redirect_url('f?p=&APP_ID.:81:&APP_SESSION.::NO:::');END; The redirect fails with the following eror: "Error: parseerror: JSON.parse: unexpected non-whitespace character after JSON data" 

how to redirect to a page from within PL/SQL .  None of them result in success. 

View 2 Replies View Related

Application Express :: 4.2.0.00.27 Mobile Themes - Add Virtual Keyboard To Application?

Feb 12, 2013

I'm doing a small application in Apex 4.2.0.00.27 mobile themes.

Application is used to search for books.Will work on a PC Windows with touchscreen.

How do I add a virtual keyboard to my application?

View 6 Replies View Related

Application Express :: Error Importing Existing Application Into Production?

Aug 6, 2012

version 4.0.2.00.07

I had an error importing an application into Production that was exported from Development. The application exists and I was trying to replace it.

The error I received was:

ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.
ORA-20001: Error creating dynamic action sub-action name=&quot;NATIVE_JAVASCRIPT_CODE&quot; id=&quot;9503820976918886&quot;
ORA-02291: integrity constraint (APEX_040000.WWV_FLOW_PAGE_DA_A_AR_FK) violated - parent key not found<pre>
begin wwv_flow_api.create_page_da_event ( p_id =&gt; 9504132415918888 + wwv_flow_api.g_id_offset ,p_flow_id =&gt; wwv_flow.g_flow_id ,p_page_id =&gtI

opened the SQL that was created from the export utility and this is where it errored:

begin
wwv_flow_api.create_page_da_event (
  p_id => 9503820976918886 + wwv_flow_api.g_id_offset
,p_flow_id => wwv_flow.g_flow_id
,p_page_id => 6
,p_name => 'Add tooltip to Numeric filter operators'
,p_event_sequence => 40

[code]....

Unless I'm not understanding this error it means that it can find the ACTION part that is attached to the WHAT part of this Dynamic Action? The Dynamic Action does work when the application is run (in Development)also, there are 3 others that are similar to this one. The export was created by the export utility in the Application Builder.

If I export only the page and import that into Production the import is successful and the page runs correctly. This is error is happening only when I try to import the entire Application.There are many other changes made which is why I was trying to do an Application export/import instead of individual pages.

View 3 Replies View Related

Application Express :: Modify Form Layout Of Existing Application?

Feb 22, 2013

I have to modify the Form layout of an existing application (Application Express 4.0.2.) where the data for each field is retrieved using SQL statements

Presently the form looks something like this and the Data for each field is rendered properly in this layout:

UNIT # :         123456
ADMISSION #: 2012101510         DISCHARGE DATE:                 ADMISSION DATE:
FIRST NAME:   JON                     LAST NAME: DOEFIRST NAME, LAST NAME and UNIT # are all "Display Only" item type.

What I'm trying to do is to move "FIRST NAME" underneath "LAST NAME" and "UNIT #" next to "LAST NAME" This part is very simple. However, the issue I'm having is as soon as the "UNIT #" is moved next to "FIRST NAME", the data for "FIRST NAME" and "LAST NAME" simply disappear

This is how it looks
ADMISSION #: 2012101510         DISCHARGE DATE:                 ADMISSION DATE:
FIRST NAME:                             UNIT #: 123456
LAST NAME:   

I have played around for hours and even created from scratch a new page with a new form using SQL statements to pull the data for each field, only to get the same result.

View 7 Replies View Related







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