Count Query [message #165690] |
Fri, 31 March 2006 08:51 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
lailakhalid
Messages: 7 Registered: March 2006 Location: LUTON
|
Junior Member |
|
|
Can someone please tell me how to qwrite pl/sql code to count number of records an return the value on the customised alert message.
|
|
|
|
Re: Count Query [message #166403 is a reply to message #165690] |
Thu, 06 April 2006 03:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
hidayatk
Messages: 25 Registered: November 2005
|
Junior Member |
|
|
-- copy&paste this code in 'when_button_press'....(not n post query)
-- code'll display all records in data table
-- to display records retrived to block, u can use other query built-ins
declare
a number;
num_records number;
begin
select count(*) into num_records from schema.table;
go_block('desired_block');
-- if forms is multi-blocks, set blocks' navigation style property to 'change data block'
execute_query;
set_alert_property('desired_alert', alert_message_text, 'Total Reords in table:'||to char(num_records));
a:=show_alert('desired_alert');
end;
-- ----------------------- or ----------------------------------
-- count_query
-- any where u use 'execute_query', write simply 'count_query'
-- get message text that results from,
-- include it in alert (set_alert_property)
-- display alert
[Updated on: Thu, 06 April 2006 23:13] Report message to a moderator
|
|
|
|
|
|
|