Home » Developer & Programmer » Forms » dense_rank() in forms 6i
dense_rank() in forms 6i [message #283066] Mon, 26 November 2007 01:10 Go to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
I have a procedure thats uses DENSE_RANK() function in WHEN BUTTON PRESSED trigger.

I am using it as: dense_rank()over(order by b.v_no)in the code
WHen itry to complile it, it shows the error:

Encounter the sysmbol "(" when expecting on of the following:
,from.
The code runs well in sqlplus.
Re: dense_rank() in forms 6i [message #283119 is a reply to message #283066] Mon, 26 November 2007 02:58 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I *believe* (not because I'm religious, but because I can't test it myself) that it is because Forms 6i PL/SQL engine doesn't support DENSE_RANK function.
Re: dense_rank() in forms 6i [message #283128 is a reply to message #283066] Mon, 26 November 2007 03:10 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
It seems your belief is correct.
I created a procedure
create or replace procedure proc
as begin
execute immediate 'select dense_rank()over(order by v_no)rank
from bill_ent';
end;
I want to use this procedure in my trigger to achieve the same functionality as dense_rank() in pl/sql.
I want to use rank as a column in the insert into statement.

HOw can ido that?or Can ido that?
Re: dense_rank() in forms 6i [message #283140 is a reply to message #283128] Mon, 26 November 2007 03:29 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

I want to use rank as a column in the insert into statement.

Are you sure? What is the purpose of this column? Does it contain any useful information for records to be stored in the database? Wouldn't/shouldn't DENSE_RANK rather be used while writing a REPORT based on values stored in this table?
Re: dense_rank() in forms 6i [message #283164 is a reply to message #283066] Mon, 26 November 2007 04:08 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
I have columns in my intr_vch_tmp_dtl1 table.
v_no,gr_amt....etc..

I want to assign rank to the v_no such that the rank changes as the v_no changes.
Something Like this:
rank v_no sal
1 10 1000
1 10 500
2 20 200

For this purpose i a m using Dense_rank but since it is not supported in forms 6i,Is there any workaround to achieve the same functionality?
Re: dense_rank() in forms 6i [message #283182 is a reply to message #283164] Mon, 26 November 2007 05:47 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Once again, my opinion: it is useless to store this value in the database. If you insist on doing it, you'll have to code your own "dense_rank" function using PL/SQL.
Re: dense_rank() in forms 6i [message #283275 is a reply to message #283066] Mon, 26 November 2007 10:21 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
yes you are right.
I have to write the code to achieve the same functionality.
Re: dense_rank() in forms 6i [message #467317 is a reply to message #283066] Fri, 23 July 2010 05:09 Go to previous messageGo to next message
sqllion
Messages: 6
Registered: July 2010
Junior Member

Dense_Rank returns the rank as positive integers without any gaps in between the ranks. , it will assign the rank to the records as per the condition used in clause. Follow the link to know more...
http://www.sqllion.com/2010/07/dense_rank/
Re: dense_rank() in forms 6i [message #467327 is a reply to message #467317] Fri, 23 July 2010 06:10 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you didn't notice, but it is not that the original poster doesn't understand DENSE_RANK, but his inability to use it in Forms Builder ver. 6.
Previous Topic: disable shift+tab
Next Topic: failed to display photo
Goto Forum:
  


Current Time: Tue Apr 23 20:22:03 CDT 2024