BETWEEN aid request DATE
Dear Experts, I am new to the PL/SQL and need your expert advice and assistance on request, belowSELECT * FROM A SCHEMA. TABLE
WHERE DATETIME BETWEEN (TO_DATE ('SYSDATE-1 07:00:01 "," MM/DD/YYYY, HH24:MI:SS')) AND (TO_DATE ('SYSDATE-1 14:59:59 ',' DD/MM/YYYY, HH24:MI:SS'));))))
I want to automate above query that will be chosen between starttime data yesterday mentioned the end time (07:00:01) (14:59 min 59 s).
Help, please.
ARO
Hello
DBA wrote:
I use below duration between the two to get a full time day (yesterday) data.DTIME BETWEEN 1, TRUNC(SYSDATE-1) + 0/24/12/60/60 AND TRUNC(SYSDATE-1) + 1799, 23/24/12/60/60
It is valid for a duration of one day (from yesterday)?
Please help clarify this confusion.
Bundle of thanks!
If you have to ask, then it means that it will be difficult to debug and maintain.
Here's an easier way to find the lines where dttime is after 07:00 yesterday, but before 15:00 yesterday:
WHERE dtime > TRUNC (SYSDATE - 1) + ( 7 / 24)
AND dtime < TRUNC (SYSDATE - 1) + (15 / 24)
This will pick up the lines where dtime is as little as 1 second after 07:00, but not 07:00 himself. If you want to include 07:00 exactly, change the > to > =.
Tags: Database
Similar Questions
-
Share data using BBM surveys between my request on the two BlackBerry Z10
Hello
I want to share data between my request on the two Z10 BlackBerry using BBM surveys. The data being sent from one end via BBM must reach the other end inside my application. How can I get it?
Yes, this can also be done using WebWorks. The same characteristics of the invocation are available at WebWorks applications. You can read about the invocation and WebWorks here:
The sample of waterfalls has only provided as an example to demonstrate the workflow. Take a look and let me know if you have more questions.
-
How do you export all the activity of direct contact between Eloqua 10 data?
How do you export activity of direct contact between Eloqua 10 data?
Thank you
Sanjiv
Hi Sanjiv,
There is no direct way to get out of the activity of direct contact. To offset the direct contact activity report, we can use bulk APIs.
Thank you
Eloqua Expert
-
How to count the number of Sundays between the two dates
Hello
I want the number of Sundays between the two dates
example of
number of number of Sundays between 4 January 2013 ' and April 30, 2013 "in a select query, I have to include this as a sub query in my select statement.nordine B wrote:
Hi Frank,.
Have 1 doubt...In many countries the week could me "Monday". How the application handles it?
Or did I get something wrong?Help, please!
For ' IW'(ISO week) early in the day is always Monday...
It's so simple - calculate the weeks between two dates based on Monday... This is the number of Sundays...
NEXT_DAY is another option...
SQL> with dd as 2 ( 3 select TO_DATE('01-04-2013','dd-mm-yyyy') fdt, TO_DATE('30-04-2013','dd-mm-yyyy') ldt from dual 4 ) 5 SELECT fdt,ldt, 6 (next_day(ldt,'sunday')-next_day(fdt-1,'sunday'))/7 sdays 7 FROM dd; FDT LDT SDAYS --------- --------- ---------- 01-APR-13 30-APR-13 4
Published by: JAC on May 2, 2013 12:20
-
Swapping between periods of data
Hi all
Running planning / Essbase 11.1.2.1
Currently...
At the beginning of our budget process load us data of actual sales per week / shop (1600) / product (60) for periods until we are on budgets (for example if we start the process in week 40, we load the actual data for the weeks 1 to 39); This provides the basis for the budget.
However, due to the holidays or vacation for kids falling on different weeks in fiscal year against our weeks of actual data, we need exchange between weeks sales data. Currently, we use the ODI and have a .txt file that contains two columns - source and target, as part of the data load that this file manages the Exchange as we need.
Update...
We are developing a new application and that you want to replicate the above, but we are trying to load a load rule Essbase data. Can anyone suggest how we can achieve the same when you use a rule to load? If it's something that we have to go in and manually change each year on the rule it would not be a huge problem - but we don't really want to have to open the data file and manually change the data in there.
However there was no case of W01 to do after the initial replace im guessing the 'Replace' option is not appropriate as if we replace with W03 W01, we might want to then replace W02 W01?
Data file columns are:
Year period, entity, products, data
FY12 W01, Shop3, Prod1, 7.10
As an alternative, I'm looking through a form of planning with a smart list, then a business rule to manage the swap. WF consists of the weeks down the lines and members of account smart list in the column; smart list consists of 52 weeks - the user must select a week of target in the drop down against the week of the source in the lines, if the week is the same in the exercise as real of the year, then the user will not select anything.
The WF works well, however I am wrong then generate code BR to move the data according to the needs. See code below (I've hardcoded some members to test):
Fix ("2012", "Current", "budget", @relative ("Cats", 0), "S0003")
* "Target weeks" * "
*(*
IF ("BOTHER"-> "NAP" < 1)
* "Basic" = "Historical basis"; " *
Weeks of targets is the Smart List, historical account is the target for the initial load of data and Base is the account for data exchanged to land on. The above code works as expected, IE if no smart list entry has been filed, then the data is copied between equivalent weeks. I'm looking for pointers about OTHER required code that will do what I'm after... I had looked at a different method using Global Variables with FROM and WEEK guest as well as @XRANGE to try to get around the fact that the WF, etc., but had hit a wall with this.
Own experiences or suggestions will be appreciated.
Thank you
JBJB - I guess you could do (but you want to avoid) has SO long... ELSEIF... ELSEIF..., right? And I mean by "long", 50 + tests?
-
Table of IOM which shows the relationship between the request and approver
Hello
I have a few users who belong to the group "admin".
Any request for a particular resource goes to this group for approval.
I tried most of the tables in oim 11g r2 to find a relationship between the request and the approver group.
The demand table has information about the request but no relationship with regard to the approver. Approver as a group, I need to know the status of name and the Group (pending, approved, rejected) request.
Please could you all expert let me know the table I can find information on these...
Thank youSearch in the SOA tables
WFTASK
-
Differences in time between the start date and end Date
I have a requirement to get the difference between the two dates, I am on the syntax below to fill, but it does not work. The syntax is the following:
TimestampDiff (SQL_TSI_MONTH, "[< dStart_Date_ITAG >]", '[< dEnd_Date_ITAG >]'). Could you please help me on this. Thanks in advance
OlivierHello Roytson,
I want to enjoy the sytem itself, I mean there are 2 custom fields start date and enddate, my function should take system only do not enter manually.
could you please develop this thing. -
Not able to start agent cache for the requested data store
Hello
This is my first attempt in TimesTen. I am running TimesTen on the same host Linux (RHES 5.2) running Oracle 11 g R2. TimesTen version is:
TimesTen Release 11.2.1.4.0
Trying to create a simple cache.
The DSN entry section for ttdemo1 to. odbc.ini is as follows:
+ [ttdemo1] +.
Driver=/home/Oracle/TimesTen/TimesTen/lib/libtten.so
Data store = / work/oracle/TimesTen_store/ttdemo1
PermSize = 128
TempSize = 128
UID = hr
OracleId = MYDB
DatabaseCharacterSet = WE8MSWIN1252
ConnectionCharacterSet = WE8MSWIN1252
With the help of ttisql I connect
Command > Connect "dsn = ttdemo1; pwd = oracle; oraclepwd = oracle;
Successful login: DSN = ttdemo1; UID = hr; DataStore = / work/oracle/TimesTen_store/ttdemo1; DatabaseCharacterSet = WE8MSWIN1252; ConnectionCharacterSet=WE8MSWIN1252;DRIVER=/home/oracle/TimesTen/timesten/lib/libtten.so;OracleId=MYDB; PermSize = 128; TempSize = 128; TypeMode = 0; OracleNetServiceName = MYDB;
(Default AutoCommit = 1).
Command > call ttcacheuidpwdset ('ttsys', 'oracle');
Command > call ttcachestart;
* 10024: could not start agent cache for the requested data store. Could not initialize Handle.* Oracle environment
The command failed.
The following text appears in the tterrors.log:
15:41:21.82 Err: ORA: 9143: ora-9143 - 1252549744-xxagent03356: database: TTDEMO1 OCIEnvCreate failed. Return - 1 code
15:41:21.82 Err: 7140: oraagent says it failed to start: could not initialize manage Oracle environment.
15:41:22.36 Err: 7140: TT14004: failed to create the demon TimesTen: couldn't reproduce oraagent for "/ work/oracle/TimesTen_store/ttdemo1 ': has not been initialized Handl Oracle environment
What are the reasons that the demon cannot happen again to another agent? FYI, the environment variables are defined as:
ORA_NLS33=/U01/app/Oracle/product/11.2.0/Db_1/ocommon/NLS/Admin/data
ANT_HOME = / home/oracle/TimesTen/ttdemo1/3rdparty/ant
CLASSPATH=/home/oracle/TimesTen/ttdemo1/lib/ttjdbc5.jar:/home/oracle/TimesTen/ttdemo1/lib/orai18n.jar:/home/oracle/TimesTen/ttdemo1/lib/timestenjmsxla.jar:/home/oracle/TimesTen/ttdemo1/3rdparty/jms1.1/lib/jms.jar:.
Oracle@rhes5:/Home/Oracle/TimesTen/ttdemo1/info% echo $LD_LIBRARY_PATH
/home/oracle/TimesTen/ttdemo1/lib:/home/oracle/TimesTen/ttdemo1/ttoracle_home/instantclient_11_1:/u01/app/oracle/product/11.2.0/db_1/lib:/u01/app/oracle/product/11.2.0/db_1/network/lib:/lib:/usr/lib:/usr/ucblib:/usr/local/lib
See you soonI see no problem here. The ENOENTs are superfluous because it locates libtten here:
23302 open ("/ home/oracle/TimesTen/11.2.1.4.0/TimesTen/ttimdb1/lib/libtten.so", O_RDONLY) = 3
without doubt, it does the same thing trying to find the libttco.so?
23302 open ("/ home/oracle/TimesTen/11.2.1.4.0/TimesTen/ttimdb1/ttoracle_home/instantclient_11_1/libttco.so", O_RDONLY) =-1 ENOENT (no such file or directory)
Thank you for taking the trace. I really want to have a look at the complete file if you can send it to me?
-
How to filter dates between the current date and the number of dates past
Hello
On the answers, how can I do to return a report that contains data between the current dates and 31 days in the past?
Users want to connect display the report and the report should show only data 31 days to the date of the day... How would I be able to set it up on the answers that since I have not access to RPD?
Please let me know
Thank youuse the date filter between current_date and timestampadd (sql_tsi_day, -31, current_date)
fixed
-
Hello
Can someone help, I need to generate a pivot table to aid between two dates and a Department. I am trying to achieve the following output:
JAN-04 Feb-05 MAR-04 Apr-04 MAY-04 June-04 Jul-04 August-04 SEVEN-04 OCT - 04 etc.
1 1 1 1 1 DEPT
FC
1 1 1 1 1 IF
The SQL code is displayed as below:
"PERSON_ID" "EFFECTIVE_START_DATE" "EFFECTIVE_END_DATE" "DEPT".
1182 12 JANUARY 04 CF 7 MAY 04
1182 17 JUNE 04 31 DECEMBER 12 IF
Can someone help with the realization above PivotTable based on SQL results above
Thank you
-
How to remove empty lines of chain between the relevant data?
I have problems with the removal of empty lines of final my data output string. I know this is simple to do, but I'm stuck in the same train of thought. The file is a converted hex file that is written in a series of recordings. Convert lines it is result in fa all that data should be deleted and the number of records adjusted accordingly. I have the code to take the file, convert, delete all of the records with F and adjust the number of files, but I'm left with a gap in my file no matter my approach I can't remove the empty spaces regularly. I have attached the file with spaces and the goal is to remove the spaces between the blocks of code, and spaces is not always in the same direction. Thanks for any help. If needed I can join the code I already developed if necessary.
Darrick
You can read the file line by line and write back only if the length of the string <> 0. (or maybe <> 1 in the case of the character line appears in the string to a blank line.)
However, there is probably a way to change the code you have now so that he does not write blank lines. Without seeing the code, it is difficult to help.
-
Data between a fixed date and a sysdate
It's the current scipt:
TRUNC (a.shipped_dstamp) BETWEEN TRUNC (SYSDATE, 'dy') - 7
AND TRUNC (SYSDATE, 'dy') - 1
I need to display the data between 31/08/2014 and (SYSDATE, 'dy') - 1
I don't know how to go on this subject!
Please can someone help?
TRUNC (a.shipped_dstamp) BETWEEN the DATE of 2014 "-08-31 'AND TRUNC(sysdate,'dy')-1
or, perhaps more effectively.
a.shipped_dstamp > = DATE ' 2014-08-31' AND a.shipped_dstamp<>
-
Difference between the true Date of the Hijra with date Hijri Oracle
Hi all
I'd appreciate if someone please let me the solution for this problem. In my application, I displays the Hijri Date using the NLS parameter. but the question that "I'm dealing with a deference between the date of the real Hijra with the date of the Hijra oracle."
Assume that the actual Hijri date 18-SEP-2012 was 02/11/1433 in hijri but in oracle was 03/11/1433
When I run the following query it shows me "1433/11/03", but the actual date of the Hijra is "" 1433/11/02.
Select to_char (to_date ('20120918', 'YYYYMMDD'), ' DD/MM/YYYY', ' NLS_calendar = "' |') Hegira ARABIC ') FROM DUAL;
IFTIKHARCheck
FAQ on the calendar of the Hijra (Hijri) [ID 121061.1] Arabic
and
Conversion algorithm to Date in the Gregorian calendar until then Arab (Hijra) [ID 130551.1]Support of Oracle.
If you have a file called lxecal.nlt file
for Oracle 8 to $9i ORACLE_HOME/ocommon/sln
for Oracle 10 g and more $ORACLE_HOME/nlsso maybe that's the difference you see originally.
Kind regards
Bob -
Explosion of file size when the VM between moving/copying data store
I just got my first setting dedicated the SAN unit in my ESXi infrastructure.
I have set up and now my ESXi server got this new available data store.
Initially, virtual machines when running on the local HDD SAS.
I'm trying to move virtual machines between the 'old' DS to the new using the DS browser.
When copy/moving of the unit of SAN iSCSI VMs to my HARD drive, I'm done with a HUGE vmdk file.
Let's say that my original files are approximately 35 GB, when the process of copy/move this virtual machine to the no new DS, I get 250GB which is the size configured my virtual HARD disk...
I'm I missing something here (obviously)?
Any help/info would be greatly appreciated.
Concerning
Take a look at http://communities.vmware.com/message/1499444
André
-
Calculate date/day between 2 days/dates
Dear Sir
APEX full version 4.1
Full DB/version/edition/host operating system by default oracle db
Apex.Oracle.com Web server architecture (EPG, SST or APEX listener/host operating system)
Browser (s) and version (s) used firefox 12
24 theme
Model (s) default
Region/section type (s) see below for details
I have a question about how to select or get a date, which must be between 2 dates.
I'm not sure how to solve this problem. I know I should use plsql or sql with following statements...
Situationbetween to_date(:P9_BUILDEND, 'MM/DD/YYYY') AND to_date(:P9_BREAKDOWNSTART, 'MM/DD/YYYY');
I point X (date field) MM/DD/YYYY
I Y (date field) MM/DD/YYYY point
I point Z (date field) MM/DD/YYYY
the point X contains for example 05/03/2012
element Z contains for example 07/03/2012
I want Y point for the date between points X and Z. Is this possible to validation, calculation or dynamic action?
Mere student :)If you haven't tried my suggestion, then try with your date format
Choose return Boolean function and add the code below in 1 Expression of Validation
Please replace X, Y and Z with your actual page elements
if to_date(Y,'MM/DD/YYYY') between to_date(X,'MM/DD/YYYY') and to_date(X,'MM/DD/YYYY') then //validation is passed return true; else //validation error is raised return false; end if;
Maybe you are looking for
-
white screen just after that I have to switch full screen?
Wite screen just after I toggle icon full screen This has happened Don't know how many times
-
Display settings for NB100 - 11R
Salvation had to reboot this machine the disc supplied, Tosh but never since then have been making intermittent problems with display - becomes black for a while then falls in a much lower resolution. While I found if you turn off an on again, it res
-
KB968930 download the error 0x8007007B
IN the windows update in the update software 2.0 for powershell powershell Embedded article # KB968930 download error code is 0x8007007B Help! I am also unable to download Microsoft Fix it due to the inability to download powershell.
-
I can't open outlook express, it tells me "invalid password"
For two days, I was not able to open outlook express and receive new messages. A CONNECTION box with my email address & password. When I click on I tells me that the password is not valid. What can I do? Thanks for any help
-
Compaq presario CQ62: clear bios password
Hello my key after 3 failed password is 68719117. Please help, thanks! Cindy