Query Criteria on "Subject Contains" Fails
Hi,
I am using the Groupwise 7 API and have come across a strange problem with query criteria.
The following criteria works perfectly
Code:
Set oMessages = oFolder.FindMessages("(MESSAGE CONTAINS ""10047"")")
but this line generates an error
Code:
Set oMessages = oFolder.FindMessages("(SUBJECT CONTAINS ""10047"")")
The error message is "An invalid argument was passed in the function call". Does anyone know why this happens? I have scoured the Developers Guide and "SUBJECT CONTAINS" is recognised as elligible for criteria. I also created a filter with 10047 in the subject field and then obtained the criteria GW used with the example in the Developers Guide, but this still didn't work.
Does anyone know what the problem is?
Thanks,
Tom
I would have to debug into code to see
what I could find. Right now I don't have
the time.
I logged a bug to look into the issue.
>>> On Monday, October 12, 2009 at 6:06 AM,
tknig01<[email protected]> wrote:
> Hi,
>
> I am using the Groupwise 7 API and have come across a strange problem
> with query criteria.
>
> The following criteria works perfectly
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑‑‑
> Set oMessages = oFolder.FindMessages("(MESSAGE CONTAINS ""10047"")")
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑‑‑
>
>
> but this line generates an error
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑‑‑
> Set oMessages = oFolder.FindMessages("(SUBJECT CONTAINS ""10047"")")
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑‑‑
>
>
> The error message is "An invalid argument was passed in the function
> call". Does anyone know why this happens? I have scoured the Developers
> Guide and "SUBJECT CONTAINS" is recognised as elligible for criteria. I
> also created a filter with 10047 in the subject field and then obtained
> the criteria GW used with the example in the Developers Guide, but this
> still didn't work.
>
> Does anyone know what the problem is?
>
> Thanks,
>
> Tom
Similar Messages
-
How to use Add Query Criteria for the MySQL data Base in Netbeans ?
How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
When the Query Criteria is add like
SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
FROM counselors WHERE counselors.counselors_id = ?
when i run this Query in the Query Window
i get a error message Box saying
Query Processing Error Parameter metadata not available for the given statement
if i run the Query with out Query Criteria its working fine.*I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
The Java codes are:
public void dropDown1_processValueChange(ValueChangeEvent event) {
Object s = this.dropDown1.getSelected();
try {
this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
this.Trip_tabDataProvider1.refresh();
} catch (Exception e) {
this.log("Error: ", e);
this.error("Error: Cannot select user"+e.getMessage());
SQL statement for Trip_tabRowSet:
SELECT ALL Trip_Tab.Trip_Date,
Trip_Tab.User_ID,
Trip_Tab.Destination
FROM Trip_Tab
WHERE Trip_Tab.User_ID = ?
Error messages are shown below:
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
Could anybody look into this issue.
Many thanks
Edited by: linqing on Nov 22, 2007 4:48 AM -
Unable to find Searchable Item in Query Criteria Map
Hi ,
Am try to personalize Advacned Search Region to Include new search Criteria in R12 iSupplier Portal->Home->Orders Tab->Advanced search.
Am trying to create new search field in the Add another row field through personalization.
I have created new row criteria,when am trying to create Query Criteria Map,Am unable to list the Searchable Item as it is Drop down list.
This causing unable to query the records based on the newly created row criteria item.
Please advise.
Thansk<Sarath.Hi Jobnish,
There is no code in this requirement.
There is no error...Issue is unable to query data based on newly create criteria row in Advanced search.
I can give you navigation:
iSupplier Portal->Home->Orders Tab->Press advanced search Region
Click on the Personalize Page(I hope you know how to enable the personalize link using profile option).
In SupplierRN ->Advanced Search Criteria and creating custom item Criteria Row..
We need to map this field in Advanced Query Mapping.
However the issue is the Am unbale find the Searchable item (which is created in Criteria Row) in the drop downlist.
I can provide screen-shot if you need.
Thanks,Sarath. -
Query criteria in Query Customer Party List EBM
Hi ,
I have a requirement where I have to map certain fields to query customer party EBM.
QUery Customer Party EBM has option for mapping only one field 'ID'. But my query input has many fields like last name , first name, etc based on which the search should be performed.
I checked Query Customer Party List EBM where i found some tags like query criteria, operator code, value expression, etc.
Please let me know what is the significance of these fields and how can I map my query criteria fields to query customer party EBM or query customer party list EBM ?Hi,
I'm getting the same problem!
Using AccountGLFlexValues, I have 3 parameters to send to requestor ABCS and all the samples I have are using only ID as parameter.
What about Difference between Query and QueryList EBMs? any explanation??
Did you find any solution on this issue? Please share this information!!
Thanks!! -
I do not see the Add Query Criteria
Hi, this is CarloSilva, from Brazil. I do not see Add Query Criteria. If I double -click objRowSet, I open Query Editor and see the table. I can add and delete tables. I can run query, too. But I do not see the Design Grid in query editor. Are there some aditional setting for my Java Studio Creator?
Please, help meHi Carlo,
On opening the Query editor window you should be able to see 4 different areas. In the first one you will see the tables, the second one will show the list of columns, the third one has the SQL statement and finally the output window in which you can see the results of your query on running.
You can see 3 sets of up and down arrows on the left side of these areas. If you are not able to see any one of the above then click on the down arrow key and the corresponding area should become visible. If the whole centre area gets covered with one particular area then click on the up arrow and click on a different down arrow.
Hope this helps you.
Cheers :-)
Creator Team -
The JSP container failed to load the TagExtraInfo class
We are upgrading our system. We were using JSF 1.1 with WebSphere V6. Now we are moving to JSF 1.2 and Websphere V7
I am getting the error below over and over in the WebSphere V7 environment, in the ear
[8/30/10 8:30:20:402 EDT] 0000000e jsp W com.ibm.ws.jsp.taglib.TldParser endElement JSPG0235E: The JSP container failed to load the TagExtraInfo class [com.sun.faces.taglib.FacesTagExtraInfo] from META-INF/odyssey.tld
The ear can be set up to use either the sun reference implementation 1.2 or the MyFaces 1.2 implementation.
It is currently set up for the sun reference implementation. Should this change, or is there something else I am missing.
ThanksHi Wrisillito,
Regarding to the error message you provided, since SSIS uses VSTA 2.0, we need to fix that one only if there is SSIS trouble. Visual Studio doesn’t really related to the VSTA install.
Seems you have problems while opening VSTA inside BIDS to edit SSIS scripts, so please try one of these methods:
A. Uninstalling SQL Server 2008 and Reinstalling it may fix the problem.
B. If you can't do that try the manual approach credit to SSIS script.
For more information and steps, please follow the
blog about VSTA setup and configuration troubles for SSIS 2008 and R2 installations.
Meanwhile you can refer to these threads with the same error as yours
1. VSTA designer issues with Sql 2008
2. The VSTA designer failed to load
This is SSIS related issue, if this does not work please link to
SSIS forum for further help.
Regards,
Amber zhang
TechNet Subscriber Support
If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback
here -
Querying against multiple subject areas
We would like to write a query against two or more subject areas. Is that possible in OBI EE 10g? Looks like this is a feature available in Business Objects and our users are requesting it. Please suggest how it can be done.
Hi Nico,
You are correct, OBIEE 10g will let you use UNION statements in the complex SQL. In fact you can use "Combine with Similar Request" to drive a UNION, UNION ALL and MINUS statement from the Criteria tab without having to go to advanced settings.
What we were trying to say above was that it doesn't let you JOIN two subject areas together. For example,
SELECT SUBJECT_AREA1.COLUMN1, SUBJECT_AREA2.COLUMN2
FROM SUBJECT_AREA1, SUBJECT_AREA2
WHERE SUBJECT_AREA1.KEY = SUBJECT_AREA2.KEY
The above just isn't possible.
One thing you can do that sort of accomplishes it (but it behaves really kludgey) is use the union statement + null/0 place holders + group by statement. This is a pain though. For example:
1) Your Logical SQL should be something like:
SELECT SUBJECT_AREA1.COMMON_DIMENSION, SUBJECT_AREA1.MEASURE1, 0 MEASURE2
FROM SUBJECT_AREA1
UNION
SELECT SUBJECT_AREA2.COMMON_DIMENSION, 0 MEASURE1, SUBJECT_AREA2.MEASURE2
FROM SUBJECT_AREA2
2) In the criteria tab, create new aggregate columns based on MEASURE1 and MEASURE2 grouped by COMMON_DIMENSION. For example:
NEW_MEASURE1= SUM(MEASURE1 by COMMON_DIMENSION)
NEW_MEASURE2=SUM(MEASURE2 by COMMON_DIMENSION)
***I think you have to reference the saw name and not the logical name at this point. Hence it may read something like: SUM(saw1 by saw0) and SUM(saw2 by saw0)
3) Throw the COMMON_DIMENSION, NEW_MEASURE1, NEW_MEASURE2 into a pivot table and you're all set.
Like I mentioned, it behaves very strangely and is a pain to implement, but it does display the expected results a join would.
-Joe -
Approval Query for AP Invoices Containing Budget Related GL Account
Hi Experts,
I would like to create a approval template for all AP invoices that include a GL account that is related to the budget. Can you please help me with the approval query?
Thank you!
JaneHello Gordon Du,
"B1 approval will only apply to document level. If you want to check line level, only the first line can be subjected to."
I was thinking to trigger the approval process based on a document (AP invoice) containing relevant cost centres on a line by line basis as entered via one of the enabled dim fields.
Writing a trigger query for each cost centre effected? This does not appear to be a good solution, what is a better direction. Is there another way? (PO are not yet used via SAPB1)
Currently my invoices add, but do not trigger the approval process based on my attempts thus far.
Can the originator manually choose an approval pathway?
If this is against posting etiquette delete and advise.
I am a relative newbie to SAP B1, so am happy to be pointed to relevant help files. I arrived via google searching and arrived here.
Thankyou. -
Poor query performance when joining CONTAINS to another table
We just recently began evaluating Oracle Text for a search solution. We need to be able to search a table that can have over 20+ million rows. Each user may only have visibility to a tiny fraction of those rows. The goal is to have a single Oracle Text index that represents all of the searchable columns in the table (multi column datastore) and provide a score for each search result so that we can sort the search results in descending order by score. What we're seeing is that query performance from TOAD is extremely fast when we write a simple CONTAINS query against the Oracle Text indexed table. However, when we attempt to first reduce the rows the CONTAINS query needs to search by using a WITH we find that the query performance degrades significantly.
For example, we can find all the records a user has access to from our base table by the following query:
SELECT d.duns_loc
FROM duns d
JOIN primary_contact pc
ON d.duns_loc = pc.duns_loc
AND pc.emp_id = :employeeID;
This query can execute in <100 ms. In the working example, this query returns around 1200 rows of the primary key duns_loc.
Our search query looks like this:
SELECT score(1), d.*
FROM duns d
WHERE CONTAINS(TEXT_KEY, :search,1) > 0
ORDER BY score(1) DESC;
The :search value in this example will be 'highway'. The query can return 246k rows in around 2 seconds.
2 seconds is good, but we should be able to have a much faster response if the search query did not have to search the entire table, right? Since each user can only "view" records they are assigned to we reckon that if the search operation only had to scan a tiny tiny percent of the TEXT index we should see faster (and more relevant) results. If we now write the following query:
WITH subset
AS
(SELECT d.duns_loc
FROM duns d
JOIN primary_contact pc
ON d.duns_loc = pc.duns_loc
AND pc.emp_id = :employeeID
SELECT score(1), d.*
FROM duns d
JOIN subset s
ON d.duns_loc = s.duns_loc
WHERE CONTAINS(TEXT_KEY, :search,1) > 0
ORDER BY score(1) DESC;
For reasons we have not been able to identify this query actually takes longer to execute than the sum of the durations of the contributing parts. This query takes over 6 seconds to run. We nor our DBA can seem to figure out why this query performs worse than a wide open search. The wide open search is not ideal as the query would end up returning records to the user they don't have access to view.
Has anyone ever ran into something like this? Any suggestions on what to look at or where to go? If anyone would like more information to help in diagnosis than let me know and i'll be happy to produce it here.
Thanks!!Sometimes it can be good to separate the tables into separate sub-query factoring (with) clauses or inline views in the from clause or an in clause as a where condition. Although there are some differences, using a sub-query factoring (with) clause is similar to using an inline view in the from clause. However, you should avoid duplication. You should not have the same table in two different places, as in your original query. You should have indexes on any columns that the tables are joined on, your statistics should be current, and your domain index should have regular synchronization, optimization, and periodically rebuild or drop and recreate to keep it performing with maximum efficiency. The following demonstration uses a composite domain index (cdi) with filter by, as suggested by Roger, then shows the explained plans for your original query, and various others. Your original query has nested loops. All of the others have the same plan without the nested loops. You could also add index hints.
SCOTT@orcl_11gR2> -- tables:
SCOTT@orcl_11gR2> CREATE TABLE duns
2 (duns_loc NUMBER,
3 text_key VARCHAR2 (30))
4 /
Table created.
SCOTT@orcl_11gR2> CREATE TABLE primary_contact
2 (duns_loc NUMBER,
3 emp_id NUMBER)
4 /
Table created.
SCOTT@orcl_11gR2> -- data:
SCOTT@orcl_11gR2> INSERT INTO duns VALUES (1, 'highway')
2 /
1 row created.
SCOTT@orcl_11gR2> INSERT INTO primary_contact VALUES (1, 1)
2 /
1 row created.
SCOTT@orcl_11gR2> INSERT INTO duns
2 SELECT object_id, object_name
3 FROM all_objects
4 WHERE object_id > 1
5 /
76027 rows created.
SCOTT@orcl_11gR2> INSERT INTO primary_contact
2 SELECT object_id, namespace
3 FROM all_objects
4 WHERE object_id > 1
5 /
76027 rows created.
SCOTT@orcl_11gR2> -- indexes:
SCOTT@orcl_11gR2> CREATE INDEX duns_duns_loc_idx
2 ON duns (duns_loc)
3 /
Index created.
SCOTT@orcl_11gR2> CREATE INDEX primary_contact_duns_loc_idx
2 ON primary_contact (duns_loc)
3 /
Index created.
SCOTT@orcl_11gR2> -- composite domain index (cdi) with filter by clause
SCOTT@orcl_11gR2> -- as suggested by Roger:
SCOTT@orcl_11gR2> CREATE INDEX duns_text_key_idx
2 ON duns (text_key)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 FILTER BY duns_loc
5 /
Index created.
SCOTT@orcl_11gR2> -- gather statistics:
SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'DUNS')
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'PRIMARY_CONTACT')
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- variables:
SCOTT@orcl_11gR2> VARIABLE employeeid NUMBER
SCOTT@orcl_11gR2> EXEC :employeeid := 1
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> VARIABLE search VARCHAR2(100)
SCOTT@orcl_11gR2> EXEC :search := 'highway'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- original query:
SCOTT@orcl_11gR2> SET AUTOTRACE ON EXPLAIN
SCOTT@orcl_11gR2> WITH
2 subset AS
3 (SELECT d.duns_loc
4 FROM duns d
5 JOIN primary_contact pc
6 ON d.duns_loc = pc.duns_loc
7 AND pc.emp_id = :employeeID)
8 SELECT score(1), d.*
9 FROM duns d
10 JOIN subset s
11 ON d.duns_loc = s.duns_loc
12 WHERE CONTAINS (TEXT_KEY, :search,1) > 0
13 ORDER BY score(1) DESC
14 /
SCORE(1) DUNS_LOC TEXT_KEY
18 1 highway
1 row selected.
Execution Plan
Plan hash value: 4228563783
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 2 | 84 | 121 (4)| 00:00:02 |
| 1 | SORT ORDER BY | | 2 | 84 | 121 (4)| 00:00:02 |
|* 2 | HASH JOIN | | 2 | 84 | 120 (3)| 00:00:02 |
| 3 | NESTED LOOPS | | 38 | 1292 | 50 (2)| 00:00:01 |
| 4 | TABLE ACCESS BY INDEX ROWID| DUNS | 38 | 1102 | 11 (0)| 00:00:01 |
|* 5 | DOMAIN INDEX | DUNS_TEXT_KEY_IDX | | | 4 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | DUNS_DUNS_LOC_IDX | 1 | 5 | 1 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | PRIMARY_CONTACT | 4224 | 33792 | 70 (3)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("D"."DUNS_LOC"="PC"."DUNS_LOC")
5 - access("CTXSYS"."CONTAINS"("D"."TEXT_KEY",:SEARCH,1)>0)
6 - access("D"."DUNS_LOC"="D"."DUNS_LOC")
7 - filter("PC"."EMP_ID"=TO_NUMBER(:EMPLOYEEID))
SCOTT@orcl_11gR2> -- queries with better plans (no nested loops):
SCOTT@orcl_11gR2> -- subquery factoring (with) clauses:
SCOTT@orcl_11gR2> WITH
2 subset1 AS
3 (SELECT pc.duns_loc
4 FROM primary_contact pc
5 WHERE pc.emp_id = :employeeID),
6 subset2 AS
7 (SELECT score(1), d.*
8 FROM duns d
9 WHERE CONTAINS (TEXT_KEY, :search,1) > 0)
10 SELECT subset2.*
11 FROM subset1, subset2
12 WHERE subset1.duns_loc = subset2.duns_loc
13 ORDER BY score(1) DESC
14 /
SCORE(1) DUNS_LOC TEXT_KEY
18 1 highway
1 row selected.
Execution Plan
Plan hash value: 153618227
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 38 | 1406 | 83 (5)| 00:00:01 |
| 1 | SORT ORDER BY | | 38 | 1406 | 83 (5)| 00:00:01 |
|* 2 | HASH JOIN | | 38 | 1406 | 82 (4)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| DUNS | 38 | 1102 | 11 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | DUNS_TEXT_KEY_IDX | | | 4 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | PRIMARY_CONTACT | 4224 | 33792 | 70 (3)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("PC"."DUNS_LOC"="D"."DUNS_LOC")
4 - access("CTXSYS"."CONTAINS"("TEXT_KEY",:SEARCH,1)>0)
5 - filter("PC"."EMP_ID"=TO_NUMBER(:EMPLOYEEID))
SCOTT@orcl_11gR2> -- inline views (sub-queries in the from clause):
SCOTT@orcl_11gR2> SELECT subset2.*
2 FROM (SELECT pc.duns_loc
3 FROM primary_contact pc
4 WHERE pc.emp_id = :employeeID) subset1,
5 (SELECT score(1), d.*
6 FROM duns d
7 WHERE CONTAINS (TEXT_KEY, :search,1) > 0) subset2
8 WHERE subset1.duns_loc = subset2.duns_loc
9 ORDER BY score(1) DESC
10 /
SCORE(1) DUNS_LOC TEXT_KEY
18 1 highway
1 row selected.
Execution Plan
Plan hash value: 153618227
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 38 | 1406 | 83 (5)| 00:00:01 |
| 1 | SORT ORDER BY | | 38 | 1406 | 83 (5)| 00:00:01 |
|* 2 | HASH JOIN | | 38 | 1406 | 82 (4)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| DUNS | 38 | 1102 | 11 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | DUNS_TEXT_KEY_IDX | | | 4 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | PRIMARY_CONTACT | 4224 | 33792 | 70 (3)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("PC"."DUNS_LOC"="D"."DUNS_LOC")
4 - access("CTXSYS"."CONTAINS"("TEXT_KEY",:SEARCH,1)>0)
5 - filter("PC"."EMP_ID"=TO_NUMBER(:EMPLOYEEID))
SCOTT@orcl_11gR2> -- ansi join:
SCOTT@orcl_11gR2> SELECT SCORE(1), duns.*
2 FROM duns
3 JOIN primary_contact
4 ON duns.duns_loc = primary_contact.duns_loc
5 WHERE CONTAINS (duns.text_key, :search, 1) > 0
6 AND primary_contact.emp_id = :employeeid
7 ORDER BY SCORE(1) DESC
8 /
SCORE(1) DUNS_LOC TEXT_KEY
18 1 highway
1 row selected.
Execution Plan
Plan hash value: 153618227
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 38 | 1406 | 83 (5)| 00:00:01 |
| 1 | SORT ORDER BY | | 38 | 1406 | 83 (5)| 00:00:01 |
|* 2 | HASH JOIN | | 38 | 1406 | 82 (4)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| DUNS | 38 | 1102 | 11 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | DUNS_TEXT_KEY_IDX | | | 4 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | PRIMARY_CONTACT | 4224 | 33792 | 70 (3)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("DUNS"."DUNS_LOC"="PRIMARY_CONTACT"."DUNS_LOC")
4 - access("CTXSYS"."CONTAINS"("DUNS"."TEXT_KEY",:SEARCH,1)>0)
5 - filter("PRIMARY_CONTACT"."EMP_ID"=TO_NUMBER(:EMPLOYEEID))
SCOTT@orcl_11gR2> -- old join:
SCOTT@orcl_11gR2> SELECT SCORE(1), duns.*
2 FROM duns, primary_contact
3 WHERE CONTAINS (duns.text_key, :search, 1) > 0
4 AND duns.duns_loc = primary_contact.duns_loc
5 AND primary_contact.emp_id = :employeeid
6 ORDER BY SCORE(1) DESC
7 /
SCORE(1) DUNS_LOC TEXT_KEY
18 1 highway
1 row selected.
Execution Plan
Plan hash value: 153618227
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 38 | 1406 | 83 (5)| 00:00:01 |
| 1 | SORT ORDER BY | | 38 | 1406 | 83 (5)| 00:00:01 |
|* 2 | HASH JOIN | | 38 | 1406 | 82 (4)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| DUNS | 38 | 1102 | 11 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | DUNS_TEXT_KEY_IDX | | | 4 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | PRIMARY_CONTACT | 4224 | 33792 | 70 (3)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("DUNS"."DUNS_LOC"="PRIMARY_CONTACT"."DUNS_LOC")
4 - access("CTXSYS"."CONTAINS"("DUNS"."TEXT_KEY",:SEARCH,1)>0)
5 - filter("PRIMARY_CONTACT"."EMP_ID"=TO_NUMBER(:EMPLOYEEID))
SCOTT@orcl_11gR2> -- in clause:
SCOTT@orcl_11gR2> SELECT SCORE(1), duns.*
2 FROM duns
3 WHERE CONTAINS (duns.text_key, :search, 1) > 0
4 AND duns.duns_loc IN
5 (SELECT primary_contact.duns_loc
6 FROM primary_contact
7 WHERE primary_contact.emp_id = :employeeid)
8 ORDER BY SCORE(1) DESC
9 /
SCORE(1) DUNS_LOC TEXT_KEY
18 1 highway
1 row selected.
Execution Plan
Plan hash value: 3825821668
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 38 | 1406 | 83 (5)| 00:00:01 |
| 1 | SORT ORDER BY | | 38 | 1406 | 83 (5)| 00:00:01 |
|* 2 | HASH JOIN SEMI | | 38 | 1406 | 82 (4)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| DUNS | 38 | 1102 | 11 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | DUNS_TEXT_KEY_IDX | | | 4 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | PRIMARY_CONTACT | 4224 | 33792 | 70 (3)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("DUNS"."DUNS_LOC"="PRIMARY_CONTACT"."DUNS_LOC")
4 - access("CTXSYS"."CONTAINS"("DUNS"."TEXT_KEY",:SEARCH,1)>0)
5 - filter("PRIMARY_CONTACT"."EMP_ID"=TO_NUMBER(:EMPLOYEEID))
SCOTT@orcl_11gR2> -
Tuning SQL query with SDO and Contains?
I'trying to optimize a query
with a sdo_filter and an intermedia_contains
on a 3.000.000 records table,
the query look like this
SELECT COUNT(*) FROM professionnel WHERE mdsys.sdo_filter(professionnel.coor_cart,mdsys.sdo_geometry(2003, null, null,mdsys.sdo_elem_info_array(1,1003,4),mdsys.sdo_ordinate_array(809990,2087279,778784,2087279,794387,2102882)),'querytype=window') = 'TRUE' AND professionnel.code_rubr ='12 3 30' AND CONTAINS(professionnel.Ctx,'PLOMBERIE within Nom and ( RUE within Adresse1 )',1)>0
and it takes 15s on a bi 750 pentium III with
1.5Go of memory running under 8.1.6 linux.
What can i do to improve this query time?
nullHi Vincent,
We have patches for Oracle 8.1.6 Spatial
on NT and Solaris.
These patches include bug fixes and
performance enhancements.
We are in the process of making these patches
avaialble in a permanent place, but until then, I will temporarily put the patches on:
ftp://oracle-ftp.oracle.com/
Log in as anonymous and use your email for
password.
The patches are in /tmp/outgoing in:
NT816-000706.zip - NT patch
libordsdo.tar - Solaris patch
I recommend doing some analysis on
individual pieces of the query.
i.e. time the following:
1)
SELECT COUNT(*)
FROM professionnel
WHERE mdsys.sdo_filter(
professionnel.coor_cart,
mdsys.sdo_geometry(
2003, null, null,
mdsys.sdo_elem_info_array(1,1003,4),
mdsys.sdo_ordinate_array(
809990,2087279,
778784,2087279,
794387,2102882)),
'querytype=window') = 'TRUE';
2)
SELECT COUNT(*)
FROM professionnel
WHERE CONTAINS(professionnel.Ctx,
'PLOMBERIE within Nom and ( RUE within Adresse1)',1) >0;
You might want to try reorganizing the entire
query as follows (no promises).
If you contact me directly, I can try to
help to further tune the SQL.
Hope this helps. Thanks.
Dan
select count(*)
FROM
(SELECT /*+ no_merge */ rowid
FROM professionnel
WHERE mdsys.sdo_filter(
professionnel.coor_cart,
mdsys.sdo_geometry(
2003, null, null,
mdsys.sdo_elem_info_array(1,1003,4),
mdsys.sdo_ordinate_array(809990,2087279,
778784,2087279,
794387,2102882)),
'querytype=window') = 'TRUE'
) a,
(SELECT /*+ no_merge */ rowid
FROM professionnel
WHERE CONTAINS(professionnel.Ctx,
'PLOMBERIE within Nom and
( RUE within Adresse1)',1) >0
) b
where a.rowid = b.rowid
and professionnel.code_rubr ='12 3 30';
**NOTE** Try this with no index on code_rubr
null -
How to write multi row sub query with the row containing range of values?
Hi all,
I have to include a column which contains weight ranges and it should come fom table called "report_range_parameters"
The following query will reutrn those weight ranges.
select report_parameter_min_value || ' -> ' || report_parameter_max_value
from report_range_parameters
WHERE report_range_parameters.report_parameter_id = 2359
and report_range_parameters.report_parameter_group = 'GVW_GROUP'
and report_range_parameters.report_parameter_name = 'GVW_NAME'
The below query should return the values group by those weight ranges.
How could I write that sub query?
select SUM(NVL("Class 0", 0)) "Class 0" ,
SUM(NVL("Class 1", 0)) "Class 1" ,
SUM(NVL("Class 2", 0)) "Class 2" ,
SUM(NVL(" ", 0)) "Total"
FROM (
SELECT report_data.bin_start_date_time start_date_time,
SUM(DECODE(report_data.gvw, 0, report_data.gvw_count, 0)) "Class 0" ,
SUM(DECODE(report_data.gvw, 1, report_data.gvw_count, 0)) "Class 1" ,
SUM(DECODE(report_data.gvw, 2, report_data.gvw_count, 0)) "Class 2" ,
SUM(NVL(report_data.gvw_count, 0)) " "
FROM report_data
GROUP BY report_data.bin_start_date_time
) results
RIGHT OUTER JOIN tmp_bin_periods
ON results.start_date_time >= tmp_bin_periods.bin_start_date_time
AND results.start_date_time < tmp_bin_periods.bin_end_date_time
GROUP BY tmp_bin_periods.bin_start_date_time,
tmp_bin_periods.bin_end_date_time Thanks.
Edited by: user10641405 on Jun 15, 2009 3:14 PM
Edited by: user10641405 on Jun 15, 2009 3:17 PMHi,
Assuming the following 4 things:
(1) report_range_parameters contains data like this, from your [previous thread|http://forums.oracle.com/forums/message.jspa?messageID=3541079#3541079]
id group name min_value max_value
1 gvw_group gvw_name 0 5
2 gvw_group gvw_name 5 10
3 gvw_group gvw_name 10 15(2) max_value is actually outside the range (that is, a value of exactly 5.000 is counted in the '5->10' range, not the '0->5' range)
(3) the range has to match some column x that is in one of the tables in your main query
(4) You want to add that column x to the GROUP BY clause
then you shopuld do somehting like this:
select SUM(NVL("Class 0", 0)) "Class 0" ,
SUM(NVL("Class 1", 0)) "Class 1" ,
SUM(NVL("Class 2", 0)) "Class 2" ,
SUM(NVL(" ", 0)) "Total"
, report_parameter_min_value || ' -> ' || report_parameter_max_value AS weight_range -- New
FROM (
SELECT report_data.bin_start_date_time start_date_time,
SUM(DECODE(report_data.gvw, 0, report_data.gvw_count, 0)) "Class 0" ,
SUM(DECODE(report_data.gvw, 1, report_data.gvw_count, 0)) "Class 1" ,
SUM(DECODE(report_data.gvw, 2, report_data.gvw_count, 0)) "Class 2" ,
SUM(NVL(report_data.gvw_count, 0)) " "
FROM report_data
GROUP BY report_data.bin_start_date_time
) results
RIGHT OUTER JOIN tmp_bin_periods
ON results.start_date_time >= tmp_bin_periods.bin_start_date_time
AND results.start_date_time < tmp_bin_periods.bin_end_date_time
LEFT OUTER JOIN report_range_parameters -- New
ON x >= report_parameter_min_value -- New
AND x < report_parameter_max_value -- New
AND report_range_parameters.report_parameter_id = 2359 -- New
and report_range_parameters.report_parameter_group = 'GVW_GROUP' -- New
and report_range_parameters.report_parameter_name = 'GVW_NAME' -- New
GROUP BY tmp_bin_periods.bin_start_date_time,
tmp_bin_periods.bin_end_date_time
, x -- New -
SQL Query criteria eliminates too many records
This SQL query results in zero out of 268 records due to the criteria of (((Products.ProductFamily)<=0))
SELECT images.url_img, images.alt_img, images.productid_img, Products.ProductFamily, Products.ID
FROM images LEFT JOIN Products ON images.productid_img = Products.ID
WHERE (((Products.ProductFamily)<=0));
However, if you change the <=0 to >0, the correct 140 out of 268 records show up. So if 140 records are greater than zero, shouldn't the remaining 128 records be less than or equal to zero? How do I get the results that are <=0 to show up?
FYI - Products.ProductFamily data type is numeric, field size is integer, decimal places is auto, default value is 0, required is No, indexed is NoYes, but can you still answer the question? I am trying to determine if the problem is in the join or the where clause. What happens if you remove the join and still include results from the product table? Can you give an example of data for a few rows (both tables) that are not working as expected?
-
AF Query: Criteria fields disappearing but result set not refreshed
I have been searching for days and cannot find a solution to this problem. I have an af:query component based on a view criteria. I have the query component only displayed as an advanced search without the basic/advanced toggle. A user can then use "Add Fields" and filter down their result set. Now whenever the user navigates away from that page and returns the filtered result set remains, but the list of fields that the user added to filter on are missing, i.e.
Search Box
Field1 is not blank
Navigate away and return
Search Box
blank; nothing listed here, but result set is still filtered for Field1 not blank.
The only thing the customer can do is add a bogus field, and then click reset to return the entire result set.
If anyone can help with this problem, I would greatly appreciate it. I am using:
JDeveloper 11.1.1.4
Oracle 11g
Weblogic 10.3
Thanks,
MichelleActually, in researching another problem, I think this is either a problem with jheadstart or with .jsff pages. I created a test case for a different problem that I posted to metalink and in this I did not use jheadstart and I used just a single .jspx page with a panel tabbed layout. The problem does not occur here, so one of the 2 is causing my problem, now the question is which.
Thanks for your help,
Michelle -
Hyperion Explorer 8.3 querying multiple tables that contain a specific item
I have 3 annual tables that contain data for 3 different years. Each table has a sale amount, item sold, and customer ID. I want to pull a specific customer ID from all 3 tables at once.
Is there a way to achieve this?
Thanks!
JohnnyAdd the 3 fields from the first table, then click Query > Append Query, then add the same 3 fields in the same order from the second table, then add the same 3 fields in the same order from the third table. This creates a UNION between the three tables; which means they need to be in the same order and have the same datatype.
If you want to show duplicate data found in the different sources, just change the UNION operator to a UNION ALL operator, otherwise it will suppress any duplicate rows.
To limit the data to one specific customer ID, you can set a limit on each of the UNION tabs with 'Customer ID = <selection>'.
Good luck!
Jarod Vierstra -
Query Runs - but XML contains no data
OK - I'm a real newbee so please excuse me if this is a dumb question.
I imported a working query into BIP. The query runs in BIP without error but all that is output is an XML skeleton that contains the correct number of rows but no data. It looks like this:
<ROWSET>
<ROW>
</ROW>
<ROW>
</ROW>
<ROW>
</ROW>
<ROW>
</ROW>
</ROWSET>
There is a message at the top that says "This XML file does not appear to have any style information associated with it. The document tree is shown below."
As noted, the query works fine outside of BIP. Any idea why the data isn't being returned?
Thanks for any help you can provide!There's the rub. It is in fact a rather intricate query that was not built in Query Builder. However, the query was executed using the same User ID both in BIP and in the external Query tool. The parameter values were the same as well. As noted, I think that the query returns data in both environments - it's just not making it into the XML file in BIP.
If it helps at all, here is the Teradata SQL I am trying to run. Please note that I did not write the query - it was generated by the reporting tool from which we are attempting to migrate - so please don't shoot the messenger :)
SELECT DT2.START_DT AS "START DATE"
,DT2.SUB_ACCT_ID AS "SUB ACCT ID"
,DT1.CALL_ID AS "CALL ID"
,DT1.CUST_SUPRT_PRDCT_ID AS "PRODUCT ID"
,DT2.USER_LAST_NAME AS "USER LAST NAME"
,DT2.USER_FIRST_NAME AS "USER FIRST NAME"
,DT1.CALL_REASN_DTL_NAME AS "CALL REASON DETAIL NAME"
,DT1.CALL_PRDCT_REASN_DTL_TEXT AS "CALL REASON DETAIL TEXT"
,DT1.CALL_REASN_NAME AS "CALL REASON NAME"
,DT1.PARENT_CALL_REASN_NAME AS "PARENT CALL REASON NAME"
,DT2.MIN_START_TIME AS "CALL START TIME"
,DT2.PRIM_MKT_CD AS "PRIMARY MKT CD"
,DT2.PRIM_MKT_DESCR AS "PRIMARY MKT DESCR"
,DT2.SUB_ACCT_NAME AS "SUB ACCT NAME"
,DT2.CUST_SUPRT_PRDCT_NAME AS "PRODUCT NAME"
FROM (SELECT T1.CALL_ID,
T4.CALL_REASN_DTL_NAME,
T1.CALL_PRDCT_REASN_DTL_TEXT,
T3.CALL_REASN_NAME,
T2.CALL_REASN_NAME AS PARENT_CALL_REASN_NAME,
T1.CUST_SUPRT_PRDCT_ID
FROM BI_CSR.CSR_CALL_PRDCT_REASN_DTL T1
LEFT OUTER JOIN BI_CSR.CS_CALL_REASN T2
INNER JOIN BI_CSR.CS_CALL_REASN T3
ON T2.CALL_REASN_NBR = T3.PARENT_CALL_REASN_NBR
ON T1.CUST_SUPRT_PRDCT_ID = T3.CUST_SUPRT_PRDCT_ID
AND T1.CALL_REASN_ID = T3.CALL_REASN_ID
AND T1.CALL_REASN_NBR = T3.CALL_REASN_NBR
INNER JOIN BI_CSR.CALL_REASN_DTL T4
ON T1.CALL_REASN_DTL_ID = T4.CALL_REASN_DTL_ID
WHERE (T1.CALL_ID IN
(SELECT TC.CALL_ID
FROM BI.SUB_ACCT_CURR TA,
BI_CSR.CSR_CALL_PRDCT_USER TB,
BI_CSR.CALL_DATA TC
WHERE (TA.PRIM_MKT_CD = :PrimaryMkt
AND TC.CLNDR_YR_MONTH = :YearMonth)
AND TC.CALL_ID = TB.CALL_ID
AND TB.SUB_ACCT_ID = TA.SUB_ACCT_ID
GROUP BY TC.CALL_ID ))
GROUP BY T1.CALL_ID,
T4.CALL_REASN_DTL_NAME,
T1.CALL_PRDCT_REASN_DTL_TEXT,
T3.CALL_REASN_NAME,
T2.CALL_REASN_NAME,
T1.CUST_SUPRT_PRDCT_ID) DT1
INNER JOIN (SELECT T8.CALL_ID
,T8.START_DT
,MIN (T8.START_TIME) AS MIN_START_TIME
,T4.PRIM_MKT_CD
,T1.PRIM_MKT_DESCR
,T4.SUB_ACCT_ID
,T4.SUB_ACCT_NAME
,T7.CUST_SUPRT_PRDCT_ID
,T2.CUST_SUPRT_PRDCT_NAME
,T5.USER_LAST_NAME
,T5.USER_FIRST_NAME
FROM BI.PRIM_MKT_LKUP T1,
BI_CSR.CUST_SUPRT_PRDCT T2,
BI_CSR.CALL_DATA T3,
BI.SUB_ACCT_CURR T4,
BI.USER_SIGNON_DIM T5,
BI_CSR.CSR_CALL_PRDCT_USER T6,
BI_CSR.CSR_CALL_PRDCT T7,
BI_CSR.CSR_CALL_CURR T8
WHERE (T4.PRIM_MKT_CD = :PrimaryMkt
AND T3.CALL_CNTR_CD = :CallCenter
AND T3.CLNDR_YR_MONTH = :YearMonth)
AND T2.CUST_SUPRT_PRDCT_ID = T7.CUST_SUPRT_PRDCT_ID
AND T7.CSR_ID = T8.CSR_ID
AND T7.CALL_ID = T8.CALL_ID
AND T7.CALL_REC_NBR = T8.CALL_REC_NBR
AND T8.CALL_ID = T3.CALL_ID
AND T7.CUST_SUPRT_PRDCT_ID = T6.CUST_SUPRT_PRDCT_ID
AND T7.CSR_ID = T6.CSR_ID
AND T7.CALL_ID = T6.CALL_ID
AND T7.CALL_REC_NBR = T6.CALL_REC_NBR
AND T7.PRDCT_CLASS_CD = T6.PRDCT_CLASS_CD
AND T7.CALL_CUST_SUPRT_PRDCT_ID = T6.CALL_CUST_SUPRT_PRDCT_ID
AND T6.USER_SIGNON_ID = T5.USER_SIGNON_ID
AND T6.SUB_ACCT_ID = T5.SUB_ACCT_ID
AND T5.SUB_ACCT_ID = T4.SUB_ACCT_ID
AND T4.PRIM_MKT_CD = T1.PRIM_MKT_CD
GROUP BY T8.CALL_ID,
T8.START_DT,
T4.PRIM_MKT_CD,
T1.PRIM_MKT_DESCR,
T4.SUB_ACCT_ID,
T4.SUB_ACCT_NAME,
T7.CUST_SUPRT_PRDCT_ID,
T2.CUST_SUPRT_PRDCT_NAME,
T5.USER_LAST_NAME,
T5.USER_FIRST_NAME) DT2
ON (DT1.CALL_ID = DT2.CALL_ID
AND DT1.CUST_SUPRT_PRDCT_ID = DT2.CUST_SUPRT_PRDCT_ID)
ORDER BY 1,2,3,4,5,6
Maybe you are looking for
-
Plz..answer how to solve the errors
HI to all, I am preparing for an Interview and i know some errors and but i dont know how we can solve them... I want to know the solution for these errors... 1)No Sid value found 2)Ale remote lock 3)Transact Trfc 4)Special Chars 5)errors in Sourc
-
Why is my Mail crashing (includes crash report link)
Hey all, On a mid-2012 13-inch MacBookPro with Mavericks and my Apple Mail is suddenly crashing and acting very strangely. In all my years on Macs it has always been the most stable program. Here's a link to the crash report (I've been getting other
-
Forum Search, 'Help' menu & Owners Manual in Logic = Cool !
Just three simple advices : This forum has a great 'Search' function on top right of this page. If you fill in your problem keyword/s there, you'll surely find answers pretty fast, as very many issues have been dealt with in here already. In most cas
-
How to get Database information properly to JTable...
Hi! Sorry to bother with this kind of stupid question but I thought I'd ask someone for help in here... The case is that I'm trying to learn the use of Swing components at the moment, and I had this strange idea of trying to add my databases to this
-
ADSL2+ line with ADSLMax profile
Hi, I have just migrated in from IDNet. I am on a fairly long line and have a sync around 5200 Kbs About 6 months ago, soon after my exchange was enabled, I moved onto WBC ADSL2+ and since than have enjoyed the higher upstream speed and a stable conn