Break the order of substitution of my ORDER BY clause
Hi Experts,I've created a report in Oracle 6i where I receive the ORDER BY clause at run time. And in the datamodel application, I use a lexical to tell parameter, column selected in the parameter order.
The problem facing me, during execution, the ORDER BY clause is ignored by the report, and takes the column mentioned with the order break property as "Crescent" sort by this column.
I'm not able to set the order property of break None for all columns, as Builder's mistake out asking me to have at least one column Asc or Desc value!
Anyone know this problem before? Is there anyway to get rid of this and use the report by columns in the ORDER BY clause.
Please note: I tried an explicit BY < columnname > ORDER in the query data model, but again the report uses the value of the mentioned pause command and sorts by that column.
Appreciate your help on the same.
Thank you!
Hello
There is a simple rule, how it works. For each query, you have one or more groups (hierarchical) in the data model. For the lowest group ORDER BY is selected for sorting and for groups, not be the lowest group, the ORDER of ROMPRÉ is chosen (and vice versa ignored).
Concerning
Rainer
Tags: Oracle Development
Similar Questions
-
Is this bug reports Oracle - 'break the order property' in the report "above.
Is this bug reports Oracle - 'break the order property' in the report "above.
Anyone would confirm that in the report 'group above', we could only order the values in the column of brake with ' "nil" or "ascending" or "descending" provided by "pause command property? '"
In the following example, "Dept" is brake column. Reports Oracle allows the values of the order in 'Dept' with 'descendant' provided by 'pause order property:
Dept. 30
employment ename salary
xxx xxx xxx
xxx xxx xxx
20 DEP.
employment ename salary
xxx xxx xxx
xxx xxx xxx
Dept 10
employment ename salary
xxx xxx xxx
xxx xxx xxx
or "Crescent" provided by "pause order property:
Dept 10
employment ename salary
xxx xxx xxx
xxx xxx xxx
20 DEP.
employment ename salary
xxx xxx xxx
xxx xxx xxx
Dept. 30
employment ename salary
xxx xxx xxx
xxx xxx xxx
I have to do:
20 DEP.
employment ename salary
xxx xxx xxx
xxx xxx xxx
Dept 10
employment ename salary
xxx xxx xxx
xxx xxx xxx
Dept. 30
employment ename salary
xxx xxx xxx
xxx xxx xxx
Could I do it? Could someone confirm that we could never do this, or if so, how?
Million thanks for the advice.
M.Z.
Edited by: jielan 18 September 2010 08:23Why must be a bug? You have a customs provision and must find a way to fill. But, what is your real sort order? You have only the three departments? If so, you could add a column in your query as
DECODE(DEPT, 20, 1, 10, 2, 30, 3, 4) SORTING
put this column in the same group as dept and sort after this new column.
-
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 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);
-
Purpose of the ORDER BY clause in the analytic function Min Max
I was always using analytical functions like Min Max without ORDER BY clause. But today I used with the ORDER BY clause. The results are very different. I would like to know the purpose of the ORDER BY clause in Min, Max and analogues of analytical functions.user10566312 wrote:
I was always using analytical functions like Min Max without ORDER BY clause. But today I used with the ORDER BY clause. The results are very different. I would like to know the purpose of the ORDER BY clause in Min, Max and analogues of analytical functions.It is a good point that many developers are not so aware. As far as I understand it the way it works.
Some analytical functions do not need an order by or windowing clause (SUM, COUNT, MIN, etc.). If there is no specified window, then the full score is the window.
As soon as you add a command also add you a windowing clause. This window has the default value of 'rank ofrowsbetween unbounded preceding and current_row. So as soon as you add an order by clause, you get a sliding window.Documentation: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions001.htm
windowing_clause
...
You cannot specify this clause unless you specified the order_by_clause. Window limits defined by the clause RANGE you can not specify only a single expression to the > order_by_clause. Please refer to 'Restrictions on the ORDER BY Clause'.example of
with testdata as (select 10 numval, level lv from dual connect by level < 10) select lv, numval, sum(numval) over () sum1, sum(numval) over (order by lv) sum2 from testdata; LV NUMVAL SUM1 SUM2 -- ------ ---- ---- 1 10 90 10 2 10 90 20 3 10 90 30 4 10 90 40 5 10 90 50 6 10 90 60 7 10 90 70 8 10 90 80 9 10 90 90
Published by: Sven w. on 25 Sep 2012 16:57 - default behavior has been corrected. Thanks to Chris
-
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
-
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 -
process of execution of the order by clause
What is the process of execution of the order clause in the sql statement and how it will affect the performance of the query.Siddharth Singh says:
What is the process of execution of the order clause in the sql statementDepends on. First of all, that you mean "alrogithmically, how Oracle data products ordered"? There are a number of different approaches. Data can be ordered as you pick up sequentially from an index. Or it can be explicitly materialized and sorted.
and how it will affect the performance of the query.
Depends on. There could be no impact because it relies on the index to classify the data and index is the most effective path independently of the presence of an ORDER BY. Or it could require a huge amount of time to materialize and sort several GB of data.
Justin
-
Problem in the SQL because of the order by clause
Hi all
I am facing a problem in a sql query. I use Oracle 10 g 2.
Query is given below:
The query Plan is:SELECT t1.ename FROM T1, T2 WHERE T1.EMPNO = 1234 AND T1.ACCOUNTNO = T2.ACCOUNTNO AND T1.SEQ = T2.SEQ ORDER BY T2.SEQ
Now, I want to reduce the time of this request..---------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ---------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 2 | 218 | 11716 (1)| 00:00:41 | |* 1 | TABLE ACCESS BY INDEX ROWID | T1 | 1 | 89 | 1 (0)| 00:00:01 | | 2 | NESTED LOOPS | | 2 | 218 | 11716 (1)| 00:00:41 | |* 3 | TABLE ACCESS BY INDEX ROWID| T2 | 2 | 40 | 11715 (1)| 00:00:41 | | 4 | INDEX FULL SCAN | PK_T2_SEQ | 58752 | | 122 (5)| 00:00:01 | |* 5 | INDEX RANGE SCAN | FK_ACCOUNTNO | 3 | | 0 (0)| 00:00:01 | ----------------------------------------------------------------------------------------------------
If I remove order by clause query that the query performance is quite perfect, but with order by clause its take time.
I already set SORT_AREA_SIZE, but still nothing improves.
Welcome and thank you for your suggestions.
Thank you
Published by: BluShadow on June 23, 2011 07:55
addition of {noformat}{noformat} tags and formatted explain plan to make it readable. Please see {message:id=9360002} for details on how to post code and data
Hey, a quick test, try:
select ename from ( SELECT t1.ename, T2.SEQ FROM T1, T2 WHERE T1.EMPNO = 1234 AND T1.ACCOUNTNO = T2.ACCOUNTNO AND T1.SEQ = T2.SEQ and rownum > 0) ORDER BY SEQ
Amiel Davis
-
WITH the ORDER BY clause and bug SDO_GEOMETRY?
I'm having a problem using SDO_GEOMETRY in a WITH clause. Specifically with ORDER BY. I'll show a shortened version of SQL here. I'm doing something wrong or is this a bug?
It works:
After the statement select in a with clause, this does not work, which gives an identifier not valid "SDO_GEOMETRY" ORA-00904:SELECT loc.location_id, SDO_GEOM.SDO_DISTANCE(cent.lat_long, MDSYS.SDO_GEOMETRY ( 2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2. '4326', SDO_POINT_TYPE(-78.6386145, 35.772096, NULL), NULL, NULL ), 0.01, -- tolerance 'unit=mile') result_center_distance FROM location loc JOIN centroid cent ON loc.centroid_id = cent.centroid_id ORDER BY result_center_distance
If I duplicate the function of the distance in the ORDER BY, it works:WITH location_distance AS ( SELECT loc.location_id, SDO_GEOM.SDO_DISTANCE(cent.lat_long, MDSYS.SDO_GEOMETRY ( 2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2. '4326', SDO_POINT_TYPE(-78.6386145, 35.772096, NULL), NULL, NULL ), 0.01, -- tolerance 'unit=mile') result_center_distance FROM location loc JOIN centroid cent ON loc.centroid_id = cent.centroid_id ORDER BY result_center_distance ) SELECT * from location_distance
WITH location_distance AS ( SELECT loc.location_id, SDO_GEOM.SDO_DISTANCE(cent.lat_long, MDSYS.SDO_GEOMETRY ( 2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2. '4326', SDO_POINT_TYPE(-78.6386145, 35.772096, NULL), NULL, NULL ), 0.01, -- tolerance 'unit=mile') result_center_distance FROM location loc JOIN centroid cent ON loc.centroid_id = cent.centroid_id ORDER BY SDO_GEOM.SDO_DISTANCE(cent.lat_long, MDSYS.SDO_GEOMETRY ( 2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2. '4326', SDO_POINT_TYPE(-78.6386145, 35.772096, NULL), NULL, NULL ), 0.01, -- tolerance 'unit=mile') ) SELECT * from location_distance
This is a bug. But it is set to 11g R2. Note that this is not a space bug, but a bug in generic compilation.
-
passing parameters in the order by clause of the cursor
Hi friends,
I am facing a strange problem
I have a cursor with an order by clause.
OPEN FOR Cursor_nomrpt
SELECT DISTINCT
CAST (plano.desc3 AS VARCHAR2 (50)) category
plano.name plan_name
, chip nvl (CAST (plano.desc6 AS VARCHAR2 (50)), 'not applicable')
, nvl (trunc(plano.value18,2), 0) nominal_slm
, nvl (trunc(plano.value19,2), 0) blm
plano.dbdateeffectivefrom date_live
,
Plano.DBKEY pog_id
, case when plano.value47 < 0 THEN 0 when plano.value47 IS NULL THEN 0 ELSE plano.value47 END as parent_id
Of
Plano dplapro1.ix_spc_planogram
INNER JOIN dplapro1.ix_spc_performance ON plano.dbkey = perf.dbparentplanogramkey perf
Produces INNER JOIN dplapro1.ix_spc_product ON perf.dbparentproductkey = product.dbkey
INNER JOIN dplapro1.ix_spc_product_key ON product.dbkey2 = prodkey.dbkey prodkey
AND prodkey.keylevel = 2
WHERE
Plano.value50 = 0
AND plano.dbkey4 = p_subcatkey
ORDER BY ltrim (rtrim (p_orderby)) CSA;
p_orderby is the parameter that is passed. But the result is not sorted. But when I run the cursor to hardcode the value of parameter, that it works fine...
Need your help on thisHello
When you use a local variable in a cursor, it's as if you had hard-coded literal in its place, you cannot use a variable to a column name.
If you know all the possible values for p_orderby, you can do something like this:
... ORDER BY TRIM ( CASE p_orderby WHEN 'DESC' THEN plano.desc WHEN 'VALUE' THEN plano.value ... END ) ASC;
If you don't know not all possible values, you can use dynamic SQL statements.
By the way
TRIM (x)
Returns the same results as
LTRIM ( RTRIM (x))
-
Error because the ORDER BY clause
Hi gurus
I have this formula for a formula column
function CF_PREVIOUS_QUANTITY returns the number is
quantity number;
Start
SELECT QUANTITY_REMAINING IN the amount
Of
(
SELECT
QUANTITY_REMAINING
Of...
WHERE THE...
-ORDER BY trx_date DESC
)
WHERE rownum = 1;
return quantity;
end;
Copy the following code compiles only if COMMAND LINE is commented out, otherwise I get this:
Met the ORDER symbol when waiting for him...
The code compiles ok in SQLDeveloper. I want to just get the first record in a recordset.
What's not here?
I use 6-speed
Thanks in advance
OscarA problem of M - to-1.
try either:
... (- preferred)
for (SELECT in c
QUANTITY_REMAINING
Of...
WHERE THE...
ORDER BY trx_date DESC) loop
Return c.QUANTITY_REMAINING;
end loop;... (- awkwardly)
SELECT QUANTITY_REMAINING IN the amount
Of
(SELECT QUANTITY_REMAINING
(
SELECT
QUANTITY_REMAINING
Of...
WHERE THE...
ORDER BY trx_date DESC
)
WHERE rownum = 1
); -
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.
-
That's what I'm trying to someone can help me with that: -.
create table test (env varchar (05), dbname varchar (08), priority varchar (05))
Insert into test values ('prod', 'proddb1', 'C');
Insert into test values ('train', 'traindb1', 'C');
Insert into test values ('train', 'traindb1', 'H');
Insert into test values ('prod', 'proddb1', 'W');
Insert into test values ('test', 'testdb1', 'C');
Insert into test values ('test', 'testdb1', 'W');
Insert test values ('prod', 'proddb1', ' don't);
Insert into test values ('dev', 'devdb1', 'H');
Insert into test values ('dev', 'devdb1', 'C');
Insert into test values ('prod', 'proddb1', 'H');
Insert test values ('train', 'traindb1', ' don't);
Insert into test values ('dev', 'devdb1', 'W');
Insert test values ('test', 'testdb1', ' don't);
Insert into test values ('train', 'traindb1', 'W');
Insert test values ('dev', 'devdb1', ' don't);
I'm trying to get an output format like this below someone can help me: -.
PRIORITY OF THE ENV
----- --------
prod C
Test C
C train
Dev C
prod W
train W
test W
dev W
prod:
train:
H-test
dev:
prod N
N train
test N
dev Nselect env, priority from test order by decode(priority,'C',1,'W',2,'H',3,'N',4);
You could order env also by a decoding, but I do not see a specific sequence in the output.
Once 'test' is before 'train', another time 'train' is of 'test '.
If you want to 'train' before 'test', it looks like this:select env, priority from test order by decode(priority,'C',1,'W',2,'H',3,'N',4), decode(env,'prod',1,'train',2,'test',3,'dev',4);
When there are other values for env or priority scheduling of these values would be undefined for the latter.
Published by: hm on 06.10.2011 02:23
Maybe you are looking for
-
I get up a black screen and rotation range ball after starting on my Mac Pro in 2006. I read for hours online and think I've tried everything. My computer in SafeMode only functions, all other attempts brings back me to the black screen. Initially, I
-
Satellite Pro P300-1F1 - mounting additional HARD disk
Hello I'm hoping to add an extra hard drive to my satellite pro p300-1f1 laptop. I know that he has an extra compartment and it has a sata connector, so I know it's possible. But I need a support or mount or a caddy/adapter to the hard drive in place
-
Company of Heroes needs model of shader 1.1 on Satellite A200-1V0
Hello I recently bought the company of Heroes PC games and have found that it will not play on my Equium A200 - 1V0.During the installation of the game, he said that there was need for 1.1 shader model, y at - it software that I can download to play
-
I accidentally activate my recovery partition, and now everytime I open it goes to the recovery section, I can't open my windows and the bad news is the recovery of original settings I disabled I can't click on it, what is the best option to fix this
-
Send emails with large attachments When trying to send emails with large attachments, sometimes the email seems to be simply stuck in the "Outbox" and the system continuously tries to send the email without success. Is there a way to determine if e-m