order by non-database item [message #135939] |
Mon, 05 September 2005 00:44 |
rzkhan
Messages: 370 Registered: March 2005
|
Senior Member |
|
|
Hi all. I am trying to use order by property of the non database item in a database block. as below
set_block_property(----,order_by,:block.non_data_base_colmumn)
It clears the block instead of order by. Plz guide me..
Thanks
Riaz
|
|
|
|
|
|
|
Re: order by non-database item [message #392630 is a reply to message #392403] |
Wed, 18 March 2009 12:36 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
You want me to create a view on both 'curr_assgn' table and 'persons' table from where iam getting values for NAME field??
i have retrieved all the records.
after retrieving all the records, i want to sort the NAME field by clicking on a sort button. thats what iam unable to do.
thanks littlefoot for your quick response. i hope you could solve my problem.
|
|
|
Re: order by non-database item [message #392632 is a reply to message #135939] |
Wed, 18 March 2009 12:57 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
That's easy if the item you want to order by is a database item.
Just change the order_by property of the block and re-query.
You still need to employ one of David's suggestions to make your item a db item though.
|
|
|
Re: order by non-database item [message #392935 is a reply to message #392632] |
Thu, 19 March 2009 13:08 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
'Name ' field is not a database item. its getting value from a view called perpal_v. and NAME field is on a datablock whose table is 'Curren_assgn'.
perpal_v view is created on a group of tables called 'persons, and 'person_al'.
so you want me to create a view by joining 'currn_assgn','persons','person_al' ?????
and then give that view's name in 'query datasource name' property of that datablock??
is there any other solution??
please help me.
|
|
|
Re: order by non-database item [message #392938 is a reply to message #392935] |
Thu, 19 March 2009 13:21 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
nastyjillu wrote on Thu, 19 March 2009 18:08 |
so you want me to create a view by joining 'currn_assgn','persons','person_al' ?????
|
Maybe?
You need to write a view that gets all the data you need. You know what that data is and where it comes from, I don't.
Quote: |
and then give that view's name in 'query datasource name' property of that datablock??
|
Yes
Quote: |
is there any other solution??
|
Base the datablock on a stored procedure
|
|
|
Re: order by non-database item [message #392950 is a reply to message #392938] |
Thu, 19 March 2009 15:21 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
i created a view and gave 'query data soure name' property as view name. but when i compiled, it gives below error:
FRM-30100: Block must have at least one primary key item.
Block: CA
Form: PMDWAP
FRM-30085: Unable to adjust form for output.
|
|
|
|
Re: order by non-database item [message #393193 is a reply to message #393031] |
Fri, 20 March 2009 12:31 |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
i gave primary key. iam not getting any errors while compiling. but when i deployed, i got error in the application when i tried to open CA block. error is given below
FRM-40505:ORACLE error :unable to perform query
when i tried to query CA block it gives below error:
table or view doesnt exist.
i replaced the old table name with view name in all places. even though iam getting that error. might be in PLL i have table name that i dont have permission to change.
|
|
|
Re: order by non-database item [message #393236 is a reply to message #393193] |
Fri, 20 March 2009 15:44 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Run the form again. When the error appears, go to Help menu and select "Display error" - see what's in there (and, eventually, post it back here).
|
|
|