query Oracle for top two salaries of each group departmentwise
query Oracle for top two departmentwise salarysigh...
But anyway,.
Top - n queries:
http://www.Oracle.com/technology/oramag/Oracle/07-Jan/o17asktom.html
http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2853107469873
and of course a lot of 'em here OTN...
Tags: Database
Similar Questions
-
two node Oracle RAC with two Oracle databases completely different on each node?
We currently have two different applications that use Oracle databases. Current configuration is two different oracle homes dbhome_1, dbhome2 with separate mounting LINUX points containing the Oracle homes and *.dbf files on a single host server.
Previously, the idea was to set up a second server identical host configured as a 'data guard' for both of these databases. Now, management wants to implement a cluster of CARS of two nodes, with each node running two databases. With the Standard edition.
I only did CARS of high availability and scalability for a single database. Is it possible to run two completely different databases Oracle on a two-node RAC cluster? I am inclined to think that they it has divided into
two clusters RAC to two nodes on four small servers host. Any suggestions or comments would be appreciated?
Is it possible to run two completely different databases Oracle on a two-node RAC cluster?
The short answer is Yes... it is possible. It will work without any problem, as long as you have the resources available to an additional database.
I am inclined to think that they it has divided into two clusters RAC to two nodes on four small servers host.
There is another option. In the past I have two databases on a RAC cluster that has been implemented for reasons of cost of license / (I don't think that this applies to itself, but you will need to check).
However having seen on separate hosts that you have only potentially interruptions of service on a database if you decide to do something like upgrading from one of the databases and thus upgrade the GI as well. This would mean interruptions in service for all your databases using the GI.
-
Hi, I have two decimal strings, each of them contains the numbers change over time. I want to plot them on the graph XY, a string for each axis. Can you show me how do?
This is not a formula, but a constant simple schema of a table complex. Wire remains, then do a right click of the terminal of the initializer of the feedback node and select "create constant. That should do it.
-
Hi im trying to media share with my ps3 and have two devices see each other, but my wmp allow me to click the allow for the sony device what can I do
Hello
1 how long have you been faced with this problem?
2. don't you make changes on the computer before this problem?Take a look at the following article that may help you.
http://community.us.PlayStation.com/message/2371488
I recommend you contact Sony support teamfor further assistance.
-
Error using nested for each group - in Oracle XSLT
Hello everyone. Thank you for taking the time to post this thread.
I created a XSLT transformation that runs on oxygen, but does not work in Oracle.
Given this XML-
< country >
< info enum = "CTRY" name = 'United States' States-total = "50" / >
< enum = 'ST' index info = '0' sname = "New York" population = "8 244 910" / >
< enum = 'ST' index info = '0' sname = "Chicago" population = "2 707 120" / >
< info enum = "CTRY" name = 'Germany' States-total = "16" / >
< enum = 'ST' index info = '1' sname = population "Berlin" = "3 469 910" / >
< enum = 'ST' index info = '1' sname = population "Brandenburg" = "2 500 000" / >
< / country >
Work of XSLT in the oxygen-
< xsl: template match = "/" >
< country >
[< xsl: for each group-select = "" countries / * ' group-starting-with="info[@enum='CTRY"] ">"
< CountryInfo >
< xsl: Call-template name = "ctry" / >
< / CountryInfo >
< / xsl: for each group->
< / country >
< / xsl: template >
< xsl: template name = "ctry" >
< name > country: < xsl: value-of select="@name"/ > < / name >
districts of <>< xsl: value-of select="@total-states"/ > < / districts >
< xsl: for each group-select = "current - group ()" group-by="@index" >
< xsl: Call-template name = "States" / >
< / xsl: for each group->
< / xsl: template >
< xsl: template name = "States" >
< name of xsl: variable = "index" select="@index"/ >
States <>
< xsl: for each select = "current - group ()" >
< name >
< xsl: value-of select="@sname"/ >
< / name >
< / xsl: foreach >
< / states >
< / xsl: template >
I get the desired oxygen - result
< country >
< CountryInfo >
< name > country: United States of America < / name >
< > 50 districts < / districts >
States <>
< name > New York < / name >
< name > Chicago < / name >
< / states >
< / CountryInfo >
< CountryInfo >
< name > country: Germany < / name >
< > 16 districts < / districts >
States <>
< name > Berlin < / name >
Brandenburg < name > < / name >
< / states >
< / CountryInfo >
< / country >
In a transformation of Oracle, I get an error "cannot perform XPath expression. I have narrowed down the cause of the error. The error is caused by
the nested for each group - using 'current - group ().'
< xsl: for each group-select = "current - group ()" group-by="@index" >
< xsl: Call-template name = "States" / >
< / xsl: for each group->
Oracle does not throw an error if I use ' Country/info' instead of 'current - group ()', but this does not produce the desired result
because he needs to be grouped by "@index."
Does anyone know why my XSLT does not work in a transformation from Oracle?oracleistheway wrote:
Does anyone know why my XSLT does not work in a transformation from Oracle?What do you mean by "transform Oracle?
If you are referring to the integrated database XSLT processor available through XMLTransform or DBMS_XSLProcessor API, it does not support XSLT 2.0, 1.0 only.
If you use the XDK Java (oracle.xml.parser.v2) Please give the exact version.
-
Top N for each grouping?
Is there a way to show results for each group of OBIEE in N?
I want to display the amounts of 10 albums for each region at my table. If you are using a Top N filter, it returns the results of set Top N I tried to create a pivot table dynamic and using of 'Région' as the delimiter section, but he got the same results. It is only 10 total quantities, and I want to see 10 amounts for each region.
KevinYep,
Use the statement:
TOPN ('F1 income'. "" Recipes 1-01 (after all) ", 10"market D2. ("" M01 Market ")concerning
John
http://obiee101.blogspot.com/ -
How to assign the ID of group for each group in the SQL query.
Hi all
I want to assign the ID of group for each group (group ID of series). I tried with the row_number function but did not work for my requiredment. Here is my sample data and my requirement.
Col1 A A A A A B C D D D D E E E F G G G I want to get number of each column with ID group assign to it value. Here is my example output
Col1 County Group ID A 5 1 A 5 1 A 5 1 A 5 1 A 5 1 B 1 2 C 1 3 D 4 4 D 4 4 D 4 4 D 4 4 E 3 5 E 3 5 E 3 5 F 1 6 G 3 7 G 3 7 G 3 7 Select col1, count (1) NTC (col1 partition).
ROW_NUMBER() over (partition by col1 by col1 order) tbl_test grp_id.
Please help me solve this problem.
SELECT
COL1,
COUNT (*) ON MYCOUNT (COL1 PARTITION).
DENSE_RANK () OVER (ORDER BY COL1) GROUPID
Of
T1;
-
Rank() is really better than rownum for top-n-queries?
Several sources say that for databases Oracle rank() should be used instead of ' rownum < = not for top-n-queries. But here we have an application, where we have a lot of top-n queries are run on a large table with several million lines and rank() has a very bad performance. I get much better results when I use a query with rownum < = n, but the application programmer does not have to change it in the software because of these articles on rank() and rownum. I wonder, is it possible to find a better form of the rank () - request or an additional index, which gives me the same performance.
To explain my case, I created the following example (if you try it, be aware that depending on the size of your dba_objects you might need up to half of a free concert space in your space storage for this example).
create the table big_objects
as
Select
ASCII (m.alpha) * 100000 + o.object_id object_id,.
owner of o.Owner,
o.object_type,
m.Alpha: ' _'. o.object_name object_name,
SYSDATE-400+mod(100*object_id+99*ASCII(m.Alpha),365)+24/(o.object_id+ASCII(m.Alpha)) created
o.Status
Of
(select distinct)
Upper (substr(object_name,1,1)) alpha
Of
sys. DBA_OBJECTS
where
m Upper (substr (object_name, 1, 1)) between 'A' and 'Z').
sys. DBA_OBJECTS o
order by
object_name;
create index bigindex_1 on big_objects (owner, object_type, created);
analyze the big_objects statistical calculation table.
So my table looks a bit like dba_objects but with more lines, and I made a synthesis "created" date that is more similar to my actual case, where top-n designates a date of selection of the most recent records of a certain type.
This is the size of the segments on a nearly empty database 11 GR 2:
Select nom_segment, bytes, blocks of sys.dba_segments where nom_segment like '% BIG '.
BLOCKS OF BYTES NOM_SEGMENT
-------------- ---------- ----------
BIGINDEX_1 75497472 9216
BIG_OBJECTS 142606336 17408
On my database, the example of table is approx. 1.9 Mio rows:
Select count (*) in the big_objects;
COUNT (*)
----------
1884246
and about 1.4% of these lines have owner = 'SYS' and object_type = 'INDEX '.
Select
Count (*)
of big_objects
where owner = 'SYS '.
and object_type = 'INDEX ';
COUNT (*)
----------
25896
But I want to find the most recent 10 index only for the owner of the SYS. I think that the typical rank() approach would be:
Select
owner,
object_type,
object_name,
object_id,
status,
created
Of
(select
owner,
object_type,
object_name,
object_id,
status,
created,
Rank() over (order by created desc) rnk
Of
big_objects
where
owner = 'SYS '.
and object_type = 'INDEX')
where rnk < = 10
order by ASC created;
OWNER TYPE_OBJET FEATURE_NAME OBJECT_ID STATUS CREATED
------------------------------ ------------------- -------------------------------- ---------- ------- --------------------
SYS B_COLLELEMIND 6600515 INDEX VALID 15.04.2010 19:05:55
SYS V_I_WRI$ _OPTSTAT_IND_OBJ # _PL 8600466 15.04.2010 VALID INDEX 19:09:03
SYS G_I_RLS 7100375 INDEX VALID 15.04.2010 19:23:55
SYS V_I_DIR$ SERVICE_UI 8600320 INDEX VALID 15.04.2010 19:31:33
SYS L_I_TSM_DST2$ 7600308 INDEX VALID 15.04.2010 19:36:26
L_I_IDL_UB11 INDEX SYS 7600235 VALID 15.04.2010 19:57:34
INDEX SYS V_I_VIEWTRCOL1 8600174 15.04.2010 VALID 20:19:21
INDEX SYS L_I_TRIGGER2 7600162 15.04.2010 VALID 20:31:39
INDEX SYS L_I_NTAB1 7600089 15.04.2010 VALID 21:35:53
B_I_SYN1 INDEX SYS 6600077 VALID 15.04.2010 22:08:07
10 selected lines.
Elapsed time: 00:00:00.22
Execution plan
----------------------------------------------------------
Hash value of plan: 2911012437
----------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 1427 | 188K | 1400 (1) | 00:00:17 |
| 1. SORT ORDER BY | 1427 | 188K | 1400 (1) | 00:00:17 |
|* 2 | VIEW | 1427 | 188K | 1399 (1) | 00:00:17 |
|* 3 | PUSHED RANK SORTING WINDOW | 1427 | 79912 | 1399 (1) | 00:00:17 |
| 4. TABLE ACCESS BY INDEX ROWID | BIG_OBJECTS | 1427 | 79912 | 1398 (0) | 00:00:17 |
|* 5 | INDEX RANGE SCAN | BIGINDEX_1 | 1427 | 9 (0) | 00:00:01 |
----------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2 - filter("RNK"<=10)
3 - filter (RANK () OVER (ORDER BY INTERNAL_FUNCTION ("CREATED") DESC) < = 10)
5 - access ("OWNER" = 'SYS' AND "OBJECT_TYPE" = 'INDEX')
Statistics
----------------------------------------------------------
1 recursive calls
0 db block Gets
25870 consistent gets
0 physical reads
0 redo size
1281 bytes sent via SQL * Net to client
524 bytes received via SQL * Net from client
2 SQL * Net back and forth to and from the client
2 sorts (memory)
0 sorts (disk)
10 rows processed
Using the index, only the first two columns are used, all 25896 records I found above are read and ranked just to find the most recent of ten. Many unnecessary blocks are read and luckily all the necessary database blocks were already in memory. In our case real often enough a lot of physical reads are performed, which further aggravates the performance of the application.
In my example below with a ' rownum < = 10 ' all three columns in the index are used and the number of block receives is much, much smaller than in the rank() example.
Select
owner,
object_type,
object_name,
object_id,
status,
created
Of
big_objects
where
(owner, object_type, created)
in
(select
owner,
object_type,
created
Of
(select / * + first_rows (10) * /)
owner,
object_type,
created
Of
big_objects
where
owner = 'SYS '.
and object_type = 'INDEX '.
order by
owner,
object_type,
created desc
)
where rownum < = 10
)
order by ASC created;
OWNER TYPE_OBJET FEATURE_NAME OBJECT_ID STATUS CREATED
------------------------------ ------------------- -------------------------------- ---------- ------- --------------------
SYS B_COLLELEMIND 6600515 INDEX VALID 15.04.2010 19:05:55
SYS V_I_WRI$ _OPTSTAT_IND_OBJ # _PL 8600466 15.04.2010 VALID INDEX 19:09:03
SYS G_I_RLS 7100375 INDEX VALID 15.04.2010 19:23:55
SYS V_I_DIR$ SERVICE_UI 8600320 INDEX VALID 15.04.2010 19:31:33
SYS L_I_TSM_DST2$ 7600308 INDEX VALID 15.04.2010 19:36:26
L_I_IDL_UB11 INDEX SYS 7600235 VALID 15.04.2010 19:57:34
INDEX SYS V_I_VIEWTRCOL1 8600174 15.04.2010 VALID 20:19:21
INDEX SYS L_I_TRIGGER2 7600162 15.04.2010 VALID 20:31:39
INDEX SYS L_I_NTAB1 7600089 15.04.2010 VALID 21:35:53
B_I_SYN1 INDEX SYS 6600077 VALID 15.04.2010 22:08:07
10 selected lines.
Elapsed time: 00:00:00.03
Execution plan
----------------------------------------------------------
Hash value of plan: 3360237620
--------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
--------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 10. 760. 17 (0) | 00:00:01 |
| 1. SORT ORDER BY | 10. 760. 17 (0) | 00:00:01 |
| 2. NESTED LOOPS |
| 3. NESTED LOOPS | 10. 760. 17 (0) | 00:00:01 |
| 4. VIEW | VW_NSO_1 | 10. 200 | 2 (50) | 00:00:01 |
| 5. UNIQUE HASH | 10. 200 | 4 (25) | 00:00:01 |
|* 6 | COUNTY STOPKEY |
| 7. VIEW | 11. 220. 3 (0) | 00:00:01 |
|* 8 | INDEX RANGE SCAN DESCENDING | BIGINDEX_1 | 1427 | 28540 | 3 (0) | 00:00:01 |
|* 9 | INDEX RANGE SCAN | BIGINDEX_1 | 3 | | 2 (0) | 00:00:01 |
| 10. TABLE ACCESS BY INDEX ROWID | BIG_OBJECTS | 3. 168. 6 (0). 00:00:01 |
--------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
6 - filter(ROWNUM<=10)
8 - access ("OWNER" = 'SYS' AND "OBJECT_TYPE" = 'INDEX')
9 - access ("OWNER" = "OWNER" AND "OBJECT_TYPE" = "OBJECT_TYPE" AND "CREATED" ="CREATED")
Statistics
----------------------------------------------------------
1 recursive calls
0 db block Gets
Gets 26 consistent
0 physical reads
0 redo size
1281 bytes sent via SQL * Net to client
524 bytes received via SQL * Net from client
2 SQL * Net back and forth to and from the client
1 sorts (memory)
0 sorts (disk)
10 rows processed
I made this comparison with versions of Oracle 10.2 and 11.2 and the result was more or less the same. How can I change the rank() query so that only the small number of really needed blocks are read from the database?Looks like this is one more place Oracle needs little hint :) 1 select 2 owner, 3 object_type, 4 object_name, 5 object_id, 6 status, 7 created 8 from 9 ( select /*+ index_desc(big_objects bigindex_1 ) */ 10 owner, 11 object_type, 12 object_name, 13 object_id, 14 status, 15 created, 16 rank() over (order by created desc) rnk 17 from 18 big_objects 19 where 20 owner = 'SYS' 21 and object_type = 'INDEX') 22 where rnk <= 10 23* order by created asc SQL> / OWNER OBJECT_TYPE OBJECT_NAME ------------------------------ ------------------- ------------------------------------- SYS INDEX B_I_TSM_SRC1$ SYS INDEX G_I_IDL_UB21 SYS INDEX B_I_PROCEDUREINFO1 SYS INDEX Q_I_TRIGGERJAVAC SYS INDEX B_I3_JIJOIN$ SYS INDEX V_I_FIXED_OBJ$_OBJ# SYS INDEX Q_I_OPQTYPE1 SYS INDEX L_I_NTAB2 SYS INDEX G_I_COLTYPE1 SYS INDEX B_I_SYN1 10 rows selected. Execution Plan ---------------------------------------------------------- 0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=41064 Card=38923 B ytes=5293528) 1 0 SORT (ORDER BY) (Cost=41064 Card=38923 Bytes=5293528) 2 1 VIEW (Cost=39884 Card=38923 Bytes=5293528) 3 2 WINDOW (NOSORT STOPKEY) (Cost=39884 Card=38923 Bytes=2 335380) 4 3 TABLE ACCESS (BY INDEX ROWID) OF 'BIG_OBJECTS' (TABL E) (Cost=39320 Card=38923 Bytes=2335380) 5 4 INDEX (RANGE SCAN DESCENDING) OF 'BIGINDEX_1' (IND EX) (Cost=190 Card=40151) Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 14 consistent gets 0 physical reads 0 redo size 1083 bytes sent via SQL*Net to client 512 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 1 sorts (memory) 0 sorts (disk) 10 rows processed
Published by: Ramesh Eega, 21 May 2010 16:01
Published by: Ramesh Eega, 21 May 2010 16:05
-
How can I use a panel of single query with criteria of two view?
Hi all
I have a requirement to allow users to change the "display mode" on a table of tree search results for an advanced search page. What this will do, is change the structure of how the data are arranged. In one case, the picture of the tree is 3 levels deep, otherwise, it's only 2 with different data at the level of the root node.
What I've done so far:
1) I exposed the relationship of data for these two ways to view the data in the data model of the module of the application.
(2) I created a view of criteria in two view objects that are originally relationships, where (for simplicity) I'm comparing only one field.
It is in the object from a point of view:
<ViewCriteria Name="PartsVOCriteria" ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.PartsVO" Conjunction="AND"> <Properties>... </Properties> <ViewCriteriaRow Name="vcrow23" UpperColumns="1"> <ViewCriteriaItem Name="PartDiscrepantItemsWithIRVO" ViewAttribute="PartDiscrepantItemsWithIRVO" Operator="EXISTS" Conjunction="AND" IsNestedCriteria="true" Required="Optional"> <ViewCriteria Name="PartDiscrepantItemsWithIRVONestedCriteria" ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.PartDiscrepantItemsWithIRVO" Conjunction="AND"> <ViewCriteriaRow Name="vcrow26" UpperColumns="1"> <ViewCriteriaItem Name="InspectionRecordNumber" ViewAttribute="InspectionRecordNumber" Operator="=" Conjunction="AND" Value="" Required="Optional"/> </ViewCriteriaRow> </ViewCriteria> </ViewCriteriaItem> </ViewCriteriaRow> </ViewCriteria>
and it is in the other display object:
<ViewCriteria Name="IRSearchCriteria" ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.InspectionRecordVO" Conjunction="AND"> <Properties>... </Properties> <ViewCriteriaRow Name="vcrow7" UpperColumns="1"> <ViewCriteriaItem Name="InspectionRecordNumber" ViewAttribute="InspectionRecordNumber" Operator="=" Conjunction="AND" Required="Optional"/> </ViewCriteriaRow> </ViewCriteria>
(3) I had a query Panel table and automatically generated tree by doing drag control data for ONE of the relationship of view object data that is exposed in the app module. Then, I created a second query Panel table and tree in the same way but using the data control to the other. I am one of the query cache permanently panels and toggling the visibility of the tree based on the user tables selects display mode. Both have separate links and iterators.
It is a part of the definition of the page:
<executables> <variableIterator id="variables"/> <searchRegion Criteria="IRSearchCriteria" Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer" Binds="InspectionRecordVOIterator" id="IRSearchCriteriaQuery"/> <iterator Binds="InspectionRecordVO" RangeSize="25" DataControl="QARS_AppModuleDataControl" id="InspectionRecordVOIterator" ChangeEventPolicy="ppr"/> <iterator Binds="Root.QARS_AppModule.PartsVO1" DataControl="QarsMasterAppModuleDataControl" RangeSize="25" id="PartsVO1Iterator"/> <searchRegion Criteria="PartsVOCriteria" Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer" Binds="PartsVO1Iterator" id="PartsVOCriteriaQuery"/> </executables>
(4) I have created a queryListener custom to delegate the query event.
It's in my jsp to advanced search page:
<af:query id="qryId1" headerText="Search" disclosed="true" value="#{bindings.IRSearchCriteriaQuery.queryDescriptor}" model="#{bindings.IRSearchCriteriaQuery.queryModel}" queryListener="#{pageFlowScope.SearchBean.doSearch}" queryOperationListener="#{bindings.IRSearchCriteriaQuery.processQueryOperation}" resultComponentId="::resId2" maxColumns="1" displayMode="compact" type="stretch"/>
It's in my grain of support:
public void doSearch(QueryEvent queryEvent) { String bindingName = flag ? "#{bindings.IRSearchCriteriaQuery.processQuery}" : "#{bindings.PartsVOCriteriaQuery.processQuery}"; invokeMethodExpression(bindingName, queryEvent); } private void invokeMethodExpression(String expr, QueryEvent queryEvent) { FacesContext fctx = FacesContext.getCurrentInstance(); ELContext elContext = fctx.getELContext(); ExpressionFactory eFactory = fctx.getApplication().getExpressionFactory(); MethodExpression mexpr = eFactory.createMethodExpression(elContext, expr, Object.class, new Class[] { QueryEvent.class }); mexpr.invoke(elContext, new Object[] { queryEvent }); }
When no number inspection (the only field of research so far) is provided in the query Panel, then it behaves properly. Namely, table tree shows all the search results. However, when a record number of inspection is supplied the table from the tree that was created with the query running Board (don't forget there are two query panels, one of them hides) shows a single result (this is correct), while the other table tree (the one with the control panel hidden query that is not used) shows all the results (this is NOT correct).
What I'm trying to accomplish is still doable? If so, what Miss me?
I use JDeveloper 11.1.1.7
Thank you
Bill
I ended up keeping a single query visible panel permanently and the other hidden permanently. When you perform a search using the table that has the hidden query Panel, I have the descriptor of the request for the Panel to request hidden using the descriptor of the request of the Commission in visible motion of the seeds and then delegate the request:
public void doSearch(QueryEvent queryEvent) { String bindingName = null; if(isIrTableRendered()) { bindingName = "#{bindings.IRSearchCriteriaQuery.processQuery}"; } else { seedPartsQueryDescriptor(); bindingName = "#{bindings.PartsVOCriteriaQuery.processQuery}"; queryEvent = new QueryEvent(partsQuery, partsQuery.getValue()); } invokeMethodExpression(bindingName, queryEvent); } private void seedPartsQueryDescriptor() { ConjunctionCriterion criterion = irQuery.getValue().getConjunctionCriterion(); for(Criterion criteria : criterion.getCriterionList()) { AttributeCriterion attributeCriteria = (AttributeCriterion)criteria; List values = attributeCriteria.getValues(); String qualifiedName = attributeCriteria.getAttribute().getName(); int indexOfDot = qualifiedName.lastIndexOf("."); String name = indexOfDot < 0 ? qualifiedName : qualifiedName.substring(indexOfDot + 1); ConjunctionCriterion partsCriterion = partsQuery.getValue().getConjunctionCriterion(); for (Criterion partsCriteria : partsCriterion.getCriterionList()) { AttributeCriterion partsAttributeCriteria = (AttributeCriterion) partsCriteria; String partsQualifiedName = partsAttributeCriteria.getAttribute().getName(); if (partsQualifiedName.endsWith(name)) { partsAttributeCriteria.setOperator(attributeCriteria.getOperator()); List partsValues = partsAttributeCriteria.getValues(); partsValues.clear(); for (int i = 0, count = values.size(); i < count; i++) { partsValues.set(i, values.get(i)); } } } } } private void invokeMethodExpression(String expr, QueryEvent queryEvent) { FacesContext facesContext = FacesContext.getCurrentInstance(); ELContext elContext = facesContext.getELContext(); ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory(); MethodExpression methodExpression = expressionFactory.createMethodExpression(elContext, expr, Object.class, new Class[] { QueryEvent.class }); methodExpression.invoke(elContext, new Object[] { queryEvent }); }
Then when the basis advanced/Panel visible query button, I put the same mode for the control panel hidden query programmatically:
public void handleQueryModeChange(QueryOperationEvent queryOperationEvent) { if(queryOperationEvent.getOperation() == QueryOperationEvent.Operation.MODE_CHANGE) { QueryMode queryMode = (QueryMode) irQuery.getValue().getUIHints().get(QueryDescriptor.UIHINT_MODE); QueryDescriptor queryDescriptor = partsQuery.getValue(); queryDescriptor.changeMode(queryMode); AdfFacesContext.getCurrentInstance().addPartialTarget(partsQuery); } }
-
Need help with a query complex for the production database
Hello again,
I need your help once again, for a query how to show me how long each stage of production is by order.
See examples of data and what I expect.
Thank you all for your help.
We use Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
Here the example data tables:
And here's what I expect of my request:CREATE TABLE TABLE_2 ( "ORDER_NR" VARCHAR2 (12) , "PRIORITY" VARCHAR2 (2) , "WO_STEP" VARCHAR2 (1) , "STEP_DATE" DATE ); CREATE TABLE TABLE_1 ( "ORDER_NR" VARCHAR2 (12) PRIMARY KEY , "PRIORITY" VARCHAR2 (2) , "CREATE_DATE" DATE , "ACT_STEP" VARCHAR2 (2) , "STEP_DATE" DATE , "EMPLOYEE" VARCHAR2 (5) , "DESCRIPTION" VARCHAR2 (20) ); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, CREATE_DATE, ACT_STEP, STEP_DATE, EMPLOYEE, DESCRIPTION) VALUES ('1KKA1T205634', '12', TO_DATE('10-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'), 'U', TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'), 'W0010', 'CLEAN HOUSE'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, CREATE_DATE, ACT_STEP, STEP_DATE, EMPLOYEE, DESCRIPTION) VALUES ('1KKA1Z300612', '12', TO_DATE('08-FEB-13 14:00:00','DD-MON-RR HH24:MI:SS'), 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'), 'K0052', 'REPAIR CAR'); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'A', TO_DATE('12-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'K', TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'K', TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'C', TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'B', TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'E', TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'S', TO_DATE('21-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'R', TO_DATE('21-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'U', TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'A', TO_DATE('12-FEB-13 13:52:42','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'K', TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'K', TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'C', TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'B', TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'E', TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); COMMIT;
And now the explanation for the result of the query:SYSDATE 28.Feb.13 14:00 ORDER_NR PRIORITYCREATE_DATE STATUS STATUS_DATE DESCRIPTION AGE_1 AGE_2 WAITNG STEP_A STEP_B STEP_C STEP_5 STEP_K STEP_E STEP_F STEP_S STEP_R 1KKA1T205634 12 10.Feb.13 10:00 U 28.Feb.13 12:00 CLEAN HOUSE 18,083 8,833 2,125 0,833 4,125 0,083 0,750 0,208 2,125 0,666 0,042 7,125 1KKA1Z300612 12 08.Feb.13 14:00 F 20.Feb.13 16:00 REPAIR CAR 20,000 16,042 2,125 0,833 4,125 0,083 0,750 0,208 2,125 0,666
The AGE_1 is the difference in days between the "CREATE_DATE" and if EXSIST L'ETAPE 'U' then STEP_DATE or if the STEP 'U' is not found in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
The AGE_2 is the difference in days between the STEP "A" STEP_DATE and IF EXSIST L'ETAPE 'R' then STEP_DATE or if the STEP 'R' is not in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
The EXPECTATION is the difference in days between CREATE_DATE and STEP 'A' STEP_DATE
The following columns indicate the days, how long the ORDER_NR remains in these TIMES, if an ORDER_NR comes in the same STEP should be calculated together more than once.
If the ORDER_NR jump a step, it should show a zero in the specific field.
I hope that my explanation is good enough, my English skills are far from good.
Thank you for all your help.
Hosts Reinhard W.Solomon Yakobson says:
Just add the amounts:In fact, you could edit all CASES:
with t2 as ( select t.*, lead(step_date) over(partition by order_nr order by step_date) next_step_date from table_2 t ) select t1.*, nvl( max( case t2.wo_step when 'U' then t2.step_date end ), sysdate ) - t1.create_date age_1, nvl( max( case t2.wo_step when 'R' then t2.step_date end ), sysdate ) - t1.create_date age_2, sum( case when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date end ) step_b_5, sum( case t2.wo_step when 'C' then t2.next_step_date - t2.step_date end ) step_c, sum( case t2.wo_step when 'K' then t2.next_step_date - t2.step_date end ) step_k, sum( case t2.wo_step when 'E' then t2.next_step_date - t2.step_date end ) step_e, sum( case t2.wo_step when 'F' then t2.next_step_date - t2.step_date end ) step_f, sum( case t2.wo_step when 'S' then t2.next_step_date - t2.step_date end ) step_s, sum( case t2.wo_step when 'R' then t2.next_step_date - t2.step_date end ) step_r from table_1 t1, t2 where t2.order_nr = t1.order_nr group by t1.order_nr, t1.priority, t1.create_date, t1.act_step, t1.step_date, t1.employee, t1.description / ORDER_NR PR CREATE_DA AC STEP_DATE EMPLO DESCRIPTION AGE_1 AGE_2 STEP_B_5 STEP_C STEP_K STEP_E STEP_F STEP_S STEP_R ------------ -- --------- -- --------- ----- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- 1KKA1T205634 12 10-FEB-13 U 28-FEB-13 W0010 CLEAN HOUSE 18.0833333 10.9583333 4.875 .083333333 .208333333 2.125 .666666667 .041666667 7.125 1KKA1Z300612 12 08-FEB-13 F 20-FEB-13 K0052 REPAIR CAR 44.252338 44.252338 4.875 .083333333 .208333333 2.125 SQL>
SY.
-
not clickable top-level items in each web site how to fix this?
the top-level items in each web site, that I may not click measure. When I put the cursor on the items, it does not change to the hand icon. for example if I go on you tube you tube icon or the search button on the top is not click able. He works for a little while when I use firefox in safe mode, but then it stops working again, how to fix this?
This problem can be caused by that extended the Yahoo! toolbar or extension of Babylon also well down and covers the top of the browser window and therefore links and buttons in this part of the screen not clickable.
Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).
- Makes no changes on the start safe mode window.
- https://support.Mozilla.com/kb/safe+mode
-
My screen has lost about two inches on each side.
My screen has lost about two inches on each side. I have no idea what's going on that I just got on my computer, and the mode full screen did not come.
Hello
· What is the operating system that you are working?
· The computer is a desktop or laptop computer?
Insufficient information provided by you, please answer the questions above.
It seems that the screen resolution is incorrect. Try changing the screen resolution to fit the screen. The link below will guide you on how to change the screen resolution.
For Windows Vista and 7:
http://Windows.Microsoft.com/en-us/Windows7/change-your-screen-resolution
For Windows XP:
· Click Start, click Control Panel, click appearance and themes, and then click on view
· On the tab settings in the screen resolution, drag the slider, and then click apply.
· When you are prompted to apply the settings, click OK. Your screen becomes black for a moment.
· Once your screen resolution changes, you have 15 seconds to confirm the change. Click Yes to confirm the change. Click No or do nothing to return to your previous configuration.
I hope this helps you.
-
For about two weeks screen installation 18 Windows updates at the stop.
For about two weeks when I shut down Windows 7, I get the message that Windows installs updates 18; do not to stop the computer. The screen shows that each update is installed and the computer then goes to the closure program. Installation time is always the same, which indicates that there may be a problem and I see the same updates on a daily basis.
I did some research on anti virus program bundled in this machine. I thought I had seen the McAffe program, but apparently, he was anti Norton virus.
The procedure will be similar, Yes:
1. download the Norton Removal Tool, save it to your desktop: ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe
2. close all open applications (that is, anything with an icon on the taskbar).
3. click right on the file saved in #1 above, and then select run as administrator to run the utility. DO TAP not your keyboard until the race ends, then restart.
4 uninstall AVG Free 9.0 & reboot.
HOW to uninstall or change a program
http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-programATTENTION! Now you're "working without a net": no to anything else online (e.g., navigation, control electronics, cat, other downloading) until you have completed the steps #5 and #6 below!
5. now to do a fresh install of AVG Free 9.0, this time select the CUSTOM installation option and do NOT install (uncheck) Linkscanner Search-Shield, Active Surf-Shield, security or the email of crawl components toolbar.
Why you don't need your anti-virus to scan your email
http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm6. manually and regularly update AVG until you get a prompt "no more updates available.
7 test cycle.
Note: If you also think there could be a McAfee application installed at a certain point, he could not not bad for download/run the McAfee tool, too, before proceeding to the 'custom' own installation of AVG 9.0.
Most of these modules of 9 AVG is not compatible with IE8 IMHO (especially LinkScanner). Do yourself a favor & don't install them.
~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft
-
Original title: PUM. Disabled.SecurityCenter
I recently removed "patch system" of my Dell computer XP. Malwarebyte s was the only software to do. MSSE caught, but couldn't fix it. I then updated & ran MSSE on my Toshiba - no threats not found. I then ran Malwarebytes & two threats were each one with the same name: PUM. Disabled.SecurityCenter both at the Date of the registry in HKLM\SOFTE\Microsfot\SecurityCenter\AntiVirusDisableNotify & HKLM\SOFTWARE\Microsfot\securityCenterFirewallDisableNotify. These two have been listed bad: Good (0) (1). In the Malwarebytes wesite, I read that this has something to do with MSSE. In a commentary, he says it occurs if, in the MS Security Center, the notification "Notify me if my computer might be at risk because of my virus protection software settings" is unchecked. I then went ahead & check all 3, firewalls, viruses & automatic updates. My computer seems to work well, except that the fan runs all the time (there are a lot of processes running & the CPU usage is very--often 100%, but the computer works fast).
My questions are: 1) the PUM associated MSSE & the boxes unchecked in MS security Center; (2) should I click on "ignore" in the Malwarebytes scan? 3) was right to check all the boxes in the center of security - "altert me if my computer may be at rist b/c of my xxx software settings? Thanks in advance for your help.
PC fan2
Hello
(1) is associated with MSSE PUM & the boxes unchecked in MS security Center;
The following thread might answer this question: http://forums.malwarebytes.org/index.php?showtopic=69859
(2) should I click on "ignore" in the Malwarebytes scan?
Yes
3) was right to check all the boxes in the center of security - "altert me if my computer may be at rist b/c of my xxx software settings?
Only, run antivirus software at the same time. Firewall must be performed, evil-ware bytes can be run at your pleasure.
-
Original title: mp3 or mp4?
I now have two copies of each song on my computer. An mp3 and a mp4. Which one should I keep?
Hello
Keep both until you can decide if you want only one. The compression ratio and other factors
It will be different.Good Codec will allow you to play MP4 in Windows Media Player.
Determine if 32 or 64 bits.
Start - type in the search box-> Winver find upstairs and double click on - check version
After that the foregoing, add codec - get these 32 bit if:
-Free - CCCP also get free tool of insurgents
http://CCCP-project.NET/
http://www.freewaregenius.com/2007/02/09/CCCP-codec-pack/FFDSHOW - free
http://sourceforge.NET/projects/ffdshow/Check here:
Plug-ins for Windows Media Player
http://www.Microsoft.com/windows/windowsmedia/player/plugins.aspx============================================
============================================If 64-bit:
Read this 1st and go that route, or use the one below.
http://www.Vistax64.com/sound-audio/152850-Vista-codec-pack-32bit-64bit-Media-Player-codecs.html
--------------------------------------------------------------------
If 64-bit Vista - can run WMP in 32 or 64 bit mode.
Or try these: download - SAVE - go to the place where your put them RIGHT CLICK – RUN AS ADMIN.
For 32-bit use these - OR the 32 bit ones listed above which I prefer.
K - Lite Codec Pack 6.2.0 (or newer)
http://www.codecguide.com/Use them for 64-bit:
K - Lite Codec Pack 3.7.0 (64-bit) (or newer)
http://www.codecguide.com/-------------------------------------------------------------
You know that you use WMP 32 or 64
Change, change or set 64 - Bit Windows Media Player 11 (WMP11) in Windows Vista x 64 as default
http://www.mydigitallife.info/2007/01/19/switch-change-or-set-64-bit-Windows-Media-Player-11-WMP11-in-Windows-Vista-x64-as-default/------------------------------------------------------------
VLC needs, of no use so usually Codec as a backup when asked to support associations of files just say no.
VLC - free
http://www.videolan.org/VLC/I hope this helps.
Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.
Maybe you are looking for
-
Cannot connect to Skype, Windows desktop application
I can't connect to Skype Windows desktop App Win7, Skype 6.9.0.106. Username and password are good. I can log on with these on skype.com. Also I can log in using my address WP8 and hotmail.com. If I try to use my e-mail for loging hotmail.com address
-
How to get the Microsoft Office product key?
I bought a satellite A660 with MS Office Home/Student 60 trial already installed and I need to activate the trial by entering the product key. Where is the key? I checked the documents provided with the laptop and it is not there (just a quick start
-
Start slow time 700-25ISH 90ED
I just bought a 700-25ISH Ideacentre 90ED I installed a samsung SSD 850 evo but boot time seems far too slow for this kind of machine spec I tried both legacy and UEFI but there is very little difference, actually start legacy is actually faster that
-
White vertical line on the screen of thelaptop
HII everybody My laptop just developed a white vertical line about 3 mm wide in the middle of the screen, I tried to reboot to no avail, this AI second day since he developed, please help the possible caus solution Jemedari kalundi
-
downloaded a trial version of windows 7, doesn't have to record it in time. Tried to uninstall it, and it placed all my system info in a compartment on my hard drive. I'm unable to recover or restore. How can I get?