Query throwing error on personalization
Hi,
We are on SAP Sourcing 7.0 SP03
Developed a custom query
SELECT
<%RESULTS%>
FROM
SELECT
T1.DISPLAY_NAME AS AUNIQUE_DISPLAY_NAME,
<%LOAD_PAGE(contracts.Agreement,T1.OBJECTID )%> AS AGREEMENT_LINK,
T1.UNIQUE_DOC_NAME AS CUNIQUE_DOC_NAME ,
1003 AS CLASSID,
E1.ZCLMSCDSUPPNAME AS SUPPLIER_ID,
T1.VENDOR_OBJECT_NAME AS VENDOR_OBJECT_NAME,
T14.DISPLAY_NAME AS ZCOMPANY ,
E1.ZCLMSCDCONVERTED AS CONVERTED ,
T13.DISPLAY_NAME AS STATUS ,
T1.EFFECTIVE_DATE_DATE AS EFFECTIVE_DATE,
T1.EXPIRATION_DATE_DATE AS EXPIRATION_DATE,
T1.DOC_OWNER_USER_OBJECT_NAME AS AGREEMENT_MANAGER ,
E1.ZCLMSCDESTCTRVAL_PRICE AS EST_CONTRACT_VALUE
FROM
<%SCHEMA%>.FCI_AGREEMENT T1
LEFT OUTER JOIN <%COLLABCHECK_TBL(T1.OBJECTID, 1003)%>
LEFT OUTER JOIN <%EXT_TABLE(contracts.Agreement)%> E1
ON T1.OBJECTID = E1.PARENT_OBJECT_ID
LEFT OUTER JOIN <%SCHEMA%>.FCI_MAS_VALUE_LIST_VALUE T13
ON T1.STATUS_OBJECT_ID = T13.OBJECTID
LEFT OUTER JOIN <%SCHEMA%>.FCI_MAS_VALUE_LIST_VALUE T14
ON E1.ZCLMSCDCOMPANY_OBJECT_ID = T14.OBJECTID
<%DYN_JOIN%>
WHERE
T1.INACTIVE = 0
AND T1.IS_TEMPLATE =0
AND T1.CONTEXTID = <%CONTEXT(contracts.Agreement)%>
AND T1.PARENT_CLASS_ID = 1004
AND T1.PARENT_COLLN_ID = 1
<%AND_OP("UPPER(T1.DISPLAY_NAME)",<%?(T1.DISPLAY_NAME)%>)%>
<%AND_OP("UPPER(T1.VENDOR_OBJECT_NAME)",<%?(T1.VENDOR_OBJECT_NAME)%>)%>
<%AND_OP("UPPER(T1.DOC_OWNER_USER_OBJECT_NAME)",<%?(T1.DOC_OWNER_USER_OBJECT_NAME)%>)%>
<%AND_OP("E1.ZCLMSCDCONVERTED",<%?(E1.ZCLMMSACONVERTED)%>)%>
<%AND_OP("T14.OBJECTID",<%?(T14.OBJECTID)%>)%>
<%AND_OP("T13.OBJECTID",<%?(T13.OBJECTID)%>)%>
<%AND_OP("E1.ZCLMSCDESTCTRVAL_PRICE",<%?(E1.ZCLMSCDESTCTRVAL_PRICE)%>)%>
<%DYN_FILTER%>
<%ORDERBY%>
Then
We added the query in query group and marked for SRM Navigation
We executed the query from SRM Navigation.
Got the output, then we personalised the
output to display 1 more custom field.
We are getting error
SQL Exception: ORA-00904:"D1"."DISPLAY_NAME_ID": invalid identifier
But we do not have D1 in our query string or result or filters.
Can anyone point out the issue ?
Regards.
Hi Vaibhav,
Your getting "SQL Exception: ORA-00904:"D1"."DISPLAY_NAME_ID": invalid identifier" error because in the query string itself your selecting particular fields and using personalization you have tried to display extra filed which is not mentioned in the query string that is why your getting SQL exception.
And D1 is coming because by using personalization you tried to display Extension Collection filed(CUSTOM Field).
To resolve the SQL exception remove selection of particular fields in the query string it self and get the required fields using result field tab.
I hope above information will clarify your doubts.
Regards,
Lava
Similar Messages
-
Hi
I have created an aggregation level on a multiprovider that contains data from plan and actuals cube.
When I created a query on aggregation level it works for the given selection, but when i change one of the key figures properties to 'plannning' mode, the query throws an error saying "Syntax error in program CL_RSR_RRK0_KEYFIGURE=========CP " showing some exception has occurred.
We are on version 7, SP 13.
Appreciate any help regarding the same.OK. One last thing to check; you said you restricted the data in the query by 0infoprov right? You did that with a rest key fig or made local selections?
I sugest to have a rest key fig with your key fig and 0infopro and set this rest key fig as planning enabled.
Ravi Thothadri -
Hi,
We are on SAP Sourcing 7.0 SP03
Developed a custom query
SELECT
<%RESULTS%>
FROM
SELECT
T1.DISPLAY_NAME AS AUNIQUE_DISPLAY_NAME,
<%LOAD_PAGE(contracts.Agreement,T1.OBJECTID )%> AS AGREEMENT_LINK,
T1.UNIQUE_DOC_NAME AS CUNIQUE_DOC_NAME ,
1003 AS CLASSID,
E1.ZSUPPNAME AS SUPPLIER_ID,
T1.VENDOR_OBJECT_NAME AS VENDOR_OBJECT_NAME,
T14.DISPLAY_NAME AS ZCOMPANY ,
T13.DISPLAY_NAME AS STATUS ,
T1.EFFECTIVE_DATE_DATE AS EFFECTIVE_DATE,
T1.EXPIRATION_DATE_DATE AS EXPIRATION_DATE,
T1.DOC_OWNER_USER_OBJECT_NAME AS AGREEMENT_MANAGER
FROM
<%SCHEMA%>.FCI_AGREEMENT T1
LEFT OUTER JOIN <%COLLABCHECK_TBL(T1.OBJECTID, 1003)%>
LEFT OUTER JOIN <%EXT_TABLE(contracts.Agreement)%> E1
ON T1.OBJECTID = E1.PARENT_OBJECT_ID
LEFT OUTER JOIN <%SCHEMA%>.FCI_MAS_VALUE_LIST_VALUE T13
ON T1.STATUS_OBJECT_ID = T13.OBJECTID
LEFT OUTER JOIN <%SCHEMA%>.FCI_MAS_VALUE_LIST_VALUE T14
ON E1.ZCOMPANY_OBJECT_ID = T14.OBJECTID
<%DYN_JOIN%>
WHERE
T1.INACTIVE = 0
AND T1.IS_TEMPLATE =0
AND T1.CONTEXTID = <%CONTEXT(contracts.Agreement)%>
AND T1.PARENT_CLASS_ID = 1004
AND T1.PARENT_COLLN_ID = 1
<%AND_OP("UPPER(T1.DISPLAY_NAME)",<%?(T1.DISPLAY_NAME)%>)%>
<%AND_OP("UPPER(T1.VENDOR_OBJECT_NAME)",<%?(T1.VENDOR_OBJECT_NAME)%>)%>
<%AND_OP("UPPER(T1.DOC_OWNER_USER_OBJECT_NAME)",<%?(T1.DOC_OWNER_USER_OBJECT_NAME)%>)%>
<%AND_OP("T14.OBJECTID",<%?(T14.OBJECTID)%>)%>
<%AND_OP("T13.OBJECTID",<%?(T13.OBJECTID)%>)%>
<%DYN_FILTER%>
<%ORDERBY%>
Then
output to display 1 more custom field.
We are getting error
SQL Exception: ORA-00904:"D1"."DISPLAY_NAME_ID": invalid identifier
But we do not have D1 in our query string or result or filters.Hi Venkateswararao,
Your getting "SQL Exception: ORA-00904:"D1"."DISPLAY_NAME_ID": invalid identifier" error because in the query string itself your selecting particular fields and using personalization you have tried to display extra filed which is not mentioned in the query string that is why your getting SQL exception.
And D1 is coming because by using personalization you tried to display Extension Collection filed(Custom Field).
To resolve the SQL exception remove selection of particular fields in the query string it self and get the required fields using result field tab.
I hope above information will clarify your doubts.
Regards,
Lava -
When I save my query in PLD it throws error
When i write a query and click Save button it throws error as "Define Numbering Series in Administration module" Can anybody help
Regards
Cool IceHello,
Did by any chance you used CopyExpress to transfer information to that database?
If so, that's the problem, and as far as I know there is no way to solve it...
Best Regards,
Vítor Vieira -
Hi BI Experts,
I have an issue in the report output. The query is giving the data but the report is not showing the same.
when nonexisting values are given, report is throwing ERROR instead of giving blank page. Client is expecting blank page or dummy page with tables or headings etc but not the error message.
Please suggest a solution for this.
Let me know if anybody needs any other information regarding this.
Thanks in advance.you need to use no data found logic in order to get blank or any message saying no data found for that selected value.
check this link
https://blogs.oracle.com/xmlpublisher/entry/no_data_found
or
send me your sample xml having data and no data and template i can try at my side. email: [email protected]
assign me some points if helpful -
SSRS dataset throws error when another stored procedure is called inside dataset stored procedure
Hello;
I am using Report Build 3.0, I have a simple report which gets data using dataset which is created from a Stored Procedure. I have another stored procedure which updates the data in the table which is used for the report. I want to get the live data on report everytime
the report is run so that I call that stored procedure (sp_updatedata) inside my report dataset stored procedure and here where my report fails as it throws error while creating dataset.
Here is sample:
sp_updatedata (this only returns "Command(s) completed successfully"
Create Proce sp_getReportData
As
Begin
Exec sp_updatedata -- I call it to update the data before it displays on the report
Select * from customers
End
If I remove this line it works.
Exec sp_updatedata -- I call it to update the data before it displays on the report
Thanks
Essa MughalHi MESSA,
According to your description, you create a dataset based on a stored procedure. In this procedure, it calls another procedure. Now it throws error when creating dataset. Right?
In Reporting Services, when creating dataset, all the query or stored procedure will be executed in SSMS. So if the procedure can be executed in SSMS, it supposed to be working in SSRS. However, it has a limitation in SSRS. In a dataset, it can only return
one result set.
In this scenario, I don't think it's the issue of calling other procedure inside of procedure. Because we tested in our local environment, it works fine. I guess the sp_updatedata returns a result set, and the "select * from customers" returns
another result set. This might be the reason cause the error.
Reference:
Query Design Tools in Report Designer SQL Server Data Tools (SSRS)
Reporting Services Query Designers
If you still have any question, please post the error message and the store procedure (sp_updatedata).
Best Regards,
Simon Hou -
WebI report throwing error when migrated from XIR2 to XI3.1
I have some webi reports built in BO XIR2 on OLAP universes (SAP BW3.5 based). Recently I have migrated the reports from old XIR2 environment to a new XI3.1 environment.
The specification of new system is as below:
BO XI3.1
SAP BW 3.5
No SP and FP is installed. (Actually when I tried to install the SP2, it failed)
After the migration, some of my reports are running for 5 minutes and then throwing an error like below:
A database error occured. The database error text is: Error in MDDataSetBW.GetCellData. See RFC trace file or SAP system log for more details. (WIS 10901).
The same report is working fine in old system.
Has anyone faced this problem yet?
RegardsHi Jacques,
The transports are already imported.
What I can see is if there is a query with only dimension objects and no measure, then that is throwing error in XI3.1. But the same query is running fine in XIR2.
Any Idea?
Thanks and Regards -
Database.LoadDataSet() method is throwing error during retriving data from empty table of IBM DB2 database. It is giving error code "SQL0100W".
“Error Message: 0NO_DATA [02000] [IBM] [DB2 / NT] SQL0100W FETCH, whether there is a line to be UPDATE or DELETE, or of the query result is an empty table .
SQLSTATE = 02000”Hello SharayuPandit,
For issues regarding DB2, i suggest that you could post it to DB2 related forum:
https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000842
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
InfoSet Query: Syntax Error while generating the program.
Dear All,
I have a Query in CRM system which contains an Infoset based on LDB.
The InfoSet Query throws up a Syntax error while generating the program.
So, we are not able to change the Infoset using the Infoset Query through SQ01.
The error is as follows:-
Syntax error in program "AQZZ==/SAPQUERY/CRM_ACTMON1 ".
Error in the ABAP Application Program
The current ABAP program "CL_QUERY_OUTPUT_DEFINITION====CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "AQZZ==/SAPQUERY/CRM_ACTMON1 "
in include "AQZZ==/SAPQUERY/CRM_ACTMON1 " in
line 28:
""CRMT_REPORT_LOCATORLIST" must be a flat structure. You cannot use int"
"ernal tables, strings, references, or structures as components. -"
Please help me arrive at an solution, so that we are able to change the Infoset through the InfoSet Query.
Awaiting your reply as soon as possible.
Thanks and Regards,
Pankaj.There is an error in your query, specifically in the definition of CRMT_REPORT_LOCATORLIST. In the short dump (transaction ST22) you will see more details and the exact location of an error if you just scroll down.
I can't tell more because this problem is specific to your system, to which I have no access. Read the whole dump and look at all the objects mentioned there. -
Universe created on BI cube throws error.
Hi Experts,
This is the first time i have created one universe based on a Cube in BI system. After universe creation, I am logined into WebIntelligence Rich Client and create a query on top of the created universe which throws errors like below.
A database error occured. The database error text is: The supplied XML is not valid. <CONSTANT>. (WIS 10901)
I tried with many combinations, but, in result sometimes with blank report and sometimes throwing above error.
Cany anyone suggest me what is the solution for this ?
Regards,
SureshHi Suresh,
The reason here is some thing has bean changed at SAP BI Cube after creation of Universe in Business Objects.
Solution for this is " Refresh the universe structure " and then save it and export and try create reports. If it is not the reason give some more clarity on your error.
Thanks.
ChiranGV -
I've been having a particularly annoying error with ColdFusion 11, and unable to track down the source of this problem.
Basically There are a few variables defined in the session scope we check with isdefined a few lines above to make sure they are defined. Subsequent lines may or may not throw a #variablename# is undefined on random lines.
What can I do to fix this issue? Is this a known bug?I am doing isDefined checks for relevant variables when neccessary. The problem is not that the code errors out undefined ... it's that the variable is actually defined and errors out undefined.
As a simplified example;
Login.cfm Form supplies form.username and form.password to login_action.cfm then redirects to index.cfm after succesful LDAP authentication. I will not include all lines as it would be too long.
Login_action.cfm
<cfinclude template="ldap.cfm">
<!--- LDAP login code goes here; checks if credential's supplied are valid and sets variable #logged_in# ... --->
<cftry>
<cfif isdefined("logged_in") and logged_in>
<!--- Create Session User Structure and Default Profile --->
<cfset session.user=StructNew()>
<cfset session.user.username=form.username>
<cfset session.user.firstname="">
<cfset session.user.surname="">
<cfset session.user.email="">
<!--- Pull in additional Details --->
<cfquery name="qDetails" datasource="userdetails">
SELECT firstname,surname,email FROM Profiles
WHERE username = '#session.user.username#'
</cfquery>
<cfif isdefined("qDetails") and qDetails.recordcount>
<cfoutput query="qDetails">
<cfset session.user.firstname ="#qDetails.firstname#">
<cfset session.user.surname="#qDetails.surname#">
<cfset session.user.email="#qDetails.email#">
</cfouput>
</cfif>
<cfelse>
<!--- Throw Error back to login page --->
<cfthrow message="1" type="Custom_Security" ErrorCode="Fail">
</cfif>
<cfcatch type="any">
<!--- Throw Error back to login page --->
<cfthrow message="2" type="Custom_Security" ErrorCode="Fail">
</cfcatch>
</cftry>
<!--- Redirect User to login page after Successful Login --->
<cflocation url="index.cfm">
Index.cfm
<!--- At Top of Index session.user.email always exists, in the event it is undefined it will be set to "" --->
<cfparam name="session.user.email" default="">
<!--- Lots of lines of code above here build HTML page etc <cfoutput> references to #session.user.email# and other session vars --->
<!--- Example pull some more information this line may or may not error... --->
<cfquery name="qUserInformation" datasource="userdetails">
SELECT * FROM Information
WHERE user_email = '#session.user.email#'
ORDER BY SomeOtherColumn
</CFQUERY>
<!--- Example point where a session error can be generated less than 2 lines above it has just finished getting information using session.user.email --->
<cfquery name="qUserGroups" datasource="userdetails">
SELECT * FROM Groups
WHERE user_email = '#session.user.email#'
ORDER BY SomeColumn
</CFQUERY>
<!--- Some other common examples require cfscript - and throw errors; above lines may not ... --->
<cfscript>
oHomePage=CreateObject("component","site_components.homepage");
qNews=oHomePage.getNews("#session.user.category#");
</cfscript>
<!--- More lines to do with HTML Footer etc <cfoutput> more stuff --->
in the wwwroot the Application.cfm handles all errors generated during rendering of the page, which includes generating a cfdump of the session scope.
When I get the Error Log I can see in the cfcatch cfdump the error... Element USER.EMAIL UnDefined in SESSION.
struct
Browser
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36
DateTime
{ts '2014-09-28 11:38:48'}
Diagnostics
Element USER.EMAIL is undefined in SESSION. <br>The error occurred on line 15.
However when I check the SESSION scope which is also dumped ... It is defined!
struct
user
struct
COLOR
cccccc
EMAIL
[email protected]
FIRSTNAME
Example
SURNAME
Surname
EXAMPLE1
1
TEMPLATE
template14
TEMPLATE_DETAILS
0
What is causing this strange and irratic behaviour? The problem is so far I cannot replicate the issue. It is intermittant. The issue only started after upgrading to ColdFusion 11. This code has worked flawlessly for years on CF8. -
Identifying statement which throws error
Hi Experts,
I have an ad-hoc query having multiple DML statements. Is is possible to get the command or say statement which throws error using try .. catch block?
Thanks,
Naveen
Naveen J VSELECT
ERROR_NUMBER() AS ErrorNumber,
ERROR_SEVERITY() AS ErrorSeverity,
ERROR_STATE() AS ErrorState,
ERROR_PROCEDURE() AS ErrorProcedure,
ERROR_LINE() AS ErrorLine,
ERROR_MESSAGE() AS ErrorMessage;
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
PL/SQL throwing errors! trying to alter dates
the following code keeps throwing errors, I was wondering if it is due to me getting confused when to use ":" before a variable and also ":=" when setting values?
Can anyone see what I am doing wrong?
Here is the code, at the moment it is throwing an error on line 44
ORA-06550: line 44, column 1:
PLS-00103: Encountered the symbol "" when expecting one of the following:
CODE.....
DECLARE
QNStart DATE;
QNFinish DATE;
Q1Start DATE;
Q1Finish DATE;
Q2Start DATE;
Q2Finish DATE;
Q3Start DATE;
Q3Finish DATE;
Q4Start DATE;
Q4Finish DATE;
Q5Start DATE;
Q5Finish DATE;
QNT NUMBER;
Q1T NUMBER;
Q2T NUMBER;
Q3T NUMBER;
Q4T NUMBER;
QNR NUMBER;
Q1R NUMBER;
Q2R NUMBER;
Q3R NUMBER;
Q4R NUMBER;
BEGIN
case current_date
when current_date between to_date('01-JAN', 'DD-Mon') AND to_date('31-MAR', 'DD-Mon') then
QNStart := to_date('01-JAN', 'DD-Mon');
QNFinish := to_date('31-MAR', 'DD-Mon');
when current_date between to_date('01-APR', 'DD-Mon') AND to_date('30-JUN', 'DD-Mon') then
QNStart := to_date('01-APR', 'DD-Mon');
QNFinish := to_date('30-JUN', 'DD-Mon');
when current_date between to_date('01-JUL', 'DD-Mon') AND to_date('30-SEP', 'DD-Mon') then
QNStart := to_date('01-JUL', 'DD-Mon');
QNFinish := to_date('30-SEP', 'DD-Mon');
when current_date between to_date('01-OCT', 'DD-Mon') AND to_date('31-DEC', 'DD-Mon') then
QNStart := to_date('01-OCT', 'DD-Mon');
QNFinish := to_date('31-DEC', 'DD-Mon');
End Case
:Q1Start := ADD_MONTHS(:QNStart,-3);
:Q1Finish := ADD_MONTHS(:QNFinish,-3);
:Q2Start := ADD_MONTHS(:QNStart,-6);
:Q2Finish := ADD_MONTHS(:QNFinish,-6);
:Q3Start := ADD_MONTHS(:QNStart,-3);
:Q3Finish := ADD_MONTHS(:QNFinish,-3);
:Q4Start := ADD_MONTHS(:QNStart,-4);
:Q4Finish := ADD_MONTHS(:QNFinish,-4);
:Q5Start := ADD_MONTHS(:QNStart,-5);
:Q5Finish := ADD_MONTHS(:QNFinish,-5);
select COUNT(COUNT(*)) INTO :Q1T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q1Start AND :Q1Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q2T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q2Start AND :Q2Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q3T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q3Start AND :Q3Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q4T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :Q4Start AND :Q4Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :QNT from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN :QNStart AND :QNFinish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q1R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
AND a.COMPANY_NAME IN
(select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q2R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
AND a.COMPANY_NAME IN
(select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q3R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
AND a.COMPANY_NAME IN
(select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :Q4R from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
AND a.COMPANY_NAME IN
(select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN Q5Start AND Q5Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
select COUNT(COUNT(*)) INTO :QNR from FF_ACTIONS a
WHERE a.DATE_ENTERED BETWEEN QNStart AND QNFinish
AND a.COMPANY_NAME IN
(select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
WHERE f.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
AND a.ACTION_SCORE = 'Y'
AND f.INPUT_TYPE = a.ACTION_NAME
GROUP BY f.COMPANY_NAME)
GROUP BY a.COMPANY_NAME;
EXECUTE
Cheers
SimonDave had given you already some good advice.
Your code is not only too complicated, but you have also probably a bug in it. You have for instance a QNstart as to_date('01.01, 'dd.mm') and a corresponding QNfinish as to_date('31.03', 'dd.mm'). As this means, it is the time portion at 00:01, you are missing the complete last day of this interval. So you better do:
declare
l_QNstart date;
l_Q1start date;
l_Q1finish date;
l_q1t number
begin
l_QNstart := trunc(sysdate, 'Q');
l_Q1start := add_months(l_QNstart, -3);
l_Q1finish := l_QNstart;
-- your condition is now
select count(count(*))
into l_q1t
from ff_actions f, ff_action_type_lov a
where f.date_entered >= l_Q1start and f.date_entered < l_Q1finish
and a.action_score = 'y'
and f.input_type = a.action_name
group by f.company_name;
end;
/Message was edited by:
Leo Mannhart
btw: what is the difference between Q1Start / Q3 Start and Q1Finish / Q3Finish resp.? -
I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...
Hi Leo22,
Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
Jeremy L.
National Instruments
Jeremy L.
National Instruments -
See my query and error, see my query and error
hi master
sir i use inner query but not run
please see my query with error
query :==========
select accid as acccode,fstatus, case when fstatus=1 then
(select sum(drbal) from accbal where substr(accbal.accid,1,length(acccode))=acccode)
end what
from chartofacc
error :========
SQL> /
(select sum(drbal) from accbal where substr(accbal.accid,1,length(acccode))=acccode)
ERROR at line 2:
ORA-00904: "ACCCODE": invalid identifier
please sir give me any idea *Does this column ACCCODE exist in your table accbal?
The columns in the outer query will not be visible in the inner query but the vise versa is true.
Maybe you are looking for
-
Jabber for Windows cannot control 8841 desk phone
Hello Team, We have a problem with desktop phone control in case of 8841 phone. When the user try to switch to the 8841 phone in Jabber then we got the following error message in the log: 2014-11-07 09:39:53,855 ERROR [0x00000298] [ice\TelephonyAdap
-
Text messages not appearing in conversation window automatically
If i'm in a text window and I receive a new msg from the other party, I have to exit the conversation window, into the main messages screen and then go back into the conversation to see the new message, instead of it just automatically popping up in
-
TExt Problems and Scrolling end credits
I am trying to make my final credits at the end of the feature I am working on. The problem I am having is that LiveType takes up too much space and s l o w s down the process making it close to impossible to work with. So I picked FCP text scrolling
-
I currently have Max OS X 10.5.8. What can I upgrade to that will still allow my programs to work (iWork '08 mainly)?
-
Monitoring Services, Service Dependencies
Hi all, <br> I'm looking for a general solution to the following (I suppose rather common) problem: <br> <br> Our system depends on a lot of services/ressources like the network/internet connectivity, sql database, other hosts, web services, file ser