How to use the "Order by" clause dynamically on values LOV Forms 10g r2
HelloI have following requirement, please guide me.
1. create a list of values with 2 fields, Code and Description
2. do not use the command clause contained in the registration request Group
3. fix this LOV on a form field
4. when the user calls the user LOV will see two fields in LOV with header as Code and Description
5. when the user clicks the column header "Code" then LOV should be arranged on Code
6 and if the user clicks on the header of the column "Description" then LOV must be sorted on the Description
Thanks in advance.
Please post this problem in this forum->
[Formulas Forum | http://forums.oracle.com/forums/forum.jspa?forumID=82]
And close this thread by he scored as replied. ;)
Kind regards.
LOULOU.
Tags: Database
Similar Questions
-
How to use the order by clause
Hi Al
order_tracker1 is a tabular_block that I use this to search I want to order by when I search by serch_value
Please guide
The code given is used to find
declare
l_where varchar2 (4000);
Start
If: search_type = "ALL" then
l_where: = ' id | party_name | COMMENT1 | del_date like "%' | : serch_value | » %''' ;
on the other
l_where: =: search_type |' as "%' | : serch_value | » %''';
end if;
set_block_property ('order_tracker1', default_WHERE, l_where);
go_block ('order_tracker1');
execute_query;
end;
Thanks and greetings
Vikas SinghalHai,
Change the line set_block_property ('order_tracker1', default_WHERE, l_where); TO
set_block_property ('order_tracker1', default_WHERE, l_where |) "order by serch_value");
or in time design, you can give in the palette of the ORDER BY Clauesproperty.
or you can write to set_block_property (ORDER_BY, 'order_tracker1', 'serch_value');
Kind regards
Manu.
If this answer is useful or appropriate, please mark. Thank you.
-
How to remove the Order By clause
How can I get rid of the Order By clause in the underlying SQL query? I created a simple hierarchy, but when I use the hierarchy in the analysis and then come down, the results show multiple occurrences of each child. For some reason, I was able to reduce the number of occurrences of each child by adding a saved filter.
I was expecting this:
Instead, I got this:
The generated physical query looks like this:
SET VARIABLE QUERY_SRC_CD = "report"; SELECT s_0, s_1, s_2, s_3, s_4 s_5, (FROM s_6)
SELECT
s_0 0,.
CAST (NULL AS VARCHAR s_1 (1)).
"Registration - College". «Dimensions of the inscription '.» "' Exercise ' s_2,.
'All the colleges' s_3,.
IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_4 all Colleges").
MOUNT s_5 (NULL AS DOUBLE),
"Registration - College". "" Counties of schooling. "" Full-time student "s_6
"REGISTRATION - College".
UNION ALL
SELECT
1 s_0
"Registration - College". «Dimensions of the inscription '.» "" Name of College "s_1,.
"Registration - College". «Dimensions of the inscription '.» "' Exercise ' s_2,.
'All the colleges' s_3,.
IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_4 all Colleges").
IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_5 College ').
"Registration - College". "" Counties of schooling. "" Full-time student "s_6
"REGISTRATION - College".
WHERE
("Registration - College". «Dimensions of the inscription '.» ("' Exercise ' IN ('201213')) AND (IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". (("' Colleges ') (1))
) djm ORDER OF 1, 3 ASC NULLS LAST, 4 ASC NULLS FIRST, 5 ASC NULLS FIRST, 2 ASC NULLS FIRST, NULLS FIRST CSA 6
EXTRACT FIRST 10000000 LINES ONLY
HI mbengue,.
Check the report you are running any column presentation sorted in the user interface (in which case the order by clause will creep into generated sqls Physics). Also, I think that its worth it to check the settings of the hierarchy you have configured and if the installation program for the calculation of the measured column (number of students in this case), has been done correctly.
Kind regards
Arko
-
How to use "the location in" Clause
Hi all
I have an example of how to update the slider, I need to change this cusror help for update & where clause currecnt... Here I use the same table for update
Thanks in advanceCREATE OR REPLACE PROCEDURE sample_test AS v_name VARCHAR2(240); V_number VARCHAR2(30); v_address VARCHAR2(50); CURSOR c1 is SELECT * FROM Employees where Name is not Null; BEGIN BEGIN for rec in c_ord_hdr loop BEGIN SELECT name ,number ,address INTO v_name, V_number, v_address FROM yyyyy WHERE id = c1.id END; UPDATE Employees SET name = V_name, number = V_number, address= v_address where Name is not Null; end loop; commit; END; END sample_test;
Not very well why you have so many BEGIN... END of the statements in your code. They are not necessary unless you're including exception handling.
What is the kind of thing you're looking for?
create or replace procedure sample_test as v_name VARCHAR2(240); V_number VARCHAR2(30); v_address VARCHAR2(50); cursor c1 is select * from Employees where Name is not Null for update; begin for rec in c1 loop select name ,number ,address into v_name, V_number, v_address from yyyyy where id = rec.id; update Employees set name = V_name, number = V_number, address= v_address where current of c1; end loop; commit; end sample_test;
-
How to reverse the order of a 8-bit value
Hello
I want to produce a mirror of an 8-bit digital value. Suppose that my value is 11101100, my output should be 00110111. How can I get it?
Here's a solution.
-
What's the point of having several columns in the ORDER BY clause?
DB version: 10 gr 2
When you use the ORDER BY clause, the lines are always sorted by the first column in the ORDER BY clause. So, what's the point of having several columns in the ORDER BY clause (I always see this in production codes)?
For the below SQLs' schema SCOTT, result sets are always classified according to the first column ename. When I added use asc and desc of employment, does not change the result set.
SQL> select * from emp order by ename; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 20 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7839 KING PRESIDENT 17-NOV-81 5000 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7934 MILLER CLERK 7782 23-JAN-82 1300 20 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7369 SMITH CLERK 7902 17-DEC-80 800 20 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 14 rows selected. SQL> select * from emp order by ename, job; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 20 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7839 KING PRESIDENT 17-NOV-81 5000 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7934 MILLER CLERK 7782 23-JAN-82 1300 20 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7369 SMITH CLERK 7902 17-DEC-80 800 20 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 14 rows selected. SQL> select * from emp order by ename, job desc; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 20 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7839 KING PRESIDENT 17-NOV-81 5000 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7934 MILLER CLERK 7782 23-JAN-82 1300 20 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7369 SMITH CLERK 7902 17-DEC-80 800 20 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 14 rows selected.
Search in this example, you will see the difference
SQL> create table test_order (name varchar2(10), surname varchar2(10), age number); Table created. SQL> insert into test_order values('Kamran','Agayev',26); 1 row created. SQL> insert into test_order values('Kamran','Taghiyev',26); 1 row created. SQL> insert into test_order values('John','Kevin',23); 1 row created. SQL> select * from test_order; NAME SURNAME AGE ---------- ---------- ---------- Kamran Agayev 26 Kamran Taghiyev 26 John Kevin 23 SQL> select * from test_order 2 order by age; NAME SURNAME AGE ---------- ---------- ---------- John Kevin 23 Kamran Agayev 26 Kamran Taghiyev 26 SQL> select * from test_order 2 order by age asc, surname desc; NAME SURNAME AGE ---------- ---------- ---------- John Kevin 23 Kamran Taghiyev 26 Kamran Agayev 26 SQL>
When in the second query, I sorted out only for age, you saw it there two 26 years old Keita, there was first Agayev, then Taghiyev. But if I want to get the family names in descending order when there are two very old person, then I will add the second column in the order by clause
- - - - - - - - - - - - - - - - - - - - -
Kamran Agayev a. (10g OCP)
http://kamranagayev.WordPress.com -
Hello
I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.
I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).
When you select "1074" in the bathroom, building highlights like "BRM BLD 5"
When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"
When the room is Null, building should also be Null.
I thank you,
Alice
I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.
Thank you
Erick
-
How does the order by clause in oracle 10G?
Hi This is my table called Master.I want to order by sno. so I run the below mentioned query.
SNO DESC STIME, ETIME CCODE ADD SID
11 11 11 1 10 s11
1 1 s1 09:00 12:00 10
2 2 s2 06:00 07:00 9
3 3 S3 9:00 23:00 0
SELECT * FROM MASTER BY SNO
SNO DESC STIME, ETIME CCODE ADD SID
1 1 s1 09:00 12:00 10
11 11 s11 11 1 10
2 2 s2 6:00 7:00 9
3 3 S3 09:00 23:00 0
but I had bad results. Help kindly me.i can't understand how the order by clause is fetching the record.
Hello
Most probably because that SNO is not digital, but a tank.
If it contains a number onlly, try
SELECT * FROM MASTER BY TO_NUMBER (SNO);
-
How to use the selection tool to resize a text box? Before I was able to click on the text box with the selection too in order to resize, but now I click on it and it only gives me 'path' or 'anchor' options.
Ashley,
What about window > show the rectangle enclosing (Ctrl / Cmd + Shift + B to toggle)?
-
How to change the order for table?
I use oracle 10g 10.2.0.3.0
I have a select statement
and explain the Plan showsSELECT /*+ leading v.Guest_Info v.Guest_Domain_Relation Guest_Address*/ * FROM (SELECT Cdr.Guest_Domain_Relation_Id, Ci.Guest_Id FROM Guest_Info Ci, Guest_Domain_Relation Cdr WHERE Ci.Guest_Id = Cdr.Guest_Id) v, Guest_Address Ca WHERE v.Guest_Id = Ca.Guest_Id;
Is there in any case, I have Guess_Domain_Relation table join firstly that the join to Guess_Address table of Guest_info?1 Plan hash value: 3785964411 2 3 --------------------------------------------------------------------------------------------------------- 4 | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | 5 --------------------------------------------------------------------------------------------------------- 6 | 0 | SELECT STATEMENT | | 1806 | 199K| 9 (23)| 00:00:01 | 7 |* 1 | HASH JOIN | | 1806 | 199K| 9 (23)| 00:00:01 | 8 | 2 | MERGE JOIN | | 482 | 48682 | 6 (17)| 00:00:01 | 9 | 3 | TABLE ACCESS BY INDEX ROWID| Guest_ADDRESS | 919 | 87305 | 4 (0)| 00:00:01 | 10 | 4 | INDEX FULL SCAN | XAK1Guest_ADDRESS | 919 | | 1 (0)| 00:00:01 | 11 |* 5 | SORT JOIN | | 482 | 2892 | 2 (50)| 00:00:01 | 12 | 6 | INDEX FULL SCAN | XPKGuest_INFO | 482 | 2892 | 1 (0)| 00:00:01 | 13 | 7 | VIEW | index$_join$_003 | 3493 | 41916 | 3 (0)| 00:00:01 | 14 |* 8 | HASH JOIN | | | | | | 15 | 9 | INDEX FAST FULL SCAN | XAK1Guest_DOMAIN_Relation | 3493 | 41916 | 1 (0)| 00:00:01 | 16 | 10 | INDEX FAST FULL SCAN | XPKGuest_DOMAIN_Relation | 3493 | 41916 | 1 (0)| 00:00:01 | 17 --------------------------------------------------------------------------------------------------------- 18 19 Predicate Information (identified by operation id): 20 --------------------------------------------------- 21
I tried a few ways to rewrite the query, but he's no luck
Thank you
Published by: Y.L on March 20, 2013 13:59Y.L wrote:
And my another problem here... I don't know why my first clue didn't work...Probably the syntax. The main indicator uses parentheses, as
/*+ select /*+ leading(table1, table2) */ * from table1, table2 */
Remember that you must use the table alias name in tips for the identifier to be recognized
You can also consider using the y indicator (if you must use a hint) for several tables - beware, it is MUCH easier to do worse performance with this suspicion using the order of the tables in the FROM clause in left to right
/*+ select /*+ ordered */ * from table1, table2, table3 . . . */
How I create index will affect how it works?
How the index was created probably won't affect how it works. Indexes can be created using constraints and directly with the CREATE INDEX command. The creation of the index should not be as important as its defined characteristics: index type, columns, etc.
-
Evaluate the Expression in the order by Clause
Hello
I'm struggling to run after JPQL.
Select r.firstname, r.lastname, (e.distance/e.duration) from Runner r Inner Join r.event e Order BY (e.distance/e.duration) Desc;
Error suggests that ' (' character is unacceptable in the Order By Clause.) Here is the error.
javax.servlet.ServletException: java.lang.IllegalArgumentException: an exception occurred while creating a query in EntityManager:
Description of the exception: syntax error parsing the query [Select r.firstname, r.lastname, (e.distance/e.duration) of Runner r Inner Join r.event e Order BY Desc (e.distance/e.duration);], line 1, column 101: unexpected token [()].
Inner exception: NoViableAltException (81! = [1328:1: orderByItem returns [object node]: (n = stateFieldPathExpression (a = ASC | DESC = d |) | I = IDENT (a CSA = | d = DESC |)) ;])])
Can someone show me please how to fix it.
Thank you
AdamWhat version do you use? It should work in EclipseLink > 2.1.
---
James: http://www.eclipselink.org -
Condition in the order by clause?
Hello
my version of db is,
Im having a query like this,Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
Now if the value of one is 1 I want the result of the following queryselect a,b,c,d,sum(e) from f group by a,b,c,d order by a,b,c,d
The only change between the two queries above are sorted by the clause.select a,b,c,d,sum(e) from f group by a,b,c,d order by b,a,c,d
How to get there?
Good help will be appreciated.
Concerning
Sankar MN
Published by: SankarMCA on October 5, 2010 04:51Hello
You can use CASE expressions in the ORDER BY clause.
For example:ORDER BY CASE WHEN a = 1 THEN b ELSE c END , CASE WHEN a = 1 THEN c ELSE b END , d
-
How to keep the order of photos in an album for a pound of apples
How to maintain the order of photos in an album when moving pictures to create a notebook from Apple? They are placed in the book of the order of date, but a lot of my photos are scanned and have nothing to do with the date of the photo. I use version 1.3 of Photo with iOS 10.11.3. I have read the previous assignments and fail to follow the suggestions that they seem to have apply to older versions of picture (iPhoto). Thank you
Adjust the dates of your photos with "Image > setting Date and Time", as well as the date of the photos match the order desired.
It was possible to select all the photos in an album in iPhoto 1.0 and then use ' file > Create book "and the pictures would be displayed in the book on the order that have been put in the book, but that does not work reliably.
You can also start with a blank book and drag the photos of book one - by - one in the order of your choice.
In other words, what I'm doing anyway. I start with a blank book and add the photo I'm going from several albums. I create an album separate for each section and drag only the photos for the next pages of the book, so I can put it on the pages I want.
-
How to reverse the order of my playlist @iTunes?
Thus, with the new look of iTunes I can't figure out how to reverse the order of my playlist.
I want to sort by 'love' or 'play' and have the most times (or the songs of love-labeled) on top (so number 1) and the less at the bottom of my reading list.
For some reason any the only order plays mostly / marked love is at the bottom of the playlist and the parts less / unmarked is upstairs. Can't reverse this order. Reading order is normal (so after 1 is 2, etc.)
How can I accomplish this?
All my software is up-to-date.
Thank you!
To reverse the sort order of the list of songs, click on the header of the column used to sort again.
-
How to use an order superior mother Wavelet change to discreet Undecimated Wavelet
Hello world. I am trying to compare the results obtained from Matlab app Wavelet Design and analysis, which uses an order of Daubechies 40th mother Wavelet in order to avoid an overlap between adjacent bands, for an MCSA (current Signature analysis) application engine. I use the Undecimated Wavelet Transform. For this VI I used, to the choice of the mother Wavelet, so the entry Wavelet and filter of analysis, as well as the wavelet Design VI terminal; the maximum order of mother Wavelet in the options above, was 14. What can I do to increase enforcement of the mother Wavelet?
Hi janotron
If you explore this example you can see how to increase the value of the wavelet, also if you have the file with the value of the wavelet, you can use the walevert filter to read a file, you can serch in the labview examples Wavelet selection order.
Here is a link that explains how to create the value of the walevert Custom Wavelet analysis using Signal Processing Toolkit in LabVIEW
As I've mencioned before Wavelet could then be treated using the Wavelet filter, here is the link which explain how to use the filter walevert WA Wavelet filter VI
Concerning
Brenda Vargas
Maybe you are looking for
-
My browser is running do not. I uninstall, install several times. Uninstall cookies, delete the data from the user, install in another user - no reaction. What's wrong? Help, please
-
Hi everyone, this is my first time here so Hello. My question is I have a Pavilion dv6-1010ea, I paid more than £700 initially and I'm very happy with it out card geforce 9200 m gs who is in it. I'd like really upgrade the card to one with a little m
-
The update installs several times
No matter who managed to het this KB to repeat update. its driving me crazy. just installed his back.
-
Reference DELL demanding $80 for a share of $5.90
Laptop Inspiron 5758 bought April 2015, had the power switch replaced under premium support Oct - 15, 2 days after the end of my premium (to July 19) support switch has not yet. Card replacement (of the power T2CVC button) costs between $5.90 and $15
-
Hello I need help in creating a Black Berry App. I created an application Java on ECLIPSE and created one. JAR file with DSNLess connection with the SQL SERVER 2008 DATABASE, my Java app works great on my system and network. Now, I want to run on BLA