Home » Developer & Programmer » Forms » Fetching the records
Fetching the records [message #134256] Wed, 24 August 2005 01:58 Go to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Dear Sir,

I have two blocks. One is database block and other is non database block. I want to show the record of the table in a non database block. I have written the cursor like this but it is fetching a last record only. I want all the records which satisfy the sql query. The cursor for that is like this :

DECLARE
depcnt number;
cursor c1 IS SELECT stone_code,used_carat,used_diamond,size_of
FROM diamond_return_detail
WHERE design_no=:electro_PLATING_return.design_no and counter=:electro_PLATING_return.counter;
BEGIN
select count(*)
into depcnt
from diamond_return_detail
WHERE design_no=:electro_PLATING_return.design_no and counter=:electro_PLATING_return.counter;
IF depcnt > 0 then
OPEN c1;
FIRST_RECORD;
LOOP
FETCH c1 into :stone_return.STONE_CODE,
:stone_return.USED_CARAT,
:stone_return.USED_DIAMOND,
:stone_return.SIZE_OF;
EXIT WHEN c1%NOTFOUND;
END LOOP;
END IF;
CLOSE c1;
END;

What i have to do please advise. it is urgent pls help.

samit gandhi
Re: Fetching the records [message #134262 is a reply to message #134256] Wed, 24 August 2005 02:21 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Mr. David,

I have also tried to make one extra block and doing execute query but in this case the block must be database block. And i dont want to save the another block so it gives error in the time of saving it.

samit gandhi
Re: Fetching the records [message #134269 is a reply to message #134262] Wed, 24 August 2005 02:34 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Then make that second block a 'query only' block.

David
Re: Fetching the records [message #134279 is a reply to message #134269] Wed, 24 August 2005 03:09 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

how to make the block query only

samit gandhi
Re: Fetching the records [message #134290 is a reply to message #134279] Wed, 24 August 2005 03:52 Go to previous message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Dear David,

THanks i have done it.

Samit gandhi
Previous Topic: how to assign select query to lov at runtime
Next Topic: ...Next_record. to get the next value
Goto Forum:
  


Current Time: Fri Sep 20 03:30:58 CDT 2024