Problem in the total of the Query
Hi people.
I have a Query where there is 3 itens for exemple with the same value.
Document A=3Km Document B=3Km Document C=3Km and the total i configurated to show the same value=3Km
But when I take of the driw down where will show only one line, the query show the total 9Km instead of 3Km.
The query lost the parameter I have put to show the same value.
Do you know how I can do to show the same value=3Km when I have the query wothout driwdoun?
Thanks.
Hello,
Just try if this works..In your Amount formula, click on Aggregation tab, select Exception aggregation as Maximum or Minum and select Reference characteristic as the lowest level in your hierarchy.
Thnaks.
With regards,
Anand Kumar
Similar Messages
-
Hi
DECLARE @XMLA nvarchar(3000)
, @DateSerial nvarchar(35);
-- Change date to format YYYYMMDDHHMMSS
SET @DateSerial = CAST(GETDATE() AS DATE);
--SELECT @DateSerial
Set @XMLA =
N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
<ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
<KeyErrorLimit>-1</KeyErrorLimit>
<KeyNotFound>IgnoreError</KeyNotFound>
<NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
</ErrorConfiguration>
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
<Object>
<DatabaseID>MultidimensionalProject5</DatabaseID>
<CubeID>giri</CubeID>
<MeasureGroupID>Fact Internet Sales</MeasureGroupID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>';
EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
iam executive the query when iam getting below error.
[Execute SQL Task] Error: Executing the query "DECLARE
@XMLA nvarchar(3000)
, @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
correctly, or connection not established correctly.
how to solve this error;
please help meWhat are you trying to do? What sort of data source is SHALL-PCAdventureWorksDw?
When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
If you explain why you think this would work in the first place, maybe we can help you.
Erland Sommarskog, SQL Server MVP, [email protected] -
Hi .
I was creating the pass the values t in temp tables though s sis package vs2012 .
First I was taken on executive SQL TASK.
IN EXCUTIVE SQL TASK . I was write the stored proce:
Sp;
reate procedure USP_GETEMP2333
AS
begin
Select eid,ename,dept,salary from emp
end;
create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
insert into #temp
exec USP_GETMP02333
go.
It was executive correctly.
I was taken another sequence container. In the sequence container iam creating one executive sql
In 2<sup>nd</sup> excutive sql task: sql statements is
if object_id('emp_fact_sal') is not null
drop table emp_fact_sal
select eid,ename as emp_name,sal_bar=
case when salary<=5000 then 'l'
when salary >5000 and salary<=7000 then 'm'
else
'h'
end
into emp_fact_sal from #temp.
and one falt flies it was taken to designation .
iam changing all connection properties:
in oldeb connection:
in excutive sal task properties .
delay validation is true,
and retain connection maner is also true,
and package mode is 64 bit is false.
But iwas excutive in 2<sup>nd</sup> excutive ql task .
Iam getting this type of errors,
[Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
correctly.
Please help meArthur suggestion works but you shouldnt even be doing this on a SQL Task.
Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
is an undocumented behavior and should not be relied upon. -
Can't find out the problem in the query.
emp Table->
(name varchar2(10),
shot_seq varchar2(1)
The emp table contains around 2 million records.
When I run the following query the output comes within 20 seconds.
select name,sum(decode(shot_seq,1,1,0)) as pd2 from emp where shot_seq = 1
group by name;
But when i made the change in the query by putting ' shot_seq = '1' ', so that query is now:
select name,sum(decode(shot_seq,1,1,0)) as pd2 from emp where shot_seq = '1'
group by name;
The output doesn't comes, sqlplus just hangs up.
Please explain what is the reason behind this.
Thanks for ur time,
skala.1.
I think the problem is with sum and decode part:
..sum(decode(shot_seq,1,1,0)) as ...
If <shot_seq> is character then you need to convert it to_number before using any group functions....
2.
Check your decode:
......(shot_seq,1,1,0)) as pd2 from emp where shot_seq = '1'
I think it should be something like that(after you convert chars to nums)....
null -
Hai All,
I have created a login form in screen painter (which contains two textbox and a login button). When login button is clicked, I want to check whether the username and password matches in the table (@EMPA).
I have a problem while checking with the query
This is User Defined Function a have used
Private Sub UDFCheckInTableLog()
Try
Dim rs As SAPbobsCOM.Recordset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
rs.DoQuery("SELECT T0.U_user FROM [dbo].[@EMPA] T0 WHERE T0.U_user ='" & euser & "' AND TO.U_pass ='" & epass & "'")
rscount = rs.RecordCount
If rscount > 0 Then
'//There is a record that Matches
REC = True
'//To clear the values in the text box
UDFClear()
Else
'//This means NO Record Matches
REC = False
End If
Catch ex As Exception
SBO_Application.MessageBox("UDFCheckInTableLog :" & ex.Message)
End Try
End Sub
I get this error message
UDFCheckInTableLog:
1)[microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword 'TO'.
2))[microsoft][ODBC SQL Server Driver][SQL Server] Statement(s) could not be prepared.Hi,
You're trying to use Table Alias(T0), i'm guessing its not allowed. Try also to remove dbo, try @EMPA or just EMPA.
HTH
Manuel -
I am facing problem using RRI feature.
In my first Query I have Two customer Exit variables to fetch values of 2 dates and i am showing records for dates in between them. The query is working very fine.
Now jumping from this query to another Query which will display all data where a date(different info object than query 1) lies between two dates of previous query(which are customer exit variable).
I can filter data in my second query by applying range of values to both the customer exit variables of query 1.Please help.
Now I just want to know how to pass the values of the customer exit variables form query 1 to query 2.
Message was edited by: SachinHi,
You're trying to use Table Alias(T0), i'm guessing its not allowed. Try also to remove dbo, try @EMPA or just EMPA.
HTH
Manuel -
Problem executing the Query.
Hi,
When I am trying to open a Query in the Query Designer I am getting the error, like
Error Characteristic BP in Ext.Sys (BPCo) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BPEmp) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BP R) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BP-P) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BPSh-P) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BPSldTo) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BPSrvEm) must be uniquely selected in the query
Error Characteristic BP in Ext.Sys (BPR) must be uniquely selected in the query
It may be due to a characteristic 0BP_EXTERN- Previous Account Number which is a Navigation Attribute of all these characteristics,
*0CRM_SOLDTO, 0CRM_SHIPTO, 0CRM_BILLTO, etc etc. So all these characteristics which are associated with 0BP_EXTERN are having some problem.
All those Queries where 0BP_EXTERN is used are having the same issue. There used to be no issue till yesterday, I was able to execute the Query.
Can anybody help me solving this issue??
Thanks in advance.
PrasapbiAlso, when I went to InfoObject Properties,
Business Explorer--> Selection --> "Unique for Every Cell" (this option is selected for the InfoObject 0BP_EXTERN),
Or will it work if I select the option "No Selection Restriction".
Thanks
Prasapbi -
Hierarchy Nodes Display problem in the query
Hi
I have an organizational hierarchy upto 6 levels of nodes.
When it is displyed in the query only the first three levels are getting displayed.
When i see in the restricted area ( when restricting values ) i find all the nodes displayed but when query is executed i dont see anything.
Are there setting thats needs to be made in order to see the entire hierarchy.
regards
sundaresanWhen you restrict any query you can see all the nodes of hierarchy, but when you run it you can see only those nodes for which value exists in infoprovider.
Corss check if you have any other restrictions also. -
TP problems, transporting the query views
Hello Expert's
I created two query views on the exiting querys, now i transporting the two views,
How to do transfer the views,
i am confusing following procedures,
1. In RSA1 -> Transport Connector ->Object types -> query views ->Two query views are selected. YES (or)No
2. If selecting views i am not selecting the query and query elements, only the views. YES (or) No
3 And i saved the querys in Package and created a TP. YES (or) No
if selecting the query views after that what i has done
please suggest me suitable answer
it urgent
thanks in advance
aravind.sHello Anand,
1. In RSA1 -> Transport Connector ->Object types -> query views ->Two query views are selected. YES (or)No
Yes, Collect only the view if the Query is already transported. If the query is not transported then select the Query with Dataflow afterwards it will collect all the views as well.
2. If selecting views i am not selecting the query and query elements, only the views. YES (or) No
Yes, if the query are already transported.
3 And i saved the querys in Package and created a TP. YES (or) No
Yes, definitely you have to capture these views in a package and transport request.
Once the views are collected in a transport request , release the request and inform the transport team to import to the target system (Qual or Prod)
Note : In BI/BW BEx tranports are handled differently and not like other objects such as InfoCube, InfoObject. So whenever you are working with BEx Objects make sure that you assing a transport request in the following
RSA1->Transport Connect -> BEx Icon (Truck Symbol) -> Assign Package and Request using the Assign Button.
If you transport system is configured to capture the BEx objects during creation or modification then the above step is not required.
Thanks
Chandran -
Problem with the query of Sharepoint Calculated Fields
Hello,
I am developing an application in sharepoint 2013 foundation. but i have problems with a list, when executing a caml query on a calculated field. I try the solution of this blog
http://sptalks.wordpress.com/2013/03/25/query-on-calculated-field-problem
but i got no result
attentive to any comments
thanksHello,
This is my CAML Query
<View>
<ViewFields>
<FieldRef Name="ID" />
<FieldRef Name="PermMask" />
<FieldRef Name="FSObjType" />
<FieldRef Name="Nombre" AutoHyperLink="TRUE" />
<FieldRef Name="Apellidos" AutoHyperLink="TRUE" />
<FieldRef Name="Cargo" /><FieldRef Name="Edad" />
<FieldRef Name="Compa_x00f1_ia" />
<FieldRef Name="Created" />
</ViewFields>
<Query>
<GroupBy Collapse="TRUE" GroupLimit="30">
<FieldRef Name="Compa_x00f1_ia" />
<FieldRef Name="Edad" />
</GroupBy>
<OrderBy>
<FieldRef Name="ID" />
</OrderBy>
<Where>
<Contains>
<FieldRef Name="Ano" LookupId="FALSE" />
<Value Type="Text">2014</Value>
</Contains>
</Where>
</Query>
</View> -
Hi gurus,
I have a problem in a query
I have a lot of records that are the same and I dont want to sum the value of them more than once. How can this be done??
The following table should illustrate my problem:
DEPT--MONTHCFBID----SCORE
ALST--APR100--
3
ALST--MAY100--
3
ALST--JUN101--
4
ALST--APR102--
5
Overall Score 15
I want the Overall Score to be 12. (only summing up unique records Of CFBID).
Any help will be greatly appreciated.
Regards
Supraja.KHi,
I had Done with Formula with Excveption Aggregation as Average And reference charecterstic as CFBID
DEPT--MONTHCFBID----SCORE
ALST--APR100--
3
ALST--MAY100--
3
ALST--JUN101--
4
ALST--APR102--
5
Overall Score 15
I want the Average Score12/3 = 4.
but I am getting as 15/3 = 5
What to Do any other Solution please -
Case Sensitive Problem in the query
Hii All
Good Day
I have created zperson infoobject & has lowercase letters tick marked.
This is the navigational attribute of 0activity infoobject.
The user wants to have the functionality of
"The text field should be non-case sensitive so when it is used in a query to search the name can be typed in whichever case a person wants"
How to do this? can any one suggest?
regards
Jana.Hello,
I dont have a solution to convert the value automatic in the selection variables. but as an alternate solution: When you load data for zperson, use formula or routine to translate to upper case. Then the user can always use uppercase in the selection.
Happy Tony -
Problem with the query in group by clause
hi, i have problem with group by clause, can some one please help me.
select
header_id,
(select sum(nvl(dr,0) - nvl(cr ,0)) from temp_tab a1
where
a1.country=a.country
and a1.source='AP'
and a1.header_id=a.header_id) WHT,
sum(dr),
sum(cr) from temp_tab a
group by header_id,
(select sum(nvl(dr,0) - nvl(cr ,0)) from temp_tab a1
where
a1.country=a.country
and a1.source='AP'
and a1.header_id=a.header_id)
select * from temp_tab
drop table temp_tab
create table temp_tab(header_id number ,line_num number, country varchar2(2),
source varchar2(2), dr number, cr number,primary key(header_id,line_num));
insert into temp_tab(header_id, line_num,country, source, dr,cr) values(1, 1,'NL','AP',100,20);
insert into temp_tab(header_id, line_num,country, source, dr,cr) values(1, 2,'PO','AP',20,20);
insert into temp_tab(header_id, line_num,country, source, dr,cr) values(1, 3,'NL','AP',70,20);
insert into temp_tab(header_id, line_num,country, source, dr,cr) values(2, 1,'NL','PA',100,20);
insert into temp_tab(header_id, line_num,country, source, dr,cr) values(2, 2,'NL','PA',100,20);
insert into temp_tab(header_id, line_num,country, source, dr,cr) values(3, 1,'KR','PO',100,20);
commit;
Appreciate your help.
Thanks,select header_id,
(select sum(nvl(dr,0) - nvl(cr ,0)) from temp_tab a1
where a1.country=a.country
and a1.source='AP'
and a1.header_id=a.header_id) WHT,
sum(dr),
sum(cr)
from temp_tab a
group by header_id
,countryIt's kinda hard to follow what your query does... maybe because I'm only at my second coffee..
Edited by: Alex Nuijten on Oct 2, 2009 8:07 AM -
I have an package with source , data flow and destination to execute on begin and commit.
in the below i have just used for questioning purpose with diagram removing my Data Flow task explaining my problem
on execution, i get error as
[Execute SQL Task] Error: Executing the query "COMMIT TRAN DimCompanyCode" failed with the following error: "The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.". Possible failure reasons: Problems with the query, "ResultSet"
property not set correctly, parameters not set correctly, or connection not established correctly.
as mentioned , i have checked the ResultSet, parameters , connection establish.. all are fine.
Kindly advice on what has to be done.
ShanmugaRajTo avoid this error, the RetainSameConnection property should set to 'True' for the Connection Manager - Application_DB.
Narsimha -
How to ignore a variable defined in a query when the query gets executed
Hi SAP guru, I am creating a query, which has a user input variable, say A, and a replacement path variable, say B, Bu2019s value is determined by A and the whole purpose of A is letting user entering an initial value and A must be ignored when the query gets executed. How can I achieve this in query designer?
ThanksHi, thanks for the reply. Actually this is not my problem. My problem is the query should be filtered by a variable, say B, but B is not allowed to be entered directly by user (i.e. B could be a replacement path variable or user exit type). So B has to be derived from another user input variable, say A. However if I defined A in the query, A is by default used as one of the filters, which is not desirable because A is a subset of B in my case and should be ignored.
Is there options (settings) that allow the query ignore a specified variable (A) ? If not is there other ways to get around this?
Thanks
MichScott -
Decimals not seen in the query...
Hi Guys,
I have a problem with the query..
I have loaded a KF with 2 decimal places in the cube.
But when I run a query created on the cube, the digits after the decimal place are not seen in the query.
For e.g. the value of the KF in the cube is 9.85...but in the query, it is seen as 9
please let me know where do i need to make the changes.
FYI..the unit of the KF is %. Has this got anything to do with the problem ?
thanks in advance,
Punkuj...Hi Aby,
Sorry, i just missed to mention this imp point :
I had done the operation that you have suggested :
I am getting the following output :
In the Cube : 9.85
in the query ( after the decimal selection) : 9.00
I hope that clears my problem..
Thanks..
Punkuj
Maybe you are looking for
-
How to handle Keys (Sequences) generated in Database
Need some pointers about how to achieve following: I am building a cache for TRADES and have a CacheStore supporting LOAD/STORE/REMOVE methods. The TRADES cache is associated with TRADE table on the database. I have most of my business logic related
-
Error Individual check for creating the object WBS Element required
Hi Expert, I've a requirement to create WBS elements using BAPI. And I am using BAPIs in the following manner. CALL FUNCTION 'BAPI_PS_INITIALIZATION' CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI' EXPORTING i_project_definition = g_pdwbs TABLES it_wbs_ele
-
My "Finder" don't reacted, i can't make restart or other... Tanks for help
-
ITunes match creates duplicates of all songs a computer upgrade
So I had a mac mini and over the summer I deleted all my music on my computer and redownloaded using itunes match to get the higher quality for a number of my older rips. Fast forward to last month when I upgraded to a macbook air. Instead of downlo
-
HT201401 my iphone 4s is not turning off?
my iphone is not responding.