Forms :: Click Checkbox And Then Loop - Current Cursor Going To Last Record

Dec 7, 2010

i m using oracle 10g 10.2.0.2 version.i create a form and using check box on this form.when i click this check box then loop is using behind it.and current cursor is going to last record

i want if i click 4 record then cursor is still showing on 4 record mean i click which record after using loopmy current cursor is showing on that particular record

how it is possible

View 1 Replies


ADVERTISEMENT

Forms :: Cursor (control) On Current Record

Jul 18, 2011

In my form line level block contains 100 records.i will check the check box for line number 96 and 97. Then i will press save(I have written some logic here) button it will generate one number for selected check boxes. After generating this number cursor(control) should be on same line number 96 or 97.

View 10 Replies View Related

SQL & PL/SQL :: Cursor For Loop Updates Only One Record?

Feb 17, 2012

I have a table of 3 columns:

SQL> show user
USER is "ANDREY"
SQL>
SQL>
SQL>
SQL> --create the table:

[code]...

I insert rows into it:

SQL> --fill it with data:
SQL>
SQL> insert into a(key1 , key2) values (1 , 1);
1 row created.
SQL> insert into a(key1 , key2) values (1 , 5);

[code]...

i want to perform a logic by which:for every distinct value of key1 - values of key2 will be checked in all records holding that particular key1 value, and update the key3 field to 'inactive' where the key2 value for that particular key1 is the highest in number.

i've found out that i could do it by an SQL statement:

update a
set key3 = 'inactive'
where key2 = (
select max(key2)
from a a2 where a2.key1=a.key1
);

however I wanted to use the cursor to "load" the max key2 values FOR EACH distinct key1 value exists in the table,and do the same thing as the update statement above WITH A CURSOR,So tried and wrote the following:

SQL> create or replace procedure proc1
2 IS
3
4
5 var1 a.key1%type;

[code]...

unfortunately, it works only for one row, and i don't understand what's wrong, I executed, and checked what has changed:

SQL> exec proc1;
PL/SQL procedure successfully completed.
SQL> select * from a;
KEY1 KEY2 KEY3
---------- ---------- ----------
1 1 active
1 5 incative
2 24 active
2 21 active

ORA-01034: ORACLE not available

View 10 Replies View Related

Application Express :: Checkbox On Click Action

Jan 15, 2013

I am working in apex 4.2.1.

I'm having an odd problem with a checkbox on a tabular form. I created the checkbox by setting hte display as to "Simple Checkbox". The value of the underlying column sets to "Y" wehn checked and "N" when unchecked. This is what I want. The next thing I was trying to accomplish is to call a javascript function when the checkbox is clicked. So I put onclick="calculateTotal(this);" in the element attributes field. The code that it is calling is listed below. When I run the app and check the box I can seee I am entering the calculate Total function. Each of the alert functions is displaying what I would expect until I get to alerts 'IAH5' and 'IAH6'. For each of those I get an "undefined" in the alert.

So to see if this had something to do with the checkbox and added an onchange="calculateTotal(this);" to another field in my tabular form and ran it. This time I did not click on the checkbox but went into the field that I put the onchange on. When I changed this field and navigated away from it the function worked as I would expect. It displayed the appropriate values for each of the alerts and updated the fields on the screen as designed.

<script type="text/javascript">
function calculateTotal(pThis)
{
alert('IAH1');
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
alert('IAH2');
[code].......

View 6 Replies View Related

Forms :: When Click On Button Fetch Only One Record?

Sep 9, 2010

i create form in which first block is non database having 2 items from_date and to_date and one button is there.when i click on button i.e when button pressed new window is open having new database block

i write code on when button pressed

HIDE_WINDOW('XX_RFQ_FIND');
SET_WINDOW_PROPERTY('XX_RFQ_FIND', visible, property_false);
SHOW_WINDOW('XX_RFQ_ACKT');
GO_ITEM('LE_NAME');
SEARCH_REQ;

[code]...

my problem is that when i click on button i fetch only one record

View 3 Replies View Related

Forms :: Uncheck Checkbox In Multi-record Block?

Sep 14, 2011

Could i uncheck the checked checkboxes in a mutirecord block by any command?

View 1 Replies View Related

Forms :: Display Alert When Click On Insert Record In Tool Bar?

Jun 26, 2013

I want to display an alert when we click on Insert Record in tool bar. I put allow update->yes and insert->no.

but when i click on the insert record in tool bar it showing message only.

Instead of message I need an alert using triggers. I added the image also.

View 1 Replies View Related

Forms :: Display All Records One By One As User Click On Next Record Button

Jul 13, 2010

I have created one tab canvased form

On first tab I am taking input (search criteria)
on that input i am trying to display all records one by one as user click on next record button....

for that i used when-tab-page-change trigger for first record display and it display correctly.but for further record what should i need to write on next_record command button so all record i can see one by one.

View 1 Replies View Related

Forms :: Open Form On Specific Record After Click On List Button

Dec 31, 2010

I have a list box from which the user can select a client's name, I want them to be able to press a button next to the box which will then open another form and display all the client's details. How do I attach a button to a list box? and how can I call another form to open on a specific record?

View 3 Replies View Related

Forms :: How To Get Current Cursor Position In Oracle 10g Form

Feb 25, 2010

I want to get current mouse cursor position dynamically,what should i do.

View 3 Replies View Related

Forms :: Loop To Commit More Than 1 Record?

Jul 3, 2010

i made this loop to commit the same item but depend on the count of suppliers to set the same item every time to different supplier . but the problem this code commit only the first sypplier but not any othere one ..

code : { key - commit - trigger }
declare
var_record_count number ;
VAR_p_request number;
begin
var_record_count:= get_block_property('control',CURRENT_RECORD);

[code]....

View 2 Replies View Related

Forms :: How To Display Current Record

Mar 12, 2013

I have problem about displaying current records with same table(tbl_pawnitem). I have 2 transactions which are the pawned transaction and for sale transaction. and both transactions save into tbl_pawnitem table..i want to display only in my list the for sale transaction without deleting the records of pawned transaction. what condition i will use?

View 5 Replies View Related

Forms :: Current Record Indicator

Aug 25, 2011

set the current record indicator for my tabular data block.

View 1 Replies View Related

Forms :: Insert Value Into Text Field On Current Cursor Position?

Sep 30, 2013

I need to copy some text value in to a multi-line text item on the current cursor position.

View 8 Replies View Related

Forms :: How To Focus On Current Record In Oracle

Jul 4, 2011

How to focus on current record in oracle forms.

for ex:- I have 10 records in line level.i want to focus my cursor on particular like (5th record) how to possible in form.

Is there any built-in like current_record?

View 4 Replies View Related

Forms :: FRM-41344 OLE Not Defined For SCAN In Current Record

Jun 1, 2010

my problem is this that i have developed a form.fmb in 6i for images scanning direct from scanner but its generating error something like that "FRM-41344 OLE not defined for SCAN in the current record"

li have a winxp enviroment i have already downloaded and installed "IMAGING FOR WINDOW"(GLOBAL 360) but despite this its not working same error is still there .

one more thing why imgscan.ocx is not registering in winxp.

View 3 Replies View Related

Forms :: Make A Field As Mandatory At Current Record Level

May 27, 2010

I have one requirement i.e i want to make a particular item as mandatory for the current record in the tabular form.

so i have written code as below:

DECLARE
lv_item item;
BEGIN
lv_item := FIND_ITEM ('XXMZ_DETAIL.QTY_ACT');
SET_ITEM_INSTANCE_PROPERTY (lv_item,
current_record,
required,
property_true);
END;

This code is not effecting qty field. If i write set_item_property built-in that item becomes mandatory.But it's not effecting at current record level.It's effecting block level.

So how can i make a field as mandatory at current record level?

View 7 Replies View Related

SQL & PL/SQL :: When Where Current Clause Is Used In Updating Or Deleting In Loop

Jul 1, 2013

when 'where current clause' is used in updating or deleting in loop.... is it required to write commit in the loop or it will auto commit?

View 2 Replies View Related

Forms :: Delete A Record In A Cursor

Mar 3, 2012

this is just the continuation of my previous topic,

After I bound data into the textboxes, now I want to delete it when I mistakenly click on the same data twice.

this is my screenshot:

View 4 Replies View Related

Forms :: Updating A Record In A Cursor?

Mar 3, 2012

when I updated a record in my form check my screenshot: and clicked save button the result was:

as you can see in the message at the bottom, it has 18 records. And since my original data(subjects) are just 9. And also the grades that I input didn't display all.

This is my code in when-new-block-instance trigger:
DECLARE
CURSOR studgrade_cur IS
SELECT e.student_id, s.subject_code --, g.grade

[code]...

View 39 Replies View Related

Forms :: Two Cursor Record Block - Decode Function

Sep 16, 2010

I have Two cursor record block..which is attached in form..

My TASK IS

In my first Block, When DBCR Column = 'D' Then in backend this column value should be save as a '1'
WHEN DBCR Column = 'C' Then Then in backend this column value should be save as a '2'

My Both Field is on Data Block...

In Property palette of this field can we write any decode condition..so it reflects directly on database.

View 2 Replies View Related

SQL & PL/SQL :: Cursor For Loop

Jul 30, 2012

When a cursor returns no records, how to handle this in Cursor for loop..

I had given sample code for handling this by using normal open,fetch statement, provide by applying for -Cursor For loop

DECLARE
P_BU_ID NUMBER;
P_SUMRY_DATA_TY_ID NUMBER;
P_OP_DATE VARCHAR2(32767);
P_PROC_DATE VARCHAR2(32767);
P_FIN_YEAR NUMBER;
[code]........

View 3 Replies View Related

SQL & PL/SQL :: Cursor FOR Loop?

Jun 15, 2012

I am an experienced SAS programmer jumping into PL/SQL for the first time and have already encountered a problem.Let's assume I have 7 records (shown below). (In reality, I have millions of records, but the concept's the same.) The Value field is only populated when it changes. Therefore, I am forced to "fill in the gaps" as I read the data file. It's fairly straightforward. I carry the value foward one record at a time, using it if the Value field in not populated. The ANSWER I want is also shown.

In reading through a PL/SQL book, I realized that only 2 chapters are relevant to what I do. My guess is this solution involves cursors; probably a Cursor FOR loop,

ID Year Amt ANSWER
1 2010 200 200
1 2011 ..... 200
1 2012 ..... 200
2 2009 300 300
2 2010 ..... 300
2 2011 450 450
2 2012 ..... 450

View 5 Replies View Related

Loop Inside Cursor

Sep 11, 2012

I have a cursor returning some value.

for each value returned by the cursor i need to traverse through 31 rows(1 row per day * no of days in the month).

E.g. if cursor returns service_name as xyz then for xyz there can be 31 rows(service may not be used on some days)

I need to go to all of them and take some values and move them to a flat file. how should that be done?

Attached File(s)
Query.png ( 20.99K )
Number of downloads: 9

View 1 Replies View Related

SQL & PL/SQL :: Inner And Outer Loop In Cursor?

Jul 9, 2013

BEGIN
FOR i IN 1 .. 10
LOOP

[Code]....

Assume the above is my code; there is inner and outer block.

Currently if inner block is failed, the outer block also going to exception block

But, my requirement is if inner block is failed it should not go to outer block, still the loop should continue and print 1...10 rows

View 9 Replies View Related

SQL & PL/SQL :: Loop Through Db_links Via Cursor

Jun 10, 2013

I am trying to retrieve info from multiple DBs and insert into a central DB via DB LINKS.The links are retrieved via a cursor.

However I keep coming up against 'PL/SQL: ORA-00942: table or view does not exist'...how to handle db_links using a cursor in a pl/sql block? The code is as follows:

DECLARE
db_link_rec VARCHAR2(30);

CURSOR db_link_cur IS
SELECT DB_LINK
from MESSAGING_PROD_LIST;
[code]....

View 3 Replies View Related

SQL & PL/SQL :: How To Use Ref Cursor Values In For Loop

Nov 19, 2011

I am having a scenario where i have a ref cursor opening and fetching though dynamic sql query. And those values which i get from ref cursor i want to use them for other parameter cursor in for loop.

for example

PROCEDURE script (
p_account_no IN VARCHAR2,
p_from_date IN DATE,
p_to_date IN DATE,
p_subledger_code IN VARCHAR2,
p_posted IN VARCHAR2,
v_alloc_unalloc IN OUT alloc_unalloc, -- ref cursor declared in package specification.
[code]..........

View 12 Replies View Related

SQL & PL/SQL :: Parametrized Cursor For Loop?

Apr 20, 2011

declare cursor c_abc (v_eno in varchar2,v_ename in varchar2) is
select empno,ename from emp
where empno=v_eno
and ename=v_ename;
v_eno emp.empno%type;
v_ename emp.ename%type;
begin
for re_ab in c_abc(1,'Dummy') loop
dbms_output.put_line( to_char(re_ab.v_eno)||' - '|| re_ab.v_ename);
end loop;
end;
/

I am getting error message ORA:06550
V_ENO must declared ..

Parameterized cursor for loop ..

View 3 Replies View Related

SQL & PL/SQL :: Can FOR Not Be Used To Loop Through Records Of A Ref Cursor

Jul 1, 2011

I wrote the following block :

set serveroutput on
declare
rec employees%rowtype;
cur SYS_REFCURSOR;
begin
open cur for 'select * from employees where rownum<:a' using 4;
for i in cur
[code]....

It gave errors if we execute is as such, but worked when I commented out the for loop and instead de-commented the simple loop. Does that mean that FOR cannot be used to loop through the records of a ref cursor ?

View 14 Replies View Related

SQL & PL/SQL :: SELECT From Within A CURSOR LOOP

Nov 19, 2010

I am not an Oracle programmer but I have been given a task to produce a number of Text files from an Oracle table based on a selection from the table itself.The table consists of many records with a currency code and I need to extract the data into named files based on the currency code.My first idea was to use Cursors and try a select statement matching on the returned value of the cursor but no Joy I can't make it work - perhaps I need to take a new approach.

Current / latest attempt below

DECLARE
CURSOR tmp_splitter_cur IS
SELECT DISTINCT end_consumer_country
FROM tmp_splitter
WHERE 1 = 1;
currency_rec tmp_splitter_cur%ROWTYPE;
[code]....

View 6 Replies View Related







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