Time variable
Dear Guru's,
Is it possible to perform a variable time based operation like:
SQL> alter standby database recover standby database until time "to_date(sysdate-3)"
SQL> alter standby database recover standby database until time sysdate-3
Thanx in advance.
This solution works fine:
$ sqlplus -s "/as sysdba"
set pagesize 0
set linesize 50
set feedback off
set sqlprompt ''
set time off
set pause off
spool recoverstdby.sql
select 'recover standby database until time ' || to_char('''') || to_char(sysdate-3, 'yyyy-mm-dd') || to_char('''') || ';' from dual;
spool off
@recoverstdby
Similar Messages
-
Time Variable in Container Operation in BPM
hi,
how can we add a time variable in container operation in BPM?
Say i want to increment the time upto 5 hours and see if it has reached in my loop.
how can we achieve this?
Tiruhenrique -
I have a block with a timeout defined.
Within the block i have the deadline with control step which triggers the exception
I have the exception handler which has a send step which sends the actual error message.
I have a send step which polls the http receiver and is in a infinite loop.
Now the first time i receive an error message i get an email which is good and should work that way.
Next time if it errors out it should continue until a deadline of 8 hours and then should send out an error email.
What happens is i get the second error message immediately without the deadline getting exceeded.
When i look at the workflow log the exception handler gets executed but i don't see a sign of the deadline getting executed?
Any reasons why its behaving this way?
Thanks,
Tiru -
Hi SEM Gurus,
In CPM -BSC, there are two types of CPM variables, one is Design CPM variable which is used to define the char value at the time of designing the BSC and other is runtime (Presentation)CPM variable which can be used to pass the value of char at the runtime or executing the BSC. The problem is that The second variable ( Run time ) is not working i.e. in value field of measure designing we have to assign this created runtime cpm variable to char but we cant see this cpm variable while assigning this to char.
Please help me to solve this problem.
Could anybody will confirm that this is possible in BSC? basically this is possible in management cockpit and it must work in BSC but unfortunatly it is creating a problem for us.
Thanks/ hariHi Hari,
I'm now starting a BSC implementation and I'm facing the same issue. I created a CPM run time variable and I can't assign it in the BSC.
Did you find a way to do this?
Thanks in advance.
Best Regards,
Sofia Silva -
Hi All,
Im working with CPM in order to create a cockpit.
Right now i need to use the time variables in order to filter the information by period.
I will appreciate if someone can give me some comments/step by step in how to works with Time Variable in CPM ?
Regards
I will assign points.hi Marcos,
did you have the SEM220 training material ? i think cpm time variable is discussed
or check in sap help ... didnt work with CPM for long time
http://help.sap.com/saphelp_erp2005vp/helpdata/en/3a/4ba1bd2bf203cbe0000800091c1b0e/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/c2/5a4ab4770911d3b7210000e82debc6/frameset.htm
hope this helps. -
Which Time variable should use compare this month with last month
We want to calculate the increaed number of employees according to one action reason e.g. Entry to company compare with last month. In this case we have to use time variable in BEx query designer. Now can see 0calmonth has serval variable available.
1) Should we use [0CMLMON] for last month and use offset for this month like [0CMLMON]-1 or [0CMLMON]+1 or use variable [0RSTTCM1], which variable should we use for this month and last month? Do we need to create variables by manually?
2) Then using calculated KF to calculate the increaed number of employees, is this logic correct? If it is wrong, please info.
Edited by: hi ni on Apr 22, 2008 7:58 AMHi,
For the comparison of last 2 months data, you can use two Restricted Key figures with reference to 0CALMONTH and it is better to use only customer exit variable for both RKF's.For the Last month use offset value as -1.
Rgs,
I.R.K -
Use of YTD versus PTD time variable
All,
Are there any reasons to move to YTD or stick with PTD from a system perspective? One reason to stick with PTD may be to comply with a regulated (calender year - December) and non-regulated (financial year - March) closing/reporting in the same application. BPC 7.0 provides the use of two time variables within the same application so that there may be no reason to use PTD. Is the use of YTD easier from a customisation and data migration perspective?
Thank you for your advise.
MarcAll,
Are there any reasons to move to YTD or stick with PTD from a system perspective? One reason to stick with PTD may be to comply with a regulated (calender year - December) and non-regulated (financial year - March) closing/reporting in the same application. BPC 7.0 provides the use of two time variables within the same application so that there may be no reason to use PTD. Is the use of YTD easier from a customisation and data migration perspective?
Thank you for your advise.
Marc -
Hello,
Can you please let me know how to set the system date dependent default value in time variables so that there is no need to change everytime in 3.5?plz help..
i want to know what program we need to edit in se38 for setting customer exits...
is there any default program or i need to get from the client...
as i am not able to find ZXRSRU01 the program u said.. -
Placeholders with Time variables
Hi,
i am using DynamicSql.execute with placeholders (?).
But, one of my parameters is a Time variable in Oracle BPM and I want to use this variable in my query (to execute a stored procedure) that waits for a smalldatetime (SQL server variable).
When I try to put the Time variable in the execute procedure, a erros occurs , as follow:
Log Estagio: java.text.SimpleDateFormat@8d55ee0fSaída - ContratoCanceladoExceção[BEA][SQLServer JDBC Driver]Unable to determine the type of the specified object.
The code that I am using:
String query = "exec NE_ESTAGIOS_INSERT ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?";
Any [] parametros ;
parametros[0] = pintProtocolo;
parametros[1] = pintCodEmpresaCo;
parametros[2] = pintCodAluno;
parametros[3] = pintAno;
parametros[4] = pintSemestre;
parametros[5] = 5;//Estágio curricular é tipo 5. Como este processo só trata de estágio curricular então ele vai ficar com 5.
parametros[6] = pintCodEmpresa;
parametros[7] = null;
parametros[8] = pblnBolsaAuxilio;
parametros[9] = pdecValorBolsaAu;
parametros[10] = pblnAuxilioTrans;
parametros[11] = pdecValorTrans;
parametros[12] = pblnBeneficioAux;
parametros[13] = pdecBeneficioAux;
parametros[14] = pintSupervisor;
parametros[15] = pintCodSegurador;
parametros[16] = pintCodApolice;
parametros[17] = pintCodOrientado;
parametros[18] = ptmeInicioVigenc.getDateFormat(parts : Time.DATE_ONLY, style : Time.LONG);
parametros[19] = ptmeFimVigencia.getDateFormat(parts : Time.DATE_ONLY, style : Time.LONG);
parametros[20] = pintTotalMensal;
parametros[21] = strAtividadesEstagio;
parametros[22] = strObjetivosEstagio;
parametros[23] = 2;//por que nesta parte só chega se o estágio tiver sido cancelado.
DynamicSQL.execute(sentence : query, implname : "AcademicoEstagio", inParameters: parametros);
Does anybody please help me?
Thanks
MarcosHi,
Use -and in your afternoon if test.
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing) -
Time variables with if and else statements for class script
Hello, for an in class assignment to create a script using random generated answers im trying to get the script set up for different answers depending on the time of day here is what i have so far, in bold is my second time that i would like to have if the
time is 6pm, the one that works right now is the one that is anything greater then 12pm and the one that is everything before 12pm the 6pm will not work:
#Clear the Windows command console screen
Clear-Host
#Define the variables used in this script to collect player inputs
$question = "" #This variables will store the player's question
$status = "Play" #This variable will be used to control game termination
$answer = 0 #This variable stores a randomly genrated number
$time = (Get-Date).Hour #This variable stores the current hour of the day
#Display the game's opening screen
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host " W E L C O M E T O T H E W I N D O W S"
Write-Host
Write-Host
Write-Host
Write-Host " P O W E R S H E L L F O R T U N E T E L L E R"
Write-Host
Write-Host
Write-Host
Write-Host " By Zelandra"
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host " Press Enter to continue."
#Pause script execution and wait for the player to press the Enter key
Read-Host
#Clear the Windows command console screen
Clear-Host
#Provide the player with instructions
Write-Host
Write-Host " The fortune teller is a very busy and impatient mystic. Make"
Write-Host
Write-Host " your questions brief and simple and only expect to receive"
Write-Host
Write-host " Yes / No styled answers."
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host " Press Enter to continue."
#Pause script execution and wait for the player to press the Enter key
Read-Host
#Continue game play until the player decides to stop
while ($status -ne "Stop") {
#Ask the player the first question
while ($question -eq ""){
Clear-Host #Clear the Windows command console screen
Write-Host
$question = read-host " What is your question? "
$question = "" #Reset variable to a empty string
#Retrieve a random number between 1 and 7
$answer = Get-Random -minimum 1 -maximum 8
#If it is the night the fortune teller will be a little more cranky
if ($time -gt 18) {
Write-Host
if ($answer -eq 1) { " Grrrr. The answer is NO, now let me get back to sleep!" }
if ($answer -eq 2) { " Grrrr. The answer is !!!NEVER!!!" }
if ($answer -eq 3) { " Grrrr. The answer is unclear, did you really think i would know?" }
if ($answer -eq 4) { " Grrrr. The answer is sure whatever!" }
if ($answer -eq 5) { " Grrrr. Even if i wanted to tell your fortune i wouldnt!" }
if ($answer -eq 6) { " Grrrr. Look at the time, im busy SLEEPING!" }
if ($answer -eq 7) { " Grrrr. Take whatever answer you want and leave me alone!" }
#Select an answer based on the time and the random number
#If it is the afternoon the fortune teller will be a little cranky
if ($time -gt 12) {
Write-Host
if ($answer -eq 1) { " Grrrr. The answer is no!" }
if ($answer -eq 2) { " Grrrr. The answer is never" }
if ($answer -eq 3) { " Grrrr. The answer is unclear!" }
if ($answer -eq 4) { " Grrrr. The answer is yes!" }
if ($answer -eq 5) { " Grrrr. The answer is absolutely not!" }
if ($answer -eq 6) { " Grrrr. The answer is unforseeable!" }
if ($answer -eq 7) { " Grrrr. Im sorry could you repeat that?" }
#If it is morning the fortune teller will be in a good mood
else {
Write-Host
if ($answer -eq 1) { " Ah. The answer is yes!" }
if ($answer -eq 2) { " Ah. The answer is Always" }
if ($answer -eq 3) { " Ah. The answer is uncertain!" }
if ($answer -eq 4) { " Ah. The answer is no!" }
if ($answer -eq 5) { " Ah. The answer is there is a fair cha... OH LOOK A SQUIRREL!" }
if ($answer -eq 6) { " Ah. I think you meant to ask something else!" }
if ($answer -eq 7) { " Ah. Well it looks like your wish will be ready tonight!" }
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host " Press Enter to continue."
#Pause script execution and wait for the player to press the Enter key
Read-Host
#Clear the Windows command console screen
Clear-host
Write-Host
#Prompt the player to continue or quit
$reply = read-host " Press Enter to ask another question or type Q to quit."
if ($reply -eq "q") { $status = "Stop" }
#Clear the Windows command console screen
Clear-Host
#Provide the player with instructions
Write-Host
Write-Host " Very well then. Please return again to get all your questions"
Write-Host " answered."
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host
Write-Host " Press Enter to continue."
#Pause script execution and wait for the player to press the Enter key
Read-Host
#Clear the Windows command console screen
Clear-Host
Thanks again if anyone can provide help.Hi,
Use -and in your afternoon if test.
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing) -
Hello BI gurus,
This may be confusing so I will try my best to explain...
I am working on a report in which I need to allow the user to choose a specific Date and Time period. Now I have both Date and Time avaliable in my infoprovider. If I create a variable for both date and time seperately it will not be able to associate the date with the time (right?).
Ex. User enters date range 2/01/2008 to 2/08/2008 and
Time range 10:00pm to 3:00pm
(and i understand that time may be kept using a 24 hr clock but this still doesnt fix my issue)
this will output an error because the first time is greater than the later.
and if I choose a time that is from 3:00 to 10:00 I can't be sure that the date range and the time are both being applied correctly (since this error above).
Is there a way that we can tie the date with the time so the report will know that I am asking for 2/01/2008 at 10:00pm to 2/08/2008 at 3:00pm?
or can i make the variables dependant on each other..enter begining date, time to end Date and Time
Thanks and sorry for the long thread I wanted to be as clear as possible,
MattDear Matt;
I've the same problem!!!
Any solutions? -
Dynamic variant - time variable
Hello!
I want to create a variant for an IDoc housekeeping program (rbdmani2) and I want to save the following in a program variant:
For the current date (I have managed to use a dynamic variable for this) and IDocs created in the past hour, i.e. the select option for Creation time should be "from"='current time-1hour' and "to"='current time'.
How can I express current time minus 1 hour and the current time respectively?
Please advice. Thanks!
::Ellenhi,
You can't perform the dynamic calculation on the TIME selection fields. That is possible only for DATE fields. So you may have to write a custom wrapper program with same selection screen as RBDMANI2 and then call program RBDMANI2 using SUBMIT from your custom program.
In your custom program, you can set the time values in the Initialization block as
S_TIME-low = sy-uzeit - 60.
s_time-high = sy-uzeit.
In the variant you are going to create, for the time field select as P - "Save Field without values". This way the values maintained in the initialization blcok won't be overwritten by the variant. Hoep this helps
But you still need to consider the issue raised by Rob for the past midnight run scenario. Whatever we do, we can't handle the midnight scenario, unless you want to break it as two runs, one for prior to midnight and another for after midnight. This can be possible by putting some logic in the custom program to check time and call the RBDMANI2 twice.
Hari -
Passing TIME variable in ALLOCATION
I have the following allocation, and the variables for my DIM TIME are not working. Does anyone know how I would achieve this in NW version? I would like the script to take the TIME member selected at package run time and get the annual input member from the *SELECT to use in the WHAT for DIM TIME. The code validates fine, but the package fails and returns, "Unknown dimension name in keyword: "%TIME_SET:
Does anyone have any experience with something similar?
*SELECT(%INP%,[ANNUAL],TIME,[ID]=%TIME_SET%)
*RUNALLOCATION
*FACTOR = USING
*DIM ACCOUNTCC WHAT=ALLOC_PCT; WHERE=>>>;USING=BAS(SGA_SERV_EXP);
*DIM ENTITY WHAT=NO_ENTITY; WHERE=>>>;USING=BAS(TOTAL_ENTITIES);
*DIM BU WHAT=A_AM; WHERE=<<<;USING=NO_BU;
*DIM DATASRC WHAT=INPUT; WHERE=ALLOC;USING=R3;
*DIM TIME WHAT=%INP%;WHERE=>>>; USING=%TIME_SET%;
*DIM GEOGRAPHY WHAT=NO_LOCATION; WHERE=>>>; USING=BAS(GLOBAL_TOTAL);
*DIM FUNCTIONAL WHAT=NO_FUNCTION; WHERE=<<<; USING=BAS(TOTAL_FUNCTIONS);
*ENDALLOCATION
*COMMIT
I appreciate any and all feedback!
Regards,
karenHi,
Am not sure this can help you.
Please check whether SELECT is working fine in your system. Because it is not working in ours and we use XDIM_FILTER which does the same task as SELECT.
Regards,
G.Vijaya Kumar. -
Date and Time Variable error Plz guide
Gurus
When I write the query for time and date I keep getting error message mentioned below, plz guide
DECLARE @ArrivalTme Time;
SET @ArrivalTme = N'18:22';
SELECT @ArrivalTme;
GO
Msg 2715, Level 16, State 3, Line 3
Column, parameter, or variable #1: Cannot find data type TIME.
Parameter or variable '@ArrivalTme' has an invalid data type.
DECLARE @OneDay DATE;
SET @OneDay = N'10360610';
SELECT @OneDay AS [Day to Prevail];
GO
Msg 2715, Level 16, State 3, Line 3
Column, parameter, or variable #1: Cannot find data type DATE.
Parameter or variable '@OneDay' has an invalid data type.
Faisal BalochHi Faisal,
which SQL version do you use? In 2005 there is no variable "date" or "time", instead of this you have to use "datetime".
http://msdn.microsoft.com/en-us/library/ms187752%28v=SQL.90%29.aspx
Regards Steffen -
SEM - Balance Scorecard: Run-time Variable for value
Good day,
I need to create a CPM Variable for a value that should be entered by the user at run-time. Could you please inform how this would be done?
Regards
Grant CarelseHi Ravi,
Created a basic query with a key figure (Actual Capital Spend) and the characteristic value (Number of Households, this should be manually entered when the KPI is accessed on the scorecard by the user viewing the KPI). What has occurred in the design process is that the CPM variable for number of households does not show up when linking the query to the value field in the Measure. Only the variable folders are showing up.
Even if the CPM Variable does show up, I was thinking that this characteristic value has to be linked to a second value field so that I can divide the Actual Capital spend by the number of households. Would I be able to do this?
Regards
Grant Carelse -
I want to be able to create a registry entry that contains the current date. Is there an environment variable that I can use? I see that I can get the individual Month, Day and Year entries, but there must be one for the current date. And while we're at it, how about the current time? I've tried %date% and %time%, to no avail. This was easy to do in SMS.
Thank you,
MikeWhy don't you concatonate the values? Not very hard.
You can also call a VBS/WSH script just like in SMS if you so choose as
well.
Craig Wilson - MCNE, MCSE, CCNA
Novell Support Forums Volunteer Sysop
Novell does not officially monitor these forums.
Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
"mgrammas" <[email protected]> wrote in message
news:[email protected]..
>
> I want to be able to create a registry entry that contains the current
> date. Is there an environment variable that I can use? I see that I can
> get the individual Month, Day and Year entries, but there must be one
> for the current date. And while we're at it, how about the current
> time? I've tried %date% and %time%, to no avail. This was easy to do
> in SMS.
>
>
> Thank you,
>
> Mike
>
>
> --
> mgrammas
> ------------------------------------------------------------------------
> mgrammas's Profile: http://forums.novell.com/member.php?userid=421
> View this thread: http://forums.novell.com/showthread.php?t=312837
>
Maybe you are looking for
-
Time capsule no longer backing up after 10.6 upgrade
After upgrading to OSX10.6 my time machine (through time capsule) is not backing up anymore. I can connect to the disk through finder and also through the time machine application. I can also see my backups from 10.5 and there are no issues with the
-
I have an email that I'm sending out to a bunch of real estate agents. It has an advertising brochure in it. I don't really think it will be easy to copy all their addresses from websites and then blind carbon them out in one email. Most of their
-
Hi, I have a server running a Swing app with many users. Then, I would like to use jconsole.exe to monitor the app. However, I discovered jconsole.exe is available only in JDK install, not JRE. Is there some way to copy files for jconsole.exe to run
-
H:commandButton and attribute image
I cannot make work a h:commandButton that contains an image.When the browser opens a see "a not found image" icon. The code is <h:commandButton image="/images/englishFlag.jpg" actionListener="#{rushmore.listen}"
-
Connected Servers in Devices?
How do I get my connected servers to show up in the Devices area of a finder window? Kevin