HELP : customize SQL generated
Hi,
I've followed the Tutorial 'Generating a Struts-based JSP Application for an
Application Module', where I'm working with only one table.
When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
Every time I click on 'Browse', I always have this error :
Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
FROM timesheet Timesheet) ESTCOUNT
My config are :
* Win2K
* JAVA_HOME set to j2sdk1.4.1_01
* mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
* I use ultraDevHack=true as parameter within the URL
* JDev 9.0.3 prod release
Even with 'ultraDevHack=true' parameter, the subselect still not working.
I've seen in the forum that JDev Team have tried with that parameter, and it worked,
but it didn't mention with which version of mySQL and which JDBC driver.
I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
Anybody know how ?
The View Object Wizard didn't help me at all for the above SQL.
In fact I would like to fully controled, modified, or cuztomised all SQL generated.
Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
When I click on 'BC4J Admin', I have this :
500 Internal Server Error
OracleJSP: oracle.jsp.provider.JspCompileException:
Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
package _wm;
^
2 errors
Why is that ?
Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
Any of you have the same problem ?
Is it possible to put some criterias within the Search, i.e. Sort by Date ?
Thanks for any help.
CR4E and the Crystal Report Designer both has access to the SQL Command Object that you're trying to work with.
However, CR4E uses the Eclipse functionality - the SQL Command Scratchpad - that has more limitations than the Command Object editor in Crystal Report Designer.
Sincerely,
Ted Ueda
Similar Messages
-
Need help in SQL query to get only distinct records
Hi all.
I am new to oracle SQL and i want to write a query to get only distinct values from 2 tables.
for example i hade 2 tables table1(employee_id,employee_no,grade) and another table2 with same structure.
for example data in table1 is
Employeeid employeeno Grade
1 101 A
1 101 B
1 101 E
1 101 D
and data in table 2 is
Employeeid employeeno Grade
1 101 A
1 101 B
1 101 E
i want to display only the fourth row like the data that doesnt exist in table2 i,e (1 101 D)
I had too much records in both tables and i jst want to see the records that is in table 1 not in table 2 only.
employeeid and employeeno are the same in both tables
I hope u understand my query. I user left outer join and right outer join bt it displays all the results that and matching and unmatching. I want jst unmatched records.
Any help is highly Appreciated.
Thanx in Advance.
I am using oracle 10G on windowsTry MINUS:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries004.htm#i2054381
SQL> -- generating sample data:
SQL> with t1 as (
2 select 1 employeeid, 101 employeeno, 'A' grade from dual union
3 select 1, 101, 'B' from dual union
4 select 1, 101, 'E' from dual union
5 select 1, 101, 'D' from dual
6 )
7 , t2 as (
8 select 1 employeeid, 101 employeeno, 'A' grade from dual union
9 select 1, 101, 'B' from dual union
10 select 1, 101, 'E' from dual
11 )
12 --
13 -- actual query:
14 --
15 select employeeid
16 , employeeno
17 , grade
18 from t1
19 minus
20 select employeeid
21 , employeeno
22 , grade
23 from t2;
EMPLOYEEID EMPLOYEENO G
1 101 D
1 row selected. -
How can I install WEB PL/SQL Generator?
When I running "Install Web PL-SQL Generator",I got the following errors:
Someone help me, please!
No errors.
No errors.
Package wsglm...
Input truncated to 11 characters
No errors.
Package wsgjsl...
No errors.
Package wsgfl...
No errors.
Package wsgl...
Warning: Package created with compilation errors.
Errors for PACKAGE WSGL:
LINE/COL ERROR
62/22 PLS-00201: identifier 'OWA.VC_ARR' must be declared
62/22 PL/SQL: Declaration ignored
63/22 PLS-00201: identifier 'OWA_TEXT.VC_ARR' must be declared
63/22 PL/SQL: Declaration ignored
Package body wsgjsl...
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY WSGJSL:
LINE/COL ERROR
280/7 PL/SQL: Statement ignored
311/53 PLS-00905: object OWNER.WSGL is invalid
334/7 PL/SQL: Statement ignored
344/17 PLS-00905: object OWNER.WSGL is invalid
472/7 PL/SQL: Statement ignored
493/31 PLS-00905: object OWNER.WSGL is invalid
813/10 PL/SQL: Statement ignored
813/22 PLS-00905: object OWNER.WSGL is invalid
828/10 PL/SQL: Statement ignored
828/22 PLS-00905: object OWNER.WSGL is invalid
843/10 PL/SQL: Statement ignored
843/22 PLS-00905: object OWNER.WSGL is invalid
852/10 PL/SQL: Statement ignored
852/22 PLS-00905: object OWNER.WSGL is invalid
861/10 PL/SQL: Statement ignored
861/22 PLS-00905: object OWNER.WSGL is invalid
884/10 PL/SQL: Statement ignored
884/22 PLS-00905: object OWNER.WSGL is invalid
960/3 PL/SQL: Statement ignored
960/15 PLS-00201: identifier 'HTF.ESCAPE_SC' must be declared
Package body wsgl...
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY WSGL:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
1/14 PLS-00905: object OWNER.WSGL is invalid
1/14 PLS-00304: cannot compile body of 'WSGL' without its
specification
Package body wsgfl...
No errors.
No errors.
No errors.
No errors.
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY WSGMC_OUTPUT1:
LINE/COL ERROR
49/4 PLS-00201: identifier 'HTP.P' must be declared
49/4 PL/SQL: Statement ignored
51/7 PLS-00201: identifier 'HTP.P' must be declared
51/7 PL/SQL: Statement ignored
53/10 PLS-00201: identifier 'HTP.P' must be declared
53/10 PL/SQL: Statement ignored
60/4 PLS-00201: identifier 'HTP.P' must be declared
60/4 PL/SQL: Statement ignored
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY WSGMC_OUTPUT2:
LINE/COL ERROR
36/13 PLS-00201: identifier 'HTP.P' must be declared
36/13 PL/SQL: Statement ignored
42/10 PLS-00201: identifier 'HTP.P' must be declared
42/10 PL/SQL: Statement ignored
48/13 PLS-00201: identifier 'HTP.P' must be declared
48/13 PL/SQL: Statement ignored
53/16 PLS-00201: identifier 'HTP.P' must be declared
53/16 PL/SQL: Statement ignored
59/13 PLS-00201: identifier 'HTP.P' must be declared
59/13 PL/SQL: Statement ignored
64/10 PLS-00201: identifier 'HTP.P' must be declared
64/10 PL/SQL: Statement ignored
70/13 PLS-00201: identifier 'HTP.P' must be declared
70/13 PL/SQL: Statement ignored
87/28 PLS-00201: identifier 'HTP.BR' must be declared
87/28 PL/SQL: Statement ignored
92/25 PLS-00201: identifier 'HTP.P' must be declared
92/25 PL/SQL: Statement ignored
99/13 PLS-00201: identifier 'HTP.P' must be declared
99/13 PL/SQL: Statement ignored
The following synonyms already exist. Please check that they are valid:
OWA
OWA_UTIL
OWA_COOKIE
OWA_IMAGE
OWA_INIT
OWA_OPT_LOCK
OWA_PATTERN
OWA_SEC
OWA_TEXT
HTP
HTF
CG$ERRORS
WSGL
WSGJSL
WSGLM
WSGFL
Webserver Generator Compilation Report
NAME TY LINE COL TEXT
WSGJSL PB 311 53 PLS-00905: object OWNER.WSGL is invalid
280 7 PL/SQL: Statement ignored
344 17 PLS-00905: object OWNER.WSGL is invalid
334 7 PL/SQL: Statement ignored
493 31 PLS-00905: object OWNER.WSGL is invalid
472 7 PL/SQL: Statement ignored
813 22 PLS-00905: object OWNER.WSGL is invalid
813 10 PL/SQL: Statement ignored
828 22 PLS-00905: object OWNER.WSGL is invalid
828 10 PL/SQL: Statement ignored
843 22 PLS-00905: object OWNER.WSGL is invalid
843 10 PL/SQL: Statement ignored
852 22 PLS-00905: object OWNER.WSGL is invalid
852 10 PL/SQL: Statement ignored
861 22 PLS-00905: object OWNER.WSGL is invalid
861 10 PL/SQL: Statement ignored
884 22 PLS-00905: object OWNER.WSGL is invalid
884 10 PL/SQL: Statement ignored
960 15 PLS-00201: identifier 'HTF.ESCAPE_SC' must be
declared
NAME TY LINE COL TEXT
WSGJSL PB 960 3 PL/SQL: Statement ignored
WSGL PA 62 22 PLS-00201: identifier 'OWA.VC_ARR' must be
CK declared
AG
E
62 22 PL/SQL: Declaration ignored
63 22 PLS-00201: identifier 'OWA_TEXT.VC_ARR' must be
declared
63 22 PL/SQL: Declaration ignored
PB 1 14 PLS-00905: object OWNER.WSGL is invalid
1 14 PLS-00304: cannot compile body of 'WSGL' without
its specification
0 0 PL/SQL: Compilation unit analysis terminated
nullHi,
Is necesary install XDB?
Because i have executed;
select * from dba_registry
where COMP_ID = 'XDB'
Oracle XML Database
Regards -
To JDev Team : SQL generated, Struts, BC4J Admin, ...
Hi,
I've followed the Tutorial 'Generating a Struts-based JSP Application for an
Application Module', where I'm working with only one table.
When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
Every time I click on 'Browse', I always have this error :
Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
FROM timesheet Timesheet) ESTCOUNT
My config are :
* Win2K
* JAVA_HOME set to j2sdk1.4.1_01
* mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
* I use ultraDevHack=true as parameter within the URL
Even with 'ultraDevHack=true' parameter, the subselect still not working.
I've seen in the forum that JDev Team have tried with that parameter, and it worked,
but it didn't mention with which version of mySQL and which JDBC driver.
I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
Anybody know how ?
The View Object Wizard didn't help me at all for the above SQL.
In fact I would like to fully controled, modified, or cuztomised all SQL generated.
Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
When I click on 'BC4J Admin', I have this :
500 Internal Server Error
OracleJSP: oracle.jsp.provider.JspCompileException:
Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
package _wm;
^
2 errors
Why is that ?
Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
Any of you have the same problem ?
Is it possible to put some criterias within the Search, i.e. Sort by Date ?
Any help would be appreciated.Hi,
I've followed the Tutorial 'Generating a Struts-based JSP Application for an
Application Module', where I'm working with only one table.
When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
Every time I click on 'Browse', I always have this error :
Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
FROM timesheet Timesheet) ESTCOUNT
My config are :
* Win2K
* JAVA_HOME set to j2sdk1.4.1_01
* mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
* I use ultraDevHack=true as parameter within the URL
Even with 'ultraDevHack=true' parameter, the subselect still not working.
I've seen in the forum that JDev Team have tried with that parameter, and it worked,
but it didn't mention with which version of mySQL and which JDBC driver.
I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
Anybody know how ?
The View Object Wizard didn't help me at all for the above SQL.
In fact I would like to fully controled, modified, or cuztomised all SQL generated.
Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
When I click on 'BC4J Admin', I have this :
500 Internal Server Error
OracleJSP: oracle.jsp.provider.JspCompileException:
Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
package _wm;
^
2 errors
Why is that ?
Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
Any of you have the same problem ?
Is it possible to put some criterias within the Search, i.e. Sort by Date ?
Any help would be appreciated. -
SQL generated by EIS for Drill Through
Hello,<BR>We are currently using EIS 7.1 on AIX. When we run a drill through report on a large flat dimensional member there are two separate SQLs generated. The first SQL has a where condition with appx. half of the child members and the second one with second half. Is this due to any kind of limitation on he length of the SQL generated?<BR>If so is there any way to work around with this?<BR>THanks a lot in advance<BR>Kris
Hi Michael,
I have got the following inputs from the OLAP forum on this query:
P_S
Posts: 40
Registered: 5/29/07
How to see the SQL (OLAP DML) generated by Discoverer for OLAP
Posted: Aug 30, 2007 9:30 AM Reply
Hi,
I originally posted this query on the Discoverer forum, but it was then suggested to post it here in the OLAP forum. Please help.........
Is there a way to see the SQL (OLAP DML) generated by Discoverer for OLAP (the way we have "View SQL" in Discoverer Relational). The version in use is 10.1.2.48.18.
Thanks,
Piyush
KLaker
Posts: 1,341
From: Manchester, UK
Registered: 1/10/01
Re: How to see the SQL (OLAP DML) generated by Discoverer for OLAP
Posted: Sep 5, 2007 7:34 AM in response to: P_S Reply
Directly within Discoverer for OLAP (or Viewer)? No - because there is no way to change the behaviour of the generated SQL, you cannot add hints or create any MVs to change the SQL generated. You can trace the SQL generated during a Disco for OLAP query though by switching on some of the OLAP tuning and diagnostic features. There is more information contained in the Discoverer for OLAP Best Practices Guide:
http://www.oracle.com/technology/products/discoverer/pdf/discoverer_plus_olap_best_practices.pdf
Keith Laker
Oracle EMEA Consulting
BI Blog: http://oraclebi.blogspot.com/
DM Blog: http://oracledmt.blogspot.com/
BI on Oracle: http://www.oracle.com/bi/
BI on OTN: http://www.oracle.com/technology/products/bi/
BI Samples: http://www.oracle.com/technology/products/bi/samples/
Regards,
Piyush -
Need information in SQL generated after
Hi Experts,
SQL generated after executing the query always includes Data Package Dimension table & Unit Dimensional table .Can any help me in knowing why it is like that Or what is the concept behind.
Thanks & Regards
Sameer KhanHi Sameer,
Whenever a query is run, a SQL statement is triggered to fetch data from the BW server. In this process, the selections are passed to BW for fetching data for the Characetristics and keyfigures present in Initial query view. The DataPackage, Time and Units are the once to be filled first as these are the characteristics in default dimensions.
For free characetristics, as and when they are drilled again a Sub-SQL query is generated to fetch data corresponding to the free characteristic in the query. In case of attributes, SID's are used to fetch the attribute values from master data tables.
Also note the places where the SQL query looks for data in order:
BI Accelerator (If Implemented) -> Query Cache -> Aggregates (If any) -> DataTargets -> Master data tables.
Please let me know if you need any more information.
Regards,
Pankaj -
Need help in SQL (DENSE_RANK) function
Hello All,
I need the help in SQL.
We have a table called status and the column are
status_id number
account_id number
status_cd varchar2(10)
created_id varchar2(10)
created_by date
and data is as follows
insert into status values (1,101,'ENTER','ABC',to_date('21-JAN-2007 11:15:14','DD-MON-YYYY HH:MI:SS'));
insert into status values (2,101,'REVIEW','DEF',to_date('21-JAN-2007 11:30:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (3,101,'APPROVE','GHI',to_date('21-JAN-2007 11:30:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (4,102,'ENTER','ABC',to_date('21-JAN-2007 11:18:14','DD-MON-YYYY HH:MI:SS'));
insert into status values (5,102,'REVIEW','DEF',to_date('21-JAN-2007 11:33:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (6,102,'CANCEL','GHI',to_date('21-JAN-2007 11:33:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (7,103,'ENTER','ABC',to_date('21-JAN-2007 11:21:14','DD-MON-YYYY HH:MI:SS'));We have different status as follows
1. ENTER
2. REVIEW
3. APPROVE
4. CANCEL
5. REJECT
My requirement ..
I need the max of created_id column for the status in ('APPROVE','CANCEL') and if there is no status in ('APPROVE','REVIEW') than it should be NULL.
I wrote an SQL as
select account_id,max(created_id) keep (dense_rank first order by decode(status_cd,'APPROVE',created_dt,'REVIEW',created_dt,NULL) DESC NULLS LAST,
decode(status_cd,'APPROVE',status_id,'REVIEW',status_id,NULL) DESC NULLS LAST) last_app_rev_user
from status
group by account_id and gives me the output like
ACCOUNT_ID LAST_APP_R
101 GHI
102 DEF
103 ABCBut I want the Output like
ACCOUNT_ID LAST_APP_R
101 GHI
102 DEF
103 NULLAs the account 103 has no status called 'REVIEW' and 'APPROVE'
My DB Version in 10.2.0.3.0.
Hope I explain it properly. And if you have any other option without dense_rank still i will be happy.
Thanks in advance for your help.
AB
null
Message was edited by:
ABinstead of max(created_id) keep... use
smth like max(case when status_cd in ('APPROVE','REVIEW') then created_id end) keep... -
View log not showing physical SQL generated in OBIEE 11.1.1.6.7
Hi,
I am currently using OBIEE 11.1.1.6.7 version. In this version I am unable to view the physical SQL generated by OBIEE under Administration --> Manage Marketing Jobs --> Select a Job --> Click on View SQL OR Administration --> Manage Sessions--> Select a Job --> Click on View SQL. It is not showing the physical SQL generated by OBIEE for a report or segment which I have executed.
It was available in previous version i.e. OBIEE 10.1.3.4.2.
I have searched in metalink and it has been suggested to use the following <Filters> section into instanceconfig.xml file. I have added the following details into existing instanceconfig.xml file and then restarted the BI services. Still the problem persist.
<Filters>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control--><FilterRecord writerClassGroup="Console" path="saw" information="16" warning="31" error="31" trace="32" incident_error="1"/>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control--><FilterRecord writerClassGroup="File" path="saw" information="16" warning="31" error="31" trace="32" incident_error="1"/>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control--><FilterRecord writerClassGroup="Marketing" path="saw.mktgsqlsubsystem.joblog" information="16" warning="31" error="31" trace="32" incident_error="1"/>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control--><FilterRecord writerClassGroup="File" path="saw.httpserver.request" information="16" warning="31" error="31" trace="32" incident_error="1"/>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control--><FilterRecord writerClassGroup="File" path="saw.httpserver.response" information="16" warning="31" error="31" trace="32" incident_error="1"/>
</Filters>
Thanks,
PrasantaHi,
Thanks for the reply.
We used to view the log details (physical SQL) using Manage Marketing Jobs in OBIEE10g.
In OBIEE11g we can see the job details and when selecting a job (under Action column Details link) there is an option in left pane as 'View Log'. If I click on 'View Log' it is showing as 'No Logs Found'.
Just wanted to confirm if this is an issue in OBIEE11g.
Also, I believe there is a limitation in 'Manage Session' to view the number of job details whereas in 'Manage Marketing Jobs' section we can increase the number of jobs to be displayed.
Thanks,
Prasanta -
Is there any context-sensitive help in SQL Developer. I'm looking for a way to link SQL syntax with some sort of a Help function. Searching the SQL Reference pdf just doesn't cut it. For example, when I search the SQL Reference pdf for Round, I get 134 hits. I would look for a page or 2 on how to use Round, with examples, but accessible directly from SQL Developer.
No there isn't.
There's a rejected feature request for this at the Exchange (http://htmldb.oracle.com/pls/otn/f?p=42626:39:947182819474243::NO::P39_ID:5662), so chances are very small it ever makes it in.
Nevertheless, you can still vote and add comments there; if there's enough weight on an item it will eventually make it for the TODO list.
Including the doc isn't necessary, but just linking to the correct page would save a lot of time. In the case of ROUND, on pressing F1 inside the code editor or worksheet, sqldev could link directly to the SQL reference (http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions135.htm).
If the team doesn't want to put it in, maybe someone else does. It would make a nice extension... if you feel up for it?
K. -
Need help with SQL Query with Inline View + Group by
Hello Gurus,
I would really appreciate your time and effort regarding this query. I have the following data set.
Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*20.00*-------------19
1234567----------11223--------------7/5/2008-----------Adjustment for bad quality---------44345563------------------A-----------------10.00------------19
7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765--------------------I---------------------30.00-------------19
Please Ignore '----', added it for clarity
I am trying to write a query to aggregate paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number. When there are no multiple records I want to display the respective Description.
The query should return the following data set
Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*10.00*------------19
7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765-------------------I---------------------30.00--------------19
The following is my query. I am kind of lost.
select B.Description, A.sequence_id,A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
from (
select sequence_id,check_date, check_number, invoice_number, sum(paid_amount) amount, vendor_number
from INVOICE
group by sequence_id,check_date, check_number, invoice_number, vendor_number
) A, INVOICE B
where A.sequence_id = B.sequence_id
Thanks,
NickIt looks like it is a duplicate thread - correct me if i'm wrong in this case ->
Need help with SQL Query with Inline View + Group by
Regards.
Satyaki De. -
Accessing online help in Sql developer
For some reason I have lost the ability to access Help in Sql Developer. Nothing happenx when I click on the "Table of Contents" in the Help menu. I un and re installed Sql Developer, but thie problem remains.
My OS is vista 32 bit.
Thanks
MewbieThere's a +\sqldeveloper\system1.5.1.54.40\o.ide.11.1.1.0.22.49.42\windowinglayout.xml+ under your user profile. Deleting that should revert illegal positions (as it may have got pushed off screen).
You can also delete the whole +\sqldeveloper+ folder (or selective subfolders) to reset everything to factory defaults...
Hope that helps,
K. -
[NQQuery log]: Physical SQL generated agaisnt 2 Database in OBIEE 11g
Hi Experts,
I have a problem regarding the physical SQL generated by Query log.
So this is the setup.
SCENARIO 1:
Oracle Data Warehouse DB
- col1
- col2
- col3
OLAP_OBIEE
- col4
When I run these columns together in Analysis. It seems like the physical SQL generated in the Query log is partitioned with each other and I cant get the exact SQL so I can make comparison with the total record count in Analysis UI and the SQL developer.
select col1, col2, col3 from Oracle Data Warehouse tables
select col4 from OLAP_OBIEE tables
================================================================
SCENARIO 2:
Oracle Data Warehouse DB
- col1
- col2
- col3
- col4
Running these columns together in Analysis. I am wondering why the physical SQL is somewhat also partitioned just like in SCENARIO 1.
select col1, col2, col3 from Oracle Data Warehouse tables
select col4 from Oracle Data Warehouse tables
Hope that you get what am I trying to say. :(
Thanks,
Edited by: OBIEE/BIP Forumer on Oct 29, 2012 1:27 AM
Edited by: OBIEE/BIP Forumer on Oct 29, 2012 1:27 AMHi Maqsoon,
Sorry for the confusion, in my Analysis report, I have a report where it generates 2 physical SQL in one Database, also I have a report where it uses 2 Database which also generates 2 physical SQL.
Below is the SQl generated in my Analysis report using 1 Database
select count(distinct case when T68197.OPTY_WID > 0 then concat(T67058.INTEGRATION_ID, cast(T67058.DATASOURCE_NUM_ID as CHARACTER ( 30 ) )) end ) as c1,
T67058.OPTY_O_REVN as c2,
T67365.CUST_VALUE_NAME as c3,
T157680.NAME as c4,
T157680.INTEGRATION_ID as c5
from
W_OPTY_D T67058 /* Dim_W_OPTY_D */ ,
W_REVN_F T68197 /* Fact_W_REVN_F */ ,
W_PARTY_D T157680,
W_PARTY_ORG_D T67365
where ( T67058.ROW_WID = T68197.OPTY_WID and T67365.ROW_WID = T157680.PARTY_ORG_WID and T68197.PR_CUSTOMER_WID = T157680.ROW_WID )
group by T67058.OPTY_O_REVN, T67365.CUST_VALUE_NAME, T157680.NAME, T157680.INTEGRATION_ID
order by c5, c2
[2012-10-30T11:44:39.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-18] [] [ecid: 352c537d7893ee94:-5718ddd6:13aaccb7670:-8000-0000000000005c50] [tid: f650d700] [requestid: 45ca0005] [sessionid: 45ca0000] [username: joshua.l.manego.iii] -------------------- Sending query to database named Oracle Data Warehouse (id: <<1201371>>), connection pool named Oracle Data Warehouse Connection Pool, logical request hash edb0c7c0, physical request hash 87553d2a: [[
select sum(D1.c1) over (partition by D1.c4, D1.c2) as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
sum(D1.c5) over (partition by D1.c6, D1.c4, D1.c2) as c5,
D1.c6 as c6
from
(select count(T84444.ORDER_WID) as c1,
T67365.CUST_VALUE_NAME as c2,
T157680.NAME as c3,
T157680.INTEGRATION_ID as c4,
sum(T84444.ORDER_NRC) as c5,
T67058.OPTY_O_REVN as c6
from
W_OPTY_D T67058 /* Dim_W_OPTY_D */ ,
W_PARTY_ORG_D T67365,
W_ORDER_F T84444 /* Fact_W_ORDER_F */ ,
W_PARTY_D T157680
where ( T67058.ROW_WID = T84444.OPTY_WID and T67365.ROW_WID = T157680.PARTY_ORG_WID and T84444.CUSTOMER_WID = T157680.ROW_WID )
group by T67058.OPTY_O_REVN, T67365.CUST_VALUE_NAME, T157680.NAME, T157680.INTEGRATION_ID
) D1
order by c4, c6
Below is the physical SQL that uses 2 Database
select T68071.QUOTE_NUM as c1,
T116081.CURRENT_BASE_POSTN as c2,
T66755.PER_NAME_MONTH as c3,
T68071.STATUS_I as c4,
T68071.QUOTE_TYPE_I as c5,
T68071.SUB_TYPE_I as c6,
T84523.ROW_WID as c7
from
W_POSITION_D T74722 /* Dim_W_POSITION_D */ ,
W_QUOTE_D T68071 /* Dim_W_QUOTE_D */ ,
W_QUOTE_F T84523 /* Fact_W_QUOTE_F */ ,
W_DAY_D T66755 /* Dim_W_DAY_D_Common */ ,
W_POSITION_DH T116081 /* Dim_W_POSITION_DH_Position_Hierarchy */
where ( T66755.ROW_WID = T84523.OPEN_DT_WID and T68071.ROW_WID = T84523.QUOTE_WID and T74722.ROW_WID = T84523.PR_EMP_POS_WID and T74722.ROW_WID = T116081.POSITION_WID and T84523.PR_EMP_POSTN_DH_WID = T116081.ROW_WID )
order by c7
[2012-10-30T11:51:42.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-18] [] [ecid: 352c537d7893ee94:-5718ddd6:13aaccb7670:-8000-0000000000005cb8] [tid: f61fc700] [requestid: 45ca0007] [sessionid: 45ca0000] [username: joshua.l.manego.iii] -------------------- Sending query to database named OLAP_OBIEE (id: <<1204144>>), connection pool named Connection Pool, logical request hash c180fd3b, physical request hash a2e8b0d6: [[
select T315910.NIVEL_APPROVACAO as c1,
T315910.ALCADA_DESCONTO as c2,
T315910.ROW_WID as c3
from
W_QUOTEITEM_F T315910
order by c3
Based on what you said, so it is impossible to merge the physical SQL if we use 2 Database right?
Your effort in answering to my question is much appreciated, Thank you. -
JDEV 10.1.3 EJB 3.0 Is it a way in JDev to monitor the sql generated
Is it a easy way to monitor/log the sql generated by top link (ejb 3.0 with top link as cmp) directly in JDeveloper (embededd oc4j)
Deleting the bean class sources from JDev don't delete the compiled class and the wizard will add a sequential number to the entity bean name and source file. This is not very convenient. As workaround you will have to delete the class file.
-
Can u give an detail examples or help on SQL- loader
Can u give an detail examples or help on SQL- loader
I need full details on this how to run and what are the pre requirements for this and what
Can u give an example with unix+sql loaderThe Oracle Utilities manual has a chapter on SQL*Loader Case Studies
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch10.htm#1656
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
WEB PL/SQL Generated forms
Have anyone tried to "play" with this code, or rather.... the .TPX files in the $ORA_HOME/CGENW61/CVWTPL directory?
I have a need to "customize" several aspects of the generated code.
Anyone?hi, if you need to customize the generated labels , try you with $ORA_HOME/CGENW61/CVWETC/WSGLM.PKS, replace the labels and details that you like change and run this script connected with your user. I made it, I run script WSGLME.PKS to change the labels to spanish.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MK ([email protected]):
Have anyone tried to "play" with this code, or rather.... the .TPX files in the $ORA_HOME/CGENW61/CVWTPL directory?
I have a need to "customize" several aspects of the generated code.
Anyone?<HR></BLOCKQUOTE>
null
Maybe you are looking for
-
How to pass a where-clause to a procedure
I have to develop a stored procedure where a part of the where-clause of the select of a cursor depends on the input parameter. My procedure should be something like this: procedure myproc (WHERECLAUSE in varchar2(100)) is begin declare cursor my
-
Prifiler in LV6.1 does not work properly
Hello All Profiler shows wrong execution time of my subvis. E.g. 0 us of the vi which was exectutred 8 times. Is there any profiler setup or something. thanks in advance Pawel
-
how can i log-in as a guest user in portal?
-
Embedding Keywords into Metadata?
How do I embed keywords into photo metadata so that it is there permanently? (using Maverics and iPhoto 11)
-
New LR5 did not import LR4 pictures
I've read several other threads regarding this and none seem to answer a very basic question: I have thousands upon thousands of pictures in LR4 that did not automatically go into LR5 just now (no import window opened up when I first started the prog