Pass parameter values between BEX and exctractor
Hi All,
I create virtual cube which report from ECC
I create Extractor Transformation and DTP which load the data from ECC
In the BEX I create parameter (Week day) which can get few values (E.g. 1,3,5)
In the extractor I define field for week day and need to consider the week days parameter
My question is how I pass the value between the BEX and extractor?
Thanks in advance
Itzik
Hi Itzik,
One simple solution,
Create a new IOB with Texts. In the Variable exit, write the variable values to this text IOB using FM RSNDI_MD_TEXTS_UPDATE.
Read the values from the IOB text using routine while selection.
Sankar Kumar
Similar Messages
-
How to pass parameter values to Bex query through xcelsius (LO or QWAAS)
Hi,
I have prompt in Bex query and want to pass values to query prompt through xcelsius .
In xcelsius i have selection
e.g 1] Combo selection is for Vendor
2] Combo selection is for Fiscal Year
If i select value from Combo list and refresh the dashboard im getting below error
A database error occured. The database error text is: The MDX query SELECT { [Measures].[4IKKZVYWWD3XKQK7Z1BK34VTL], [Measures].[4IKKZVJJUFWIJHHBND6VJ0YE1], [Measures].[4IKKZV46SIP3I8EFBP26YX0YH], [Measures].[4IKKZUOTQLHOGZBJ00XIET3IX] } ON COLUMNS , NON EMPTY [0CREDITOR].[LEVEL01].MEMBERS ON ROWS FROM [0FIAP_O03/ZFIAP_O03_UNIVERSE] SAP VARIABLES [VN_VAR] INCLUDING A00140 [0S_FYEAR] INCLUDING V3/2010 : V3/2010 failed to execute with the error Unknown error. (WIS 10901)
I have tried using LO and QWAAS but not able to do so......
if any one knows plz help....Hi,
most likely yo are passing the wrong value.
you need to send the key or the member unique name.
Ingo -
Use context to pass value between JPF and Java Control
hi,
Can we use context to pass value between JPF and Java Control? It works if i m using InitialContext in the same machine but i dun think it will works if i put Web server and application server in different machine. Anyone have an idea how to do it?
I also want to get the method name in the onAcquire callback method. Anyone knows how to do this?
thks
?:|Hi.
Yoy can the next options for make this:
1. Pass your values in http request.
example: http://localhost/index.jsp?var1=value1&var2=value2&var3....
2. You can use a no visible frame (of height or width 0) and keep your variables and values there using Javascript, but of this form, single you will be able to check the values in the part client, not in the server. Of this form, the values of vars are not visible from the user in the navigation bar.
Greeting. -
Passing values between jsp and php
hi there, is it possible to pass values between jsp and
php? i really need to find out the way if there is
any. thanks in advance
-azali-Yes, there are a few ways to do this.
1) Think about using Cookies.
2) Maybe use a Redirect passing the values in the Query string.
3) Retain the data in a repository in the back end.
4) Using Hidden fields within your pages.
I am sure you can use these Idea's for a base to develop other methods on how to pass values back and forth from JSP -> PHP and vice versa.
-Richard Burton -
"Missing parameter values." -- Export and Print only...
I have a web application and I am using CrystalReportViewer. I am passing several parameters to Crystal using:
report.SetParameterValue(field.Name, Session[field.Name]);
I have session variables which will hold parameters needed to pass into the report. The session variables are populated from controls on my webpage after an onclick event. This even not only populates session, but also passes parameters to the report with the following code:
ReportDocument report = new ReportDocument();
Session["MapPathName"] = "./Reporting/CaseStudy.rpt";
report.FileName = Server.MapPath(Session["MapPathName"].ToString());
ParameterFields fields = new CrystalDecisions.Shared.ParameterFields();
fields = report.ParameterFields;
foreach (ParameterField field in fields)
report.SetParameterValue(field.Name, Session[field.Name]);
CrystalReportViewer1.ReportSource = report;
This works great for reporting and is very extensible. However, when clicking on the "Print" or "Export" buttons on the toolbar I get "Missing parameter values." I attempted to export manually in code using the .ExportToStream function but I still get the error, "Missing parameter values."
I received this error also in Refresh, Search, and Navigate functions. This was corrected by calling a function that supplies the above code block to these functions. However, I do not see any events for controlling the Print nor the Export events.
QUESTION: How can I print or export a report when passing parameters using CrystalReportViewer? Thanks in advance!
P.S. - Crystal Reports XI Release 2
Edited by: KyleSavant on Jun 18, 2009 5:42 PMThere are no Export or Print events accessible for the viewer
Since it sounds like you are creating the reportdocument object in your click event, the settings on this object become out of scope on successive postbacks executed by other events.
to get around this without major changes, you can place your "report" object in session in this event and retrieve it from session on successive postbacks. This should solve your problems around navigation, printing and exporting. What you will need to do is check if the session object exists (usually in page_load or page_initialze) and if so, retrieve it from session and bind it to the viewer's reportsource. If the session object does not exist, then do nothing (ie you have not clicked your button yet that retrieves the parameter values from session and loads the report). Also, in your click event you can check if the report session object exists and if so, remove it so that it can be re-created with your new parameter values (ie i'm assuming the only time you want to set parameter values is in this event).
Dan -
In BADi , How to pass the values between two Method
Hi Experts,
We have two methods in BADis. How to pass the value between two Methods. Can you guys explain me out with one example...
Thanks & Regards,
Sivakumar SHi Sivakumar!
Create a function group.
Define global data (there is a similiar menu point to jump to the top include).
Create one or two function modules, with which you can read and write the global data.
In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
Regards,
Christian -
//Initialize the Engine
EngineClass myEngine = new EngineClass();
myEngine.LoadTypePaletteFilesEx(TypeConflictHandlerTypes.ConflictHandler_Prompt, 0);
Step myStep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname,StepTypes.StepType_Action);
myStep.Name = "object";
DotNetModule dotnetmodule = myStep.Module as DotNetModule;
dotnetmodule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File,@"C:sequence.dll");
dotnetmodule.ClassName = "CN";
dotnetmodule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
dotnetmodule.MemberName = "ISI";
mySequence.Locals.NewSubProperty("object", PropertyValueTypes.PropValType_Reference, false, "", 0);
Sequence mySequence = myEngine.NewSequence();
mySequence.Locals.NewSubProperty(varName, PropertyValueTypes.PropValType_Reference, false, String.Empty, 0);
mySequence.InsertStep(myStep, 0, StepGroups.StepGroup_Main);
SequenceFile seqFile = myEngine.NewSequenceFile();
seqFile.InsertSequence(mySequence);
seqFile.Save("C:\\mySeq.seq");
I have done this,dynamically creating a sequence file in teststand programatically through c#.
Problem is
1.I created an action step and object Reference variable for the step, but i am not able to pass parameter values to the objectReference
2.I am not able to load the sequence in to the main Sequence of the sequence file in the teststand. How can I do these two things.Hi,
have you ever followed on my Links ?!?!?
If not please jump to this one
http://forums.ni.com/ni/board/message?board.id=330&thread.id=26880
and read the the answer from Mannoch
starting with this words:
Anthony -
Currently, functionality for retrieving the Metadata Token for a class constructor or member is not fully provided in the TestStand .NET Adapter API. The DotNetModule.GetConstructorMetadataToken() and DotNetModule.GetMetadataToken() methods only return the correct Metadata Token when the member/constructor prototypes have already been loaded. Thus, in the case of your code, when you call DotNetModule.GetMetadataToken(), the method is returning -1 because the member prototype for the Step you are referring to has not yet been loaded.
That means have to do a workaround for your stuff.
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e= -
Hi,
Iam trying to print a crystal report, but it is not prompting me to pass the parameter values.
i want user to pass parameter values.
Iam using VB.Net code to generate the reports.
Could plz help me
Thanks
Raviassuming v_seqprocess_id takes the process_id, I'd probably go with something like:
cursor sum_cur(p_process_id number) is
select sum(cheque_amt), sum(balance)
from table
where process_id = p_process_id;and call the cursor passing v_seqprocess_id into it.
That's if I had to do extra processing on top of getting the values, etc.
Otherwise, I'd go with:
insert into table2
select sum(cheque_amt), sum(balance)
from table
where process_id = v_seqprocess_id;Message was edited by:
Boneist
Added in the insert version -
How Do I Pass A Value Between two Spry Tabs?
I am using the Adobe Spry framework to develop an webpage
with 3 tabs. I want to be able to pass a value between tabs.
More specifically...
In Tab1, the user will click on a link that declares a
variable called "groupID" with a value of "999"
Tab 2 Should then open up and have "groupID" available for
use. It will be used as a hidden form field.I think I get what your talking about.
Thing to remember is that all the data is loaded on the same
page still so you can just pass it over like you would using JS.
I did a little example let me know if this is what you are
looking for.
You will see that I added a function at the bottom that will
tell spry what panal to open as well as pass your "groupID" the
function is call on the onclick even.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript"
src="js/SpryTabbedPanels.js"></script>
<style>
.TabbedPanels {
clear:none;
float:left;
width:100%;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
.TabbedPanelsTabGroup {
margin:0px;
padding:0px;
.TabbedPanelsTab {
-moz-user-select:none;
cursor:pointer;
float:left;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11pt;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:normal;
list-style-image:none;
list-style-position:outside;
list-style-type:none;
position:relative;
top:0px;
background-color:#FFEEEE;
height: 25px;
width: 161px;
margin-top: 2px;
margin-right: 15px;
margin-bottom: -2px;
margin-left: 0px;
padding-top: 8px;
padding-right: 10px;
padding-bottom: 4px;
padding-left: 10px;
color: #ebe3cb;
background-repeat: no-repeat;
vertical-align: bottom;
text-align: center;
.TabbedPanelsTabHover {
.TabbedPanelsTabSelected {
background-color:#EEEEEE;
height: 25px;
margin-top: 2px;
margin-right: 15px;
margin-bottom: -2px;
margin-left: 0px;
padding-top: 2px;
padding-right: 10px;
padding-bottom: 9px;
color: #46483c;
.TabbedPanelsTab a {
color:black;
text-decoration:none;
.TabbedPanelsContentGroup {
background-color:#EEEEEE;
clear:both;
.TabbedPanelsContent {
padding:4px;
border: 1px solid #000000;
text-align: left;
background-color: #FFFFFF;
.TabbedPanelsContentVisible {
.VTabbedPanels .TabbedPanelsTabGroup {
background-color:#EEEEEE;
border-color:#999999 rgb(153, 153, 153) rgb(204, 204, 204)
rgb(204, 204, 204);
border-style:solid;
border-width:1px;
float:left;
height:20em;
position:relative;
width:10em;
.VTabbedPanels .TabbedPanelsTab {
border-left:medium none;
border-right:medium none;
border-top:medium none;
float:none;
margin:0px;
.VTabbedPanels .TabbedPanelsTabSelected {
background-color:#EEEEEE;
border-bottom:1px solid #999999;
.VTabbedPanels .TabbedPanelsContentGroup {
clear:none;
float:left;
height:20em;
padding:0px;
width:30em;
</style>
</head>
<body>
<div class="TabbedPanels" id="tp1">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"
>Tab1</li>
<li class="TabbedPanelsTab" tabindex="0"
>Tab2</li>
<li class="TabbedPanelsTab"
tabindex="0">Tab3</li>
<li class="TabbedPanelsTab"
tabindex="0">Tab4</li>
</ul>
<div class="TabbedPanelsContentGroup">
<!---We include the 4 tabs--->
<div class="TabbedPanelsContent" >
tab1
</div>
<div class="TabbedPanelsContent1" >
<a href="#" onclick="tabtest(3,999);">test</a>
</div>
<div class="TabbedPanelsContent" >
</div>
<div class="TabbedPanelsContent" >
<form name="myform">
This number was passed from tab 1 <input name="mystuff"
/></form>
</form>
</div>
</div>
</div>
</body>
</html>
<!---we add this so the tabs will work--->
<script language="JavaScript" type="text/javascript">
var tp1 = new Spry.Widget.TabbedPanels("tp1", { defaultTab: 0
function tabtest(tab,groupID)
var tp1 = new Spry.Widget.TabbedPanels("tp1", { defaultTab:
tab });
document.myform.mystuff.value = groupID ;
</script> -
Difference in value Between BW and R/3
Hi,
We are in the process of validating reports .We have observed difference in value for credit and debit amount fields in BW and for the same data is coming from standard data source 0EN_JVA_2 (Joint venture: Actual line item using delta extraction) we have done full data load. In the data source the data coming from a single field and that is spited based on debit/credit indicator in R/3.
I need your valuable input on where the problem is for the difference of value between BW and R/3.
Regards
DevaHi,
Is there any filterations in the IP?
Any data packet deletion activity in the start rountine?
Any update rule for the key figure is having routine with modifiying the value?
Kindly check.
In case if you are seeing number of records, always aggregation happens.
If the difference is in terms of quantity of the key figure values, kindly check the above three.
Kindly come to us so that we can suggest
Hope this helps
Janardhan Kumar -
Rebate: Differ "Scale Base Value" between "Statistics" and "Billing Doc"
Dear SD Expert,
After I go with Transaction Code :"VOB3" (run report RV15B002), I found that "Scale Base Value" have different value between "Statistics" and "Billing Doc". And the correct value is "Billing Doc". However, the value which shows in my rebate condition now is "Statistic". Thus, my question is
How can I configure my rebate condition based on "Billing Doc" Value instead of "Statistic"? (I don't want to "Correct backlogs" anytime in changing scales based value.) Anyone please feel free in suggestion.
Thanks,
PrachHI,
This may be useful to you.
http://help.sap.com/saphelp_47x200/helpdata/en/dd/5612d8545a11d1a7020000e829fd11/content.htm
Vrajesh -
Activity type is mandatory: enter value between 01 and 07
Hi guys,
I would like to ask you for help..
Recently I updated the App CRM Sales to 2.0.3
Now, when I try to create an activity/task in IPhone(IOs6), it shows me this error "Activity type is mandatory: enter value between 01 and 07".
Do I need to apply any SAP note?
Does anybody have any idea?
Regards,
Eder.Hi Masayuki,
Thanks again for you help.
So, When I create an Activity/Task in CRM Backend I don´t have problem. I can see in my mobile device (Iphone).
The problem is when I try to create a new activity in App CRM Sales (Iphone).
I think that there is some obligatory field in CRM Backend, but that in App CRM there isn´t to filled in it.
Thanks, -
Alter script to keep values between 1 and 99
Hi guys, I currently have a table (for the sake of this lets call it my_table with a column my_column which is integer) I want to restrict the values of this column to values between 1 and 99 and was wondering how I would build this constraint using a script.
Thanks for any help I may recieve on this.Adding a check constraint should serve the purpose.
create table t_test
col1 integer
alter table t_test add constraint check_col1_val check (col1 between 1 and 99);
insert into t_test values(1);
insert into t_test values(99);
insert into t_test values(81);
insert into t_test values(0);
insert into t_test values(100);Running the last two insert statements will give you a error
insert into t_test values(0)
Error report:
SQL Error: ORA-02290: check constraint (HI_OWNER.CHECK_COL1_VAL) violated
02290. 00000 - "check constraint (%s.%s) violated"
*Cause: The values being inserted do not satisfy the named check
*Action: do not insert values that violate the constraint. -
Select just the values between min and max of an accumulated value over day
Hello Forum,
a value is accumulated over a day and over a period of time. Next day the value is reseted and starts again to be accumulated:
with sampledata as (select to_date('09.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union all
select to_date('09.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 29 val from dual union all
select to_date('09.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 30 val from dual union all
select to_date('09.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 45 val from dual union all
select to_date('09.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 60 val from dual union all
select to_date('09.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 75 val from dual union all
select to_date('09.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 95 val from dual union all
select to_date('09.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 17:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 23:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 14 val from dual union all
select to_date('10.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 34 val from dual union all
select to_date('10.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 58 val from dual union all
select to_date('10.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 70 val from dual union all
select to_date('10.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('10.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual)
select ts, val
from sampledata
order by ts asc;How should I change the select statement to skip all data sets before the first minimum and the duplicates after the maximum of a day in order to get such a result:
TS VAL
09.09.12 06:12 23
09.09.12 07:12 29
09.09.12 08:12 30
09.09.12 09:12 45
09.09.12 10:12 60
09.09.12 11:12 75
09.09.12 12:21 95
09.09.12 13:21 120
09.09.12 14:21 142
10.09.12 06:12 14
10.09.12 07:12 34
10.09.12 08:12 58
10.09.12 09:12 70
10.09.12 10:12 120
10.09.12 11:12 142
10.09.12 12:21 153Thank youThis solution works perfectly when the accumulated value has its low and its high on the same day. But I found out :( , that there is also data, which has its low yesterday and its high today. For a better understandig of the case, there is a machine, wich is working over 3 Shifts with irregular start and end time. For example Shift1 cann start at 5:50 or at 7:15. The accumulated value of the worked time is accumuated for each shift extra. This solution works for the shift 1 (approximate between 06:00-14:00) and for the shift 2(approximate between 14:00-22:00), because there is the low and the high of the accumulated value on the same day. This solution does not work for the shif 3(approximate between 22:00-06:00), because the high of the accumulated value is or can be the next day.
So the thread title should be: "Select just the values between min and max of an accumulated value over the same day(today) or over two successive days (yesterday and today)
Sampledata for shift 1 or shift 2:
{code}
with sampledata as (select to_date('09.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union all
select to_date('09.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 29 val from dual union all
select to_date('09.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 30 val from dual union all
select to_date('09.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 45 val from dual union all
select to_date('09.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 60 val from dual union all
select to_date('09.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 75 val from dual union all
select to_date('09.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 95 val from dual union all
select to_date('09.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 17:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 23:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 143 val from dual union all
select to_date('10.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 144 val from dual union all
select to_date('10.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 145 val from dual union all
select to_date('10.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 147 val from dual union all
select to_date('10.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 148 val from dual union all
select to_date('10.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual)
, got_analytics AS
SELECT ts, val
, MIN (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts DESC
) AS min_val_after
, CASE
WHEN ROW_NUMBER () OVER ( PARTITION BY TRUNC (ts)
ORDER BY val
, ts
) = 1
THEN -1 -- Impossibly low val
ELSE LAG (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts
END AS prev_val
, MIN (val) OVER (PARTITION BY TRUNC (ts))
AS low_val_today
, NVL ( LAST_VALUE (val) OVER ( ORDER BY ts
RANGE BETWEEN UNBOUNDED PRECEDING
AND ts - TRUNC (ts) PRECEDING
, -1
) AS last_val_yesterday
FROM sampledata
SELECT ts
, val
FROM got_analytics
WHERE val <= min_val_after
AND val > prev_val
AND ( val > low_val_today
OR val != last_val_yesterday
ORDER BY ts
{code}
with the expected results:
{code}
1 09.09.2012 06:12:02 23
2 09.09.2012 07:12:03 29
3 09.09.2012 08:12:04 30
4 09.09.2012 09:12:11 45
5 09.09.2012 10:12:12 60
6 09.09.2012 11:12:13 75
7 09.09.2012 12:21:24 95
8 09.09.2012 13:21:26 120
9 09.09.2012 14:21:27 142
10 10.09.2012 06:12:02 143
11 10.09.2012 07:12:03 144
12 10.09.2012 08:12:04 145
13 10.09.2012 09:12:11 146
14 10.09.2012 10:12:12 147
15 10.09.2012 11:12:13 148
16 10.09.2012 12:21:24 153
{code}
And the sampledata for shift 3 is:
{code}
with sampledata as (select to_date('08.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union ALL
select to_date('08.09.2012 02:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 45 val from dual union all
select to_date('08.09.2012 05:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 78 val from dual union all
select to_date('08.09.2012 06:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 08:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 10:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 12:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 16:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 17:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 19:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 21:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 22:00:12', 'dd.mm.yyyy hh24:mi:ss') ts, 24 val from dual union all
select to_date('08.09.2012 22:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 40 val from dual union all
select to_date('08.09.2012 23:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 68 val from dual union all
select to_date('09.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 79 val from dual union all
select to_date('09.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 124 val from dual union all
select to_date('09.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 125 val from dual union all
select to_date('09.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 126 val from dual union all
select to_date('09.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 17:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union ALL
select to_date('09.09.2012 22:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 5 val from dual union ALL
select to_date('09.09.2012 22:51:33', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union all
select to_date('09.09.2012 23:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 40 val from dual union all
select to_date('10.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 50 val from dual union all
select to_date('10.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 60 val from dual union all
select to_date('10.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 78 val from dual union all
select to_date('10.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 145 val from dual union all
select to_date('10.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual)
, got_analytics AS
SELECT ts, val
, MIN (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts DESC
) AS min_val_after
, CASE
WHEN ROW_NUMBER () OVER ( PARTITION BY TRUNC (ts)
ORDER BY val
, ts
) = 1
THEN -1 -- Impossibly low val
ELSE LAG (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts
END AS prev_val
, MIN (val) OVER (PARTITION BY TRUNC (ts))
AS low_val_today
, NVL ( LAST_VALUE (val) OVER ( ORDER BY ts
RANGE BETWEEN UNBOUNDED PRECEDING
AND ts - TRUNC (ts) PRECEDING
, -1
) AS last_val_yesterday
FROM sampledata
SELECT ts
, val
FROM got_analytics
WHERE val <= min_val_after
AND val > prev_val
AND ( val > low_val_today
OR val != last_val_yesterday
ORDER BY ts
{code}
with the unexpected results:
{code}
- ts val
1 08.09.2012 00:04:08 23
2 08.09.2012 22:12:13 40
3 08.09.2012 23:21:24 68
4 09.09.2012 22:21:33 5
5 09.09.2012 22:51:33 23
6 09.09.2012 23:21:33 40
7 10.09.2012 00:04:08 50
8 10.09.2012 01:03:08 60
9 10.09.2012 02:54:11 78
10 10.09.2012 03:04:08 142
11 10.09.2012 04:04:19 145
12 10.09.2012 05:04:20 146
{code}
The result should be:
{code}
- ts val
1 08.09.2012 00:04:08 23
2 08.09.2012 02:04:08 45
3 08.09.2012 05:03:08 78
4 08.09.2012 06:54:11 90
5 08.09.2012 22:00:12 24
6 08.09.2012 22:12:13 40
7 08.09.2012 23:21:24 68
8 09.09.2012 01:03:08 79
9 09.09.2012 02:54:11 124
10 09.09.2012 03:04:08 125
11 09.09.2012 04:04:19 126
12 09.09.2012 05:04:20 127
13 09.09.2012 22:21:33 5
14 09.09.2012 22:51:33 23
15 09.09.2012 23:21:33 40
16 10.09.2012 00:04:08 50
17 10.09.2012 01:03:08 60
18 10.09.2012 02:54:11 78
19 10.09.2012 03:04:08 142
20 10.09.2012 04:04:19 145
21 10.09.2012 05:04:20 146
{code}
Thank you for your help! -
GET function fails to get values between 1 and 0
Hi i have the folowing code
GET(CONTAVENDAS="PERCVOLUMECORP",FONTEDADO="INPUT",TEMPO="2011.INP",PRODUTO="%SPECIE%_IN",CANAL="NACANAL",ORGCOMERCIAL="NAORGCOM")
When the value in the PERCVOLUMECORP account, is greater or equal to 1 let's say 80, the get function returns me the correct value, but when i have a value between 0 and one, for instance 0,25, the get function returns 0 (zero)
Any ideas?
Thanks in advance.
Leandro
BrasilHere is the entire script
**SELECT(%ANO_BD_TRAB%,[YEAR],CATEGORIA,"ID='BDTRABALHO'")
**SELECT(%ANO_BD_TRAB1%,[YEAR]+1,CATEGORIA,"ID='BDTRABALHO'")
**SELECT(%ANO_BD_TRAB2%,[YEAR]+2,CATEGORIA,"ID='BDTRABALHO'")
**SELECT(%MES_INCIO%, STARTMTH, CATEGORIA, "ID='BDTRABALHO'")
**SELECT(%MESES%,[ID],TEMPO,"MONTHNUM>=%MES_INCIO% AND YEAR=%ANO_BD_TRAB% AND LEVEL='MONTH'")
**SELECT(%MESES1%,[ID],TEMPO,"MONTHNUM>=%MES_INCIO% AND YEAR=%ANO_BD_TRAB1% AND LEVEL='MONTH'")
**SELECT(%MESES2%,[ID],TEMPO,"MONTHNUM>=%MES_INCIO% AND YEAR=%ANO_BD_TRAB2% AND LEVEL='MONTH'")
**SELECT(%CONTAS%, [ID], CONTAVENDAS, "TOPDOWNALLOC='Y'")
*SELECT(%TODOSPROD%, [ID],PRODUTO,"GRUPO='PRODUTO'")
**SELECT(%SPECIES%, [ID],PRODUTO,"GRUPO='TIPOESPECIE' AND FLAG_TOPDA='N'")
**SELECT(%SPECIES_IN%, [ID],PRODUTO,"GRUPO='TIPOESPECIE' AND FLAG_TOPDA='Y'")
*XDIM_MEMBERSET TEMPO = %MESES%,%MESES1%,%MESES2%,%ANO_BD_TRAB%.INP,%ANO_BD_TRAB1%.INP,%ANO_BD_TRAB2%.INP
*XDIM_MEMBERSET CONTAVENDAS = %CONTAS%,PERCVOLUMECORP
*XDIM_MEMBERSET PRODUTO = %SPECIES%,%SPECIES_IN%,%TODOSPROD%
*OLAPLOOKUP VENDAS
*DIM FONTEDADO="INPUT"
*DIM TEMPO="2011.INP"
*DIM PRODUTO="C_IN"
*DIM CANAL="NACANAL"
*DIM ORGCOMERCIAL="NAORGCOM"
*DIM PERCVOL:CONTAVENDAS="PERCVOLUMECORP"
*ENDLOOKUP
*FOR %CONTA% = VOLUME
*FOR %MES% = 2011.JAN
*FOR %SPECIE% = C AND %SPECIENAME% = CERVEJAS
*WHEN PRODUTO.SPECIETYPE
*IS "%SPECIENAME%"
*WHEN CONTAVENDAS
*IS "%CONTA%"
*WHEN TEMPO
*IS "%MES%"
*REC(CONTAVENDAS="%CONTA%",EXPRESSION=LOOKUP(PERCVOL))
*ENDWHEN
*ENDWHEN
*ENDWHEN
*NEXT
*NEXT
*NEXT
*COMMIT
Thanks is advance.
Maybe you are looking for
-
Problem with design area in netbeans
out of no where am starting to have this problem.....my design area in netbeans is not visible....when i create a new JFrame , the code to the basic design area is there, but when i switch to design view there is no design area. thus i can not drag a
-
Query to get sql server version information?
Hi! I'm new to sql and would appreciate it if anyone could show me the query that i need to type to get the server version information - I do not have direct access to the sql database (doing some work on an old website that runs on windows box w/ co
-
Connecting Microsoft Access to Xcelsius 2008
Hello All, Is there a way to connect Microsoft Access to Xcelsius 2008? Thanks
-
ACS database sychronization possibility
We have in a central site two ACS 1113 version 4.2 working fine. We are going to install a brand new ACS 1121 version 5.2 in a alternate site. We checked the hardware profile for both ACS (1113 and 1121) in Cisco documentation and the ACS 1113 doesn'
-
I need to create cdc table,I am using 'dbms_logmnr_cdc_publish.create_change_table' for it. we need cdc to capture the latest changes from the source for datawarehouse loading as timestamp column is not available.Problem is that, client is not allowi