How to use "Order by" clause dynamically on LOV values in 10g r2 forms
Hi ,
I have following requirement,please guide me.
1 Create a List Of Values with 2 fields, Code and Description
2. Do not use order by clause in record Group Query
3. Attach this LOV to a field in Form
4. When user invokes the LOV user will see two fields in LOV with header as Code and Description
5. Now when user clicks on Column Header “Code” then LOV should be sorted on Code
6. And if User clicks on Column Header “Description” then LOV should be sorted on Description
Thanks in Advance.
Kindly post this problem in this forum ->
[Forms Forum|http://forums.oracle.com/forums/forum.jspa?forumID=82]
And, close this thread by marked it as answered. ;)
Regards.
Satyaki De.
Similar Messages
-
How to use one dataTable to dynamically assign different values?
For example, there is only one popup window that contains one dataTable. For every commandButton that calls this popup window will result in different dataTables.
How to do that?
Thank you.I wanna reuse the same popup window page to display different dataTables with values based on which button(on father window) is clicked...
I use an html to include the popup window like this:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<frameset>
<frame src="popupMediaType.jsf" />
</frameset>
</html>
So there will be two pages for one popup window...and I call this html by javascript in the father window...
I wanna use just two pages to do all the work for other similar popup windows... -
How to use order by within Group by clause
Hi All,
I need a help as to how should i use the Order by clause so that the data should be in order with respect to one column, and at the same time whole data is grouped by some other column...like
Select RaceNo,Venue,FP,BP from Race group by RaceNo
Here I want to order by FP in ascending order for each group. When i am using it , whole order is changing.
Can anybody suggest me how to use order by clause that would apply to each group of data.
Thanks .order by clause should be used at the last in any query.......but in group by clause u can't use use that becoz u group according to column then no ordering is needed there......if u want to filter something then u can use having clause and later if u need to arrange then u can use order by clause.........
i hope this eg.l gives u some clarification....
e.g
select deptno,count(empno)
from dept
group by deptno
having count(empno) > 10
order by deptno -
How to use the Output clause for the updated statment
How to use the output clause for the below update stament,
DECLARE @MyTableVar table(
sname int NOT NULL)
update A set stat ='USED'
from (select top 1 * from #A
where stat='AVAILABLE' order by sno)A
Output inserted.sname
INTO @MyTableVar;
SELECT sname
FROM @MyTableVar;
Here am getting one error incorrect syntax near Output
i want to return the updated value from output clausesee
http://blogs.msdn.com/b/sqltips/archive/2005/06/13/output-clause.aspx
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Order by clause Dynamic in Oracle function
How can i get order by Clause Dynamic in Oracle function
My function Returns sql query with SYS_REFCURSOR . and i will pass the order by column as input parameter
create or replace
FUNCTION TEST_SSK
p_srot number
RETURN SYS_REFCURSOR
AS
C_testssk SYS_REFCURSOR;
BEGIN
OPEN C_TESTSSK FOR
SELECT LOAN_CODE,LOAN_DATE,DUE_DATE,LOAN_AMT FROM LOAN_MASTER
order by P_SROT;
return C_testssk;
end;Edited by: user10736825 on Dec 22, 2010 11:34 AMyou can go for a dynamic query ;)
create or replace
FUNCTION TEST_SSK
p_srot number
RETURN SYS_REFCURSOR
AS
C_testssk SYS_REFCURSOR;
l_str VARCHAR2(4000);
l_order VARCHAR2(100);
BEGIN
l_str := 'SELECT LOAN_CODE,LOAN_DATE,DUE_DATE,LOAN_AMT FROM LOAN_MASTER ';
IF p_sort = 'LC'
THEN
l_order := ' ORDER BY LOAN_CODE ';
ELSIF p_sort = 'LD'
THEN
l_order := ' ORDER BY LOAN_DATE ';
END IF;
l_str := l_str || l_order ;
OPEN C_TESTSSK FOR l_str;
return C_testssk;
end; -
How to use order by in stored procedure base block?
How to use order by in stored procedure base block? I need to change order by dynamically
Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');
-
Can i assign an 'order by' clause dynamically in forms ??
I know it's possible to assign an 'order by' clause in reports with lexical parameter.
for example..
select A
from TABLE
where A is not null
&V_ORDERBY
In this, v_orderby might be 'order by name' like that,,,
can i assign an 'order by' clause dynamically IN FORMS ??
If you understan my question, please answer to me,,,ㅜㅜHave you tried this build-in function?
SET_BLOCK_PROPERTY('[BLOCK_NAME]', ORDER_BY, 'SORTCOL1, SORTCOL2...');
Where 'SORTCOL1, SORTCOL2...' are the table columns name. -
How to use JSTL create a dynamic table according to a database???
How to use JSTL create a dynamic table according to a database in a web page? Who can help me? Thanks.
How to use JSTL create a dynamic table according to a
database in a web page? Who can help me? Thanks.???
Could you rephrase your quesion?
Do you want to display records by reading from a table in DB? -
Why order by clause maintains column number values instead of column names
why order by clause maintains column number values instead of column names ?
we can use oder by 1,2 as column number
UGNo one said that it can't be used. What's your point?
To OP: It can be written with the column's 'select list positional number' just because for the support of laziness. :)
There's no difference between 'ORDER BY name, address' and 'ORDER BY 1,2'. -
How to use NODIM func with out it's values being rounded
I created a new calculated key figure in Query Designer 3.x, and used the function NODIM() - Value with out dimensions. When I use this function, the values are rounding off to the nearest value.
For example, I have a value 0.000075 US$, when I use NODIM function the value is displayed as 0.000080. Value is getting rounded to nearest value.
I tried using absolute value it did not work.
Can any one tell me how to use NODIM function with out it's value being rounded to nearest value.
Thanks,Hi,
According to your description, you might want that "Notice" field has a default value when form is created and users can be able to change the value of that
field.
As a workaround, you can add an action rule in “Name” field via InfoPath to fill the default value in “Notice” field only when “Name” field is not blank and “Notice”
field is blank.
Settings of the rule are as below, you can modify it based on your need:
Here is a link about how to add an action rule in InfoPath form, you can use it as a reference:
https://support.office.microsoft.com/en-us/article/Add-rules-for-performing-other-actions-5322d726-b787-4e5f-8d37-ba6db68b451d?CorrelationId=8a64c12f-aa60-4d90-b1f9-a44fcc4e74b5&ui=en-US&rs=en-US&ad=US
Best regards
Patrick Liang
TechNet Community Support -
Hi, I've checked how to use Kannada keyboard in Yosemite. But, there are some 'vattu forms' and other grammar in Kannada language that I don't know how to use it. I know how to change between the keyboards and can also view keyboard. However, For eg, 'Preetiya taatanige nimma muddu mommagalu maduva namaskara' How to write this? If anybody can answer this, very much appreciated.
Thanks in advance for your reply.In general, you need to use the "f" (kannada qwerty keyboard) or "d" key (kannada) between letters to make special forms. Also you may need to adjust the typography settings of the font, which is done by doing Format > Font > Show Fonts > Gear Wheel > Typography as shown below. If you can provide screenshots or more detailed info on things you cannot make, I can perhaps help.
It is important to note that MS Word for Mac does not support Indic scripts -- any other app should work OK. -
How to make an ORDER BY clause dynamic
is there anyway to make the ORDER BY clause in an SQL query within a DB control
dynamic? I have tried to pass a String of the column name and place it in the
statement within {}, but it doesn't work"Mark" <[email protected]> wrote:
>
is there anyway to make the ORDER BY clause in an SQL query within a
DB control
dynamic? I have tried to pass a String of the column name and place
it in the
statement within {}, but it doesn't workDid you find how ? please let me know, I also need to have a dynamic order by
clause. -
Sorting character column ( used in order by clause dynamically)
Hi,
I need help on sorting character-based numbers. Like say, I want to sort customers based on street numbers(which is a character string being used in the
order by clause) they live in.
The criteria are :
i. Numbers must take precedence.
This being a character string, 1000001 comes before 2. This shouldn't happen. And you cannot use to_number
since using it with a string having characters in it would raise an error.
ii. If only a single alphabet occurs as the last character, then treat the whole string as a number except the last character and then sort it
as if sorting a number. Something like : if you have 1000A, 200D, 200B, 1000X, the result would be 200B,200D,1000A,1000X.
iii. if a character occurs elsewhere in the string, then perform the search normally as if performing a character search.
The output of the following data :
100
A101
B100A
110C
C120B
120
100020
120C
C1100
100D
would be like :
100
100D
110C
120
120C
100020
A101
B100A
C120B
C1100
Please note that the sort is being done dynamically, so I could have access to the values of the street numbers only during run time.
Any help is really appreciated.
Thanks in advance.
Regards,
Anil.Create a function to test whether the column is numeric :
create FUNCTION is_numeric(v_number VARCHAR2)
RETURN INTEGER
IS
l_number NUMBER;
BEGIN
IF INSTR(UPPER(v_number),'E') > 0 THEN
RETURN 0;
END IF;
l_number := TO_NUMBER(v_number);
RETURN 1;
EXCEPTION
WHEN OTHERS THEN
RETURN 0;
END;
And try this query
Assume the table name is TEST with column STREET
select * from TEST
order by case is_numeric(STREET) when 1 then LPAD(STREET,20, ' ') else STREET end
Please make sure that 20 mentioned above is the column size for STREET.
Hope this helps.
-Nags -
How to use Field-symbol with dynamic select query
Can anybody tell me, how to use field-symbols in the dynamic select query.
FIELD-SYMBOLS <fs> { typing | STRUCTURE struc DEFAULT dobj }.
1. ... typing
2. ... STRUCTURE struc DEFAULT dobj
The FIELD-SYMBOLS statement declares a field symbol <fs>. The name conventions apply to the name fs. The angle brackets of the field symbols indicate the difference to data objects and are obligatory. You can declare field symbols in any procedure and in the global declaration section of an ABAP program, but not in the declaration section of a class or an interface. You can use a field symbol in any operand position in which it is visible and which match the typing defined using typing.
After its declaration, a field symbol is initial - that is, it does not reference a memory area. You have to assign a memory area to it (normally using the ASSIGN statement) before you can use it as an operand. Otherwise an exception will be triggered.
eg.
FIELD-SYMBOLS <fs> TYPE ANY.
DATA: BEGIN OF line,
string1(10) VALUE '0123456789',
string2(10) VALUE 'abcdefghij',
END OF line.
WRITE / line-string1+5.
ASSIGN line-string1+5(*) TO <fs>.
WRITE / <fs>.
output:
56789
56789
reward if helpful
anju -
How to use order by with hierarchical query
I have a hierarchical query basically it brings back an organization chart. We start with a manager's id, get all that person's employees. If any of the employees is also a manager I want to get that person's employees and return them right after that person. I won't bother with the whole query but relevant part is:
START WITH em.mgr_id = pi_mgr_id
CONNECT BY nocycle PRIOR em.emp_id = em.mgr_id;Where pi_mgr_id is a parameter passed to the procedure and em is the alias for the emp_mgr_relationship table which contains emp_id and mgr_id. This works fine. What I want now is for the employees who work for the same manager to appear in name order. The table which contains the employee names is aliased as pe and the name column is called name1. I added the following:
START WITH em.mgr_id = pi_mgr_id
CONNECT BY nocycle PRIOR em.emp_id = em.mgr_id
order by pe.name1;But that put the entire list in name order. What I want is for employees who work for the same manager to be in name order. Let's the manager whose organization I want is named Frank. What I'd like to get is this
EMP_NAME MGR_NAME
Allen Frank
Beth Frank
Alex Beth
Charles Beth
Ed Beth
Dean Frank
George Frank
Benny George
David George
Sam George
Dan Sam
Harry Sam
John Sam
Terry George
James Frank
Ken Frank
Mike Ken
Warren KenHow do I get the list in this order?
Edited by: kendenny on Jul 28, 2010 7:31 AMMake use of ORDER SIBLINGS clause in hierarchial queries to set the order by child columns.
START WITH em.mgr_id = pi_mgr_id
CONNECT BY nocycle PRIOR em.emp_id = em.mgr_id
*order siblings by name1;*
Maybe you are looking for
-
How can I coax my Mac to produce a DVD that shows on a DVD player through my flat screen?
How can I coax iPhoto, iTunes or the Desktop (right click | Burn) into producing a DVD of a slideshow from IPhoto, saved to iTunes and to the Desktop as a movie (*.m4v) -- that will show on my Sony flat screen connected to my Blu-Ray DVD player? Ever
-
How to get select option on OVS help.
HI all, can we have select-option on OVS help screen? if yes how to declare the select option. do we need wds_select_options component? can any explane step by step how to achive this? OVS is working fine without range. I went through so mant post bu
-
I've been having issues with my MacBook Pro and was just at the Genius bar. They wiped my drive and re-installed os v10.8.5. They do not want me to do a restore from my Time Machine because they think that my problem might be related to the version
-
How to get the alert context from scom event into incident description?
Hello, I user SCO for creating incidents of SCOM events. My problem ist that in some events the most interesting information is standing in AlertContext. But I cannot add this text to the descritipn field of our incident tool. If I user the published
-
Anyone use this function in the spreadsheet?
Hi Folks, I've used the equivalent of the BITLSHIFT function in programming but never in the spreadsheet, can anyone tell me an application of this in the spreadsheet. This function is new in 2013. TIA, Shane If this answer solves your problem, plea