Query builder results restricted to 500 rows
Hi all,
In apex Query buillder utility results restricted to return only 500 rows. We need more than 500 rows to be returned. Is there anyway to changes this 500 rows limitation.
Thanks in advance.
Regards,
Vinodh Kumar
Hi,
You can see this similar post
Query builder -APEX
Br,Jari
Similar Messages
-
Query Builder results seem to max out at 500 lines. How to change?
Hi all,
Some of out Application Express users are using the Query Builder tool for ad-hoc reporting. The idea is to run the SQL to extract the data, then download to MS Excel. The Query Builder results seem to max out at 500 lines. I want to increase that value. I searched all Application Express forums for 'query builder output max 500' and then 'query builder output' and did not find the answer.
How do I change the 500 line limit in Query Builder results?
Thanks!
Application Express 3.1.2.00.02
Oracle 10g
Standard PDF printing (not BI Publisher)Bryan,
Here is a link to an HTML-DB studio application, that is a QBE "replacement" for the query tool in APEX development..
http://htmldb.oracle.com/pls/otn/f?p=18326:7:1387557504245687::::P7_ID:1222
It is for an older version of APEX, but you should be able to make it work for your needs..
Thank you,
Tony Miller
Webster, TX -
Query results more than 200 rows.
Hi all:
I have a problem with a query that results more than 200 rows.
Only show in a table 201 rows and warning about this message: "Query has exceeded 200 rows. Potentially more rows exist, please restrict your query."
Is possible that the query show all results ???
thanks!Its still a warning. You can continue with work but definitely you can increase the value through the profile value. Anything within 500 wouldn't cause much performance issue.
--Shiv -
Results in Query Builder Differ From Report Results
I've got a report I built in SSRS using an SSAS dataset. The problem is that the results differ between the query builder result set and the actual report. For some reason, when running the actual report, certain rows are being filtered out, but yet those
same rows appear in the result set when validating the query in the query builder.
Here's the result set as it appears in query builder:
...and here are the results of the actual report:
As you can see, 3M and Angie's popcorn are not returned in the report. I have no filters defined on the report at all.
This appears to be happening with other result sets for the same report.
No idea why the results are accurate in query builder and then off in the actual report.
Any help would be appreciated!
A. M. RobinsonHi A. M. Robinson,
The issue may be caused by the data cache. When we preview a report, the report processor runs all the queries for datasets in the report using the current parameter defaults, and saves the results as a local data cache (.rdl.data) file. We can continue
to design our report without incurring the overhead of retrieving this data again if we make no changes to either the report dataset queries or the report parameters. Please to delete the cache (.rdl.data) file try to solve the issue.
Reference: http://technet.microsoft.com/en-us/library/ms157366.aspx
Alternative, you can create a similar report to check if the issue is persist.
If the issue is persist, could you please post more detail information about your report design? It is benefit for us to do further analysis.
Regards,
Alisa Tang
If you have any feedback on our support, please click
here.
Alisa Tang
TechNet Community Support -
Query Builder - sort order causing ORA-00979 error
Hello,
I'm having an issue with the "sort order" clause in the query builder tool when using a function on the same column.
I've build a simple query in the gui and the following statement is displayed in the SQL Window
select "DEMO_ORDER_ITEMS"."ORDER_ID" as "ORDER_ID",
sum(DEMO_ORDER_ITEMS.QUANTITY) as "QUANTITY"
from "DEMO_ORDER_ITEMS" "DEMO_ORDER_ITEMS"
group by DEMO_ORDER_ITEMS.ORDER_ID
and if I add a sort order of "1" on the quantity field, the following query is changed to
select "DEMO_ORDER_ITEMS"."ORDER_ID" as "ORDER_ID",
sum(DEMO_ORDER_ITEMS.QUANTITY) as "QUANTITY"
from "DEMO_ORDER_ITEMS" "DEMO_ORDER_ITEMS"
group by DEMO_ORDER_ITEMS.ORDER_ID
order by DEMO_ORDER_ITEMS.QUANTITY DESC
When running this query I get an error
failed to parse SQL query:
ORA-00979: not a GROUP BY expression
It is quite obvious what is wrong with the query but I don't know how to get the query builder tool to generate the correct statement. The order by clause should be order by sum(DEMO_ORDER_ITEMS.QUANTITY) DESC.
I've tried to do some searching and haven't found much documentation on this issue. Any assistance is appreciated.
Thanks,
TonyWhile this statement is generally certainly true and should also be remembered, it is not really helpful for the specific case.
I think the behaviour described is a bug. However this might be one a little difficult to solve. The user unfortunatly can't influence much of the query builder results directly.
Either put 1 into the order by clause or use the column alias name without table alias name ("QUANTITY" only).
My personal solution would be NOT TO use any sort criteia in the query builder. This makes sense in so far as the generated SQL is often basis for some report. If that is an interactive report you won't add a sort order anyway. This is a layout thing and layout will be handled by the end user itself. he can choose whatever sorting he wants.
Edited by: Sven W. on Jul 22, 2009 11:43 AM -
How to restrict number of rows returned in a query
Hi frnds,
I'd like to restrict number of rows returned by my query to some 10 rows. how to do that.When I try doing with the rownum<10 its giving results for a particular dept and that too some 6 rows only...btw I'm grouping my table and includes joins from many a table and am ordering the table results by a column.. How to do this..776317 wrote:
Hi frnds,
I'd like to restrict number of rows returned by my query to some 10 rows. how to do that.When I try doing with the rownum<10 its giving results for a particular dept and that too some 6 rows only...btw I'm grouping my table and includes joins from many a table and am ordering the table results by a column.. How to do this..
TELL ME HOW MANY ROWS YOU HAVE IN TABLE?
Because you have only *6 rows* in you column, if you less than 10 rows then it displays only containied/exist rows. nothing much
select ename,empno from emp where rownum < 10;Thanks -
Query Builder problem - query results from previous query
Hi.
I have a 100% repeatable problem in Oracle Query Builder (Version 6.0.7.1.0) where some rows from the results of a previous query appear in the results for the current query. The queries being run are saved in *.brw files. If I close down Query Builder completely between queries, there is no problem. If I run one query, export the results to a CSV file, close that query and then open a second query, when I run the second query there are rows in the results that shouldn't be there (they are remnants of the first query). Interestingly the total number of rows for the second query is correct, so the same number of rows are missing as shouldn't be there. Anyone come across this before? Problem is repeatable for different database users and on different computers.
regards,
Martinas i posted earlier .. queryBuilder as a stand alone product is neither supported nor available anymore. it is only available as part of the report data wizard.
thanks,
ph. -
I need to print one query result as a single row
Hi,
I need to print one query result as a single row ,which gives more than one value (of subinventories)and also i would like to print the quantity of that particular subinventory at particular place.Please suggest how can i do this in the report builder?Actually I need to print inventory report with subinventory break up.For that all subinventories of category code AB are taken as single row.Based on that subinventory value Quantity must be printed at that particular place.
For ex
Quantity
Item no Description Subinventory Code AB_Abc AB_Def AB_ghi
1 ***** 12 9
2 ****** 8 5
like that.I am waiting for the reply.Plz its some how urgent.
Thank you, -
Main Query modification result Report builder crash [Solved]
Hi,
I want to modify main Query of report builder because (it shows two columns which are not generated by query and when I run report it raises error that columns not found) but when I modify the query it result in report builder crash, plz give me any solution, I had experience same issue a month ago and I created new query with all formula columns but this time I have too much CF and CP columns is there any way to drop it from one group to another.
Thanks and Regards, Khawar.
Details:
OS windows XP/2000
Report Builder 10.1.2.0.2
ORACLE Server Release 10.1.0.4.2
Oracle Procedure Builder 10.1.2.0.2
Oracle ORACLE PL/SQL V10.1.0.4.2 - Production
Oracle CORE 10.1.0.4.0 Production
Oracle Tools Integration Services 10.1.2.0.2
Oracle Tools Common Area 10.1.2.0.2
Oracle Toolkit 2 for Windows 32-bit platforms 10.1.2.0.2
Resource Object Store 10.1.2.0.2
Oracle Help 10.1.2.0.2
Oracle Sqlmgr 10.1.2.0.2
Oracle Query Builder 10.1.2.0.2 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle ZRC 10.1.2.0.2
Oracle XML Developers Kit 10.1.0.4.2 - Production
Oracle Virtual Graphics System 10.1.2.0.2
Oracle Image 10.1.2.0.2
Oracle Multimedia Widget 10.1.2.0.2
Oracle Tools GUI Utilities 10.1.2.0.2
Message was edited by:
S. KhawarHi,
I saved the report in JSP format and did the required change and it works great.
Regards, Khawar. -
Query results:every other record/row grey and white
Hello guys,
query results:every other record/row grey and white
how would you make every other record/rows a different color
just like the forums color. Lightest grey and white?
<cfquery name="Myqueryname"
datasource="#Request.MainDSN#">
SELECT
CompanyID,
CompanyName,
Address,
City,
State,
ZipCode,
Comments
FROM
Company
ORDER BY
CompanyName ASC
</cfquery>
<html>
<head>
<title>CF TUTORIALS</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>All CO Listings</h1>
<table>
<tr>
<td><b>ID</b></td>
<td><b>Name</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>ZIP Code</b></td>
<td> </td>
</tr>
<cfoutput query="Myqueryname">
<tr>
<td>#CompanyID#</td>
<td>#CompanyName#</td>
<td>#Address#</td>
<td>#City#</td>
<td>#State#</td>
<td>#ZipCode#</td>
<td>
<a href=" ALL Emps.cfm?CompanyID=#CompanyID#">ALL
Emps</a>
<a href=" AddCO Form.cfm">AddCO</a>
<a href="
Editco.cfm?CompanyID=#CompanyID#">Editco</a>
<a
href="CoDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
</td>
</tr>
</cfoutput>
</table>
</body>
</html>There is a cool tool in Coldfusion called MOD
This basically calculates the remainder of the row number
when divided.
I interpreted its use to something like this, which has
worked for me.
<cfoutput query="qry_requestedlist" maxrows="30"
startrow="1">
<cfset EvenRow=#CurrentRow# +1>
<cfif CurrentRow Mod 2 IS 1>
<tr>
<th class="grey" CurrentRow#</th>
<cfelse>
<th class="white">#CurrentRow#</th>
<tr>
</cfif>
</cfoutput>
I doubt this is precisely what you want but this is the sort
of thing. -
2.1 EA1: Query Builder does not update View Results query
When using the Query Builder, if you click onto the View Results tab to see the current query results, then go back to the "Select Columns" or "Create Where Clause" tabs to change the query, the "View Results" tab still shows the results of the original query even if none of the tables or columns from the original query exist. Clicking the Run Report button or setting a refresh interval has no effect.
On a further note, the query builder still is not reentrant, in that you can't select (highlight a portion of or position the cursor within) a query and open the query builder for that query to graphically make modifications.Sentinel,
The issue is known and is listed in the known issues in the release notes for the early adopter. We hope to have this addressed for production.
The re-entrant query builder is still on our list of things to do. We plan to rewrite the Query Builder and address a number of the requests related to this feature. I'm hoping to make it a priority for the next release.
Sue -
Report Builder 2.0 returning duplicate rows in query designer
Hi,
I have a query running off a model, when I explore the data in the model and in a standard sql table it returns one row for each record, which include a unique id for each which is correct.
When I go into report builder query designer, it shows duplicate rows for each record. I have removed and added fields to try and pin point why and the only reason i can come up with is that it runs fine until I add in a field thats varchar(255) or
varchar(max). This is when it starts to duplicate the records.
Can anyone tell me why it does this or point me in the direction of how to stop this. I can't edit the query in text to add DISTINCT so thats not an option.
Many thanks,
JJSJOK - I have found a partial answer. By Googling Report Builder and VARCHAR, I found another post which reported problems with the semantic query builder when the underlying table/view was returning columns of type VARCHAR(MAX).
On looking at the length setting for the data column in the DSV, this reported a length of 2,147,483,647 for this field. This is very odd because on querying the underlying table the largest length that I can find for this column is 191,086
(which is far larger than I would have expected - I am investigating this separately).
However, why should the Report Model think that this field contains such a large value?
Anyway, the other post that I found reported that they had solved their problem by converting the field to a VARCHAR (255). I tried this (by casting the column in my View to VARCHAR(255)) and this resolved the problem
- no more duplicate rows when adding this field to the query!!!
I also tried CASTING to TEXT and to VARCHAR(8000). The former did not resolve the problem; the latter did.
So I have a workaround but I don't understand why.
Can anybody explain why having a VARCHAR(max) column in my entity causes duplicate rows.
I suspect it is to do with the fact that for some reason the Report Model seems to think that there is an exceptionally long text string stored in this column in one of the rows but that again is a puzzle.
Thanks
Richard -
Result Source Query Builder Filter for Content Sources
I have several content sources that I want to add to a result source as a property filter. It works fine if I just have one but when I add multiple content sources it does not give me all the results. Is there a way to add more than one content source
filter to one result source.Hi SpGurlz,
How did you set the filter with content source in the query builder for the result source?
I tested with more than one content source as filter in the query builder for the result source in my environment, and all the corresponding results were displayed fine.
The query text for the result source was set like this: {searchTerms} contentsource:file1 contentsource:file2.
Remember to add a space between the “{searchTerms}”, “contentsource:file1” and “contentsource:file2”.
You can provide the query text of your result source here and I will help to check the logic.
Best regards,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Restrict access to Query Builder component in SQL Workshop
Hello folks,
Can someone tell me if it is possible for an end-user to have access to the Query Builder component only?
End-users on our site are currently using the stand alone version of the old Query Builder (OBE60.EXE), which is not supported any longer, and have compatibility issues when used against a 10g database.
I'm looking for an alternative (query-only) tool, and came across the Query Builder component in Oracle Application Express. But couldn't find anything there that would allow me to limit access to this component for an end-user.
Please let me know if this can be achieved, and if not, is anyone aware of an equivalent tool that would do the job?
Many Thanks,
PraveenHello,
No, that functionality does not exist currently, you would need to build your own.
If you search this forum there are a few threads which detail how you can install the Application Builder and SQL Workshop applications into the APEX environment itself so you can see how they (meaning the Oracle team) have built those apps.
Hope this helps,
John.
http://jes.blogs.shellprompt.net
http://apex-evangelists.com -
Using all results in a multiple row resultset returned by a subquery
I solved the problem of splitting up the dimension fields for each account code as referenced in my first post. Now I am needing to return the budget amounts of each account code (some account codes return multiple amounts). I need to do this
for five sets of years so that I show each year in its own column (a Proposed Budget Year, a Current Budget Year, and three historical budget years).
Right now I am attempting to use joins to the three tables that show the different types of amounts. Some account codes will return multiple amount values for the same account code in the same year. I need all of these amounts in a row associated
with the account code so that I can group and sum them later on by differing criteria from the dimension fields. Here is what I have so far (it returns the account codes and dimension fields correctly, but the amounts aren't working and I can't figure
out how to make them work.
USE [Financial]
-- Input variables from web page
DECLARE @pkYear INT;
DECLARE @Fund INT;
DECLARE @Function INT;
DECLARE @FundingSource INT;
DECLARE @OperationalUnit INT;
DECLARE @JobClass INT;
DECLARE @Version INT;
DECLARE @Object INT;
DECLARE @Instorg INT;
DECLARE @SubMat INT;
DECLARE @SCC INT;
DECLARE @ExcludeNoAct INT;
DECLARE @CurrentUser INT;
-- Variables to calculate budget years
DECLARE @PeriodStartDate VARCHAR(256);
DECLARE @PeriodEndDate VARCHAR(256);
DECLARE @ProposedBudgetYear INT;
DECLARE @CurrentBudgetYear INT;
DECLARE @BudgetYear1 INT;
DECLARE @BudgetYear2 INT;
DECLARE @BudgetYear3 INT;
DECLARE @YearStartDateYear INT;
DECLARE @ProposedYearStartDateYear INT;
DECLARE @Year1StartDateYear INT;
DECLARE @Year2StartDateYear INT;
DECLARE @Year3StartDateYear INT;
DECLARE @YearStartDate DATE;
-- Set variables to test query
SET @pkYear = 5;
SET @ExcludeNoAct = 0;
SET @CurrentUser = 1;
SET @YearStartDate = (SELECT TOP 1 BeginDate FROM fiYear Y
Where Y.pkYear = @pkYear);
PRINT @pkYear;
PRINT @YearStartDate;
-- Set variables for budget years
SET @YearStartDateYear = YEAR(@YearStartDate);
SET @ProposedYearStartDateYear = @YearStartDateYear + 1;
SET @Year1StartDateYear = @YearStartDateYear - 1;
SET @Year2StartDateYear = @YearStartDateYear - 2;
SET @Year3StartDateYear = @YearStartDateYear - 3;
PRINT @YearStartDateYear;
PRINT @ProposedYearStartDateYear;
PRINT @Year1StartDateYear;
PRINT @Year2StartDateYear;
PRINT @Year3StartDateYear;
-- Set budget years based on year input parameter
SET @ProposedBudgetYear = (SELECT pkYear
FROM fiYear
WHERE YEAR(fiYear.BeginDate) = @ProposedYearStartDateYear)
SET @CurrentBudgetYear = (SELECT pkYear
FROM fiYear
WHERE YEAR(fiYear.BeginDate) = @YearStartDateYear)
SET @BudgetYear1 = (SELECT pkYear
FROM fiYear
WHERE YEAR(fiYear.BeginDate) = @Year1StartDateYear)
SET @BudgetYear2 = (SELECT pkYear
FROM fiYear
WHERE YEAR(fiYear.BeginDate) = @Year2StartDateYear)
SET @BudgetYear3 = (SELECT pkYear
FROM fiYear
WHERE YEAR(fiYear.BeginDate) = @Year3StartDateYear)
PRINT @ProposedBudgetYear;
PRINT @CurrentBudgetYear;
PRINT @BudgetYear1;
PRINT @BudgetYear2;
PRINT @BudgetYear3;
-- Query building exercise
DECLARE @fkState INT
DECLARE @fkDimPosFund INT
DECLARE @fkDimPosFunction INT
DECLARE @fkDimPosObject INT
DECLARE @fkDimPosFundingSource INT
DECLARE @fkDimPosInstructionalOrganization INT
DECLARE @fkDimPosOperationalUnit INT
DECLARE @fkDimPosSubjectMatter INT
DECLARE @fkDimPosJobClass INT
DECLARE @fkDimPosSpeclCostCntr INT
SET @fkState = 40
SET @Version = 11
--Get the position of the fund account code dimensions determined by state
SELECT @fkDimPosFund = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'FUND' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosFunction = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'FUNCTION' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosObject = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'OBJECT' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosFundingSource = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'FUNDING SOURCE' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosInstructionalOrganization = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'INSTRUCTIONAL ORGANIZATION' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosOperationalUnit = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'OPERATIONAL UNIT' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosSubjectMatter = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'SUBJECT MATTER' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosJobClass = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'JOB CLASS' AND @fkState = fiDimensionPosition.fkState
SELECT @fkDimPosSpeclCostCntr = pkDimensionPosition FROM fiDimensionPosition WHERE Title = 'SPECIAL COST CENTER' AND @fkState = fiDimensionPosition.fkState
PRINT @fkDimPosFund
PRINT @fkDimPosFunction
PRINT @fkDimPosObject
PRINT @fkDimPosFundingSource
PRINT @fkDimPosInstructionalOrganization
PRINT @fkDimPosOperationalUnit
PRINT @fkDimPosSubjectMatter
PRINT @fkDimPosJobClass
PRINT @fkDimPosSpeclCostCntr
SELECT ACCTCODE.fkYear
,Y.YearID
,ACCTCODE.AccountCode
,DIMFUND.Dimension AS [Fund]
,DIMFUNCTION.Dimension AS [Function]
,DIMOBJECT.Dimension AS [Object]
,(SELECT LEFT ( DIMOBJECT.Dimension , 1 )) AS [MAJOR OBJECT]
,DIMFUNDINGSOURCE.Dimension AS [Funding Source]
,DIMFUNDINGINSTRUCTIONALORG.Dimension AS [Instructional Organization]
,DIMOPUNIT.Dimension AS [Operational Unit]
,DIMSUBMATTER.Dimension AS [Subject Matter]
,DIMJOBCLASS.Dimension AS [Job Classification]
,DIMSPECLCOSTCNTR.Dimension AS [Special Cost Center]
,BP.Amount AS Proposed
,B.Amount AS [Current]
,T1.Amount AS [Historical]
FROM fiAccountCode ACCTCODE
JOIN fiDimension DIMFUND
ON DIMFUND.fkDimensionPosition = @fkDimPosFund
AND (DIMFUND.pkDimension = ACCTCODE.fkDimension1
OR DIMFUND.pkDimension = ACCTCODE.fkDimension2
OR DIMFUND.pkDimension = ACCTCODE.fkDimension3
OR DIMFUND.pkDimension = ACCTCODE.fkDimension4
OR DIMFUND.pkDimension = ACCTCODE.fkDimension5
OR DIMFUND.pkDimension = ACCTCODE.fkDimension6
OR DIMFUND.pkDimension = ACCTCODE.fkDimension7
OR DIMFUND.pkDimension = ACCTCODE.fkDimension8
OR DIMFUND.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMFUNCTION
ON DIMFUNCTION.fkDimensionPosition = @fkDimPosFund
AND (DIMFUNCTION.pkDimension = ACCTCODE.fkDimension1
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension2
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension3
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension4
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension5
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension6
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension7
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension8
OR DIMFUNCTION.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMOBJECT
ON DIMOBJECT.fkDimensionPosition = @fkDimPosFund
AND (DIMOBJECT.pkDimension = ACCTCODE.fkDimension1
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension2
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension3
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension4
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension5
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension6
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension7
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension8
OR DIMOBJECT.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMFUNDINGSOURCE
ON DIMFUNDINGSOURCE.fkDimensionPosition = @fkDimPosFund
AND (DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension1
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension2
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension3
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension4
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension5
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension6
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension7
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension8
OR DIMFUNDINGSOURCE.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMFUNDINGINSTRUCTIONALORG
ON DIMFUNDINGINSTRUCTIONALORG.fkDimensionPosition = @fkDimPosFund
AND (DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension1
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension2
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension3
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension4
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension5
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension6
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension7
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension8
OR DIMFUNDINGINSTRUCTIONALORG.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMOPUNIT
ON DIMOPUNIT.fkDimensionPosition = @fkDimPosFund
AND (DIMOPUNIT.pkDimension = ACCTCODE.fkDimension1
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension2
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension3
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension4
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension5
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension6
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension7
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension8
OR DIMOPUNIT.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMSUBMATTER
ON DIMSUBMATTER.fkDimensionPosition = @fkDimPosFund
AND (DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension1
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension2
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension3
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension4
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension5
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension6
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension7
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension8
OR DIMSUBMATTER.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMJOBCLASS
ON DIMJOBCLASS.fkDimensionPosition = @fkDimPosFund
AND (DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension1
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension2
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension3
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension4
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension5
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension6
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension7
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension8
OR DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension9
JOIN fiDimension DIMSPECLCOSTCNTR
ON DIMJOBCLASS.fkDimensionPosition = @fkDimPosFund
AND (DIMJOBCLASS.pkDimension = ACCTCODE.fkDimension1
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension2
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension3
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension4
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension5
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension6
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension7
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension8
OR DIMSPECLCOSTCNTR.pkDimension = ACCTCODE.fkDimension9
JOIN faBudgetPrep BP ON ACCTCODE.pkAccountCode = BP.fkAccountCode
JOIN fiBudget B ON B.fkAccountCode = ACCTCODE.pkAccountCode
JOIN faTransaction T1 ON T1.fkAccountCode = ACCTCODE.pkAccountCode
JOIN fiYear Y ON Y.pkYear = ACCTCODE.fkYear
ORDER BY Y.YearID
If I run the query without the amounts included, I get all the account codes and dimension fields fine. If I try to include the amounts I get an empty result set. I tried using a subquery to get the amounts, but it erred out due to returning multiple
results for each account code on a given amount type in a given year. I'm stuck. Please help.
RandyHJ1957The amounts are coming from three other tables that are not yet included in the existing query. Depending on the year being referenced, the amounts come from the following tables:
ProposedBudget amounts come from the BudgetPrep table (BudgetPrep.Amount).
CurrentBudget amounts come from the Budget table (Budget.Amount)
Each of the the historical years of budget amounts come from the Transactions table, which I call three times with different table aliases (T1, T2, T3) so that I use the following columns T1.Amount, T2.Amount, and T3.Amount for each respective historical
year.
For example, I want my years to appear as columns in the result set:
ProposedBudget Current Budget Historical 1 Historical 2 Historical 3
2015 2014 2013 2012
2011
I need to join the amounts to the account codes for each year I am dealing with.
Sometimes there are several results for the amount per account code in a year (representing different fund divisions) and I need to display all the amounts so I can group and sum them later in a report. I'm trying to gather all the amounts for each
account code (and its respective line items) for each of the five years so I can present the data in a report.
RandyHJ1957
Maybe you are looking for
-
Im willing to pay 1 dollar if someone can solve this problem!
I want to put video from my viewer into a slug replace block in the canvas, but everytime i attempt it a message comes up that says "Replace edit could not be completed because clip to replace is not selected" ....what does this mean.. how can i repl
-
Wait'll you get a load of this!
I have been a Verizon customer for over 10 years.We have a family plan with 4 phones and you'd think this would mean something to a company. Well not to Verizon. I am so throughly displeased with Verizon right now I am also about to make a change.
-
Sample Quiz Application error in resource Bundle
hi sdns , i am stuck with an error. please help me how to rectify this problem. 500 Internal Server Error Web Dynpro Container/SAP J2EE Engine/6.40 Failed to process request. Please contact your system administrator. [Hide] Error Summary While p
-
I have had acrobat pro 10 installed for 30 days and acrobat will not open, how can I fix this problem?
-
The JDBC 4.0 Public Review Draft specification is now available on the JCP web site. http://jcp.org/aboutJava/communityprocess/pr/jsr221/index.html This is the JDBC spec that will be included in Java 6.0 so this is what you'll be living with for the